I am training a LinearRegression() classifier and trying to gauge its prediction accruacy
from sklearn.metrics import r2_score
from sklearn.linear_model import LinearRegression
regr_rf = LinearRegression()
regr_rf.fit(df[features],df['label'])
y_rf = regr_rf.predict(df[features])
score = regr_rf.score(df[features],df['label'])
print score
score2 = r2_score(y_rf,df['label'])
print score2
both score and score2 are showing very different value. I though the score function of the model is suppose to be the same as r2_score calculated explicitly