2

Problem with scikit learn: I can't use learning_curve of sklearn.

When I do: import sklearn (it works), from sklearn.cluster import bicluster (it works), from sklearn import cross_validation (it works)... and so on. The only file that doesn't work is learning_curve,namely from sklearn.learning_curve import learning_curve (doesn't work).

Two types of error to consider:

  1. from sklearn import learning_curve

    Traceback (most recent call last): File "", line 1, in ImportError: cannot import name learning_curve

  2. from sklearn.learning_curve import learning_curve

    Traceback (most recent call last): File "", line 1, in ImportError: No module named learning_curve

Any clue?

Tonechas
  • 13,398
  • 16
  • 46
  • 80
vincet
  • 917
  • 3
  • 13
  • 26

2 Answers2

0

the learning_curve in scikit learn is under model_selection So try,

from sklearn.model_selection import learning_curve    

This works fine!

Bishab
  • 29
  • 1
  • 4
0
# will work 
from sklearn.model_selection import validation_curve

# won't work 
from sklearn.learning_curve import validation_curve
amirhe
  • 2,186
  • 1
  • 13
  • 27
MSundt
  • 1
  • 1