python - cross_val_score fails with tensorflow(skflow) -
i using python 3.5 tensorflow 0.11 , sklearn 0.18. wrote simple example code calculate cross-validation score iris data using tensorflow. used skflow wrapper.
import tensorflow.contrib.learn skflow sklearn import datasets sklearn import cross_validation iris=datasets.load_iris() feature_columns = skflow.infer_real_valued_columns_from_input(iris.data) classifier = skflow.dnnclassifier(hidden_units=[10, 10, 10], n_classes=3, feature_columns=feature_columns) print(cross_validation.cross_val_score(classifier, iris.data, iris.target, cv=2, scoring = 'accuracy'))
but got error below. seems skflow not compatible cross_val_score of sklearn.
typeerror: cannot clone object '' (type ): not seem scikit-learn estimator not implement 'get_params' methods.
is there other way deal problem?
Comments
Post a Comment