def f_regression(X, Y):
    import sklearn
return sklearn.feature_selection.f_regression(X, Y, center=False)
from sklearn.datasets import load_svmlight_file
X_train_data, Y_train_data = load_svmlight_file(svmlight_format_train_file)
from sklearn.feature_selection import SelectKBest
featureSelector = SelectKBest(score_func=f_regression, k=2)
featureSelector.fit(X_train_data, Y_train_data)
print([(1 + zero_based_index) for zero_based_index in list(featureSelector.
    get_support(indices=True))])
Выбор функций Scikit-learn для данных регрессии