1

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
  • 12,665
  • 15
  • 42
  • 74
vincet
  • 847
  • 2
  • 12
  • 23

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
  • 1,727
  • 1
  • 8
  • 20
MSundt
  • 1
  • 1