Tutor profile: Manish G.
Subject: Python Programming
What is monkey patching in Python?
In Python, the term monkey patch only refers to dynamic modifications of a class or module at run-time. Consider the below example: class MyClass: def f(self): print "f()" We can then run the monkey-patch testing like this: import m def monkey_f(self): print "monkey_f()" m.MyClass.f = monkey_f obj = m.MyClass() obj.f() The output will be : monkey_f() As we can see, we did make some changes in the behaviour of f() in MyClass using the function we defined, monkey_f(), outside of the module m.
Subject: Artificial Intelligence
What is Inductive Bias?
While the learner algorithm chooses a predictor from a set of hypothesis, we can bias the learner towards a particular set of predictors. Such restrictions are called inductive bias since the choice of such restriction is determined before the learner sees the training data.
Why it is not possible to push a nail in by hand while it is possible to drive it into a piece of wood with a hammer?
When you swing a hammer you increase its kinetic energy, so that by the time it strikes the nail it imparts a large force which drives the nail into the wood. The hammer is basically an energy reservoir to which you are adding energy during the course of the swing, and which is released all at once upon impact. This results in the impact force greatly exceeding the maximum force you can exert by just pushing on the nail.
needs and Manish will reply soon.