# Orange Linear Regression and scikit-learn linear regression gives different results

I am trying to cross-validate my scikit-learn script by mean of Orange3, thus obtaining a nice visual representation.

Doing step by step, to keep it simple I just tried to cross-validate a simple linear regression.

Following is the simple script for linear regression in python/scikit-learn

lr=LinearRegression(fit_intercept=True,normalize=False,copy_X=True,n_jobs=1)
lm=lr.fit(X_train, y_train)
lmscore_train=lm.score(X_train,y_train)  ## R2 = 0.6264021467338086
lmscore_test=lm.score(X_test,y_test)     ## R2 = -12.344747578839215


Whilst I was expecting to get the same result, this is not the case.

In Orange, I get R2=-10.792 whilst in Python, I get R2=-12.344747578839215.

Train and test split are the same in both cases.

Do you have a clue why that is?

Orange and Scikit treat outliers in different ways. If you have outliers in your data, remove them and check. The answers then are similar.