scikit-learn/scikit-learn — Issue #411: permutation_test_score possibly broken
Author: satra
Created: 2011-10-21 16:59:23+00:00
State: open

if i run the following the permutation_test_score call will fail. looking at the code, the two internal functions _cross_val_score and _permutation_test_score are rather different and it doesn't seem like they have to be. but before i do any mods, i thought i would check.

--
from sklearn.cross_validation import cross_val_score
from sklearn.linear_model import LinearRegression
import numpy as np
from sklearn.cross_validation import KFold
X = np.random.rand(10,5)
y = np.random.rand(10,1)
from sklearn.metrics import mean_square_error
cross_val_score(LinearRegression(), X, y, mean_square_error, KFold(10, 5))
from sklearn.cross_validation import permutation_test_score
permutation_test_score(LinearRegression(), X, y, mean_square_error, KFold(10, 5))
--