Hello
I have a query with fit_intercept parameter in most of the estimators.
When we have a linear model like w0 + w1*x1 + w2*x2 + .. I'm assuming that
clf.intercept_ takes care of the w0 term since the data is centered.
Then why aren't these two equivalent?
X = np.random.rand(100, 10)
y = np.random.rand(100)
X1 = np.ones((100, 11))
X1[:, 1:] = X
clf = Ridge(fit_intercept=True)
clf.fit(X, y)
print clf.intercept_ + np.dot(X, clf.coef_)
clf1 = Ridge(fit_intercept=False)
clf1.fit(X1, y)
print np.dot(X1, clf1.coef_)
I get some minor differences. Hope someone can enlighten me as usual.
--
Regards,
Manoj Kumar,
Mech Undergrad
http://manojbits.wordpress.com
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general