Skip to content Skip to sidebar Skip to footer

Unknown Label Type Sklearn

I 'm new in sklearn. I 'm trying to do this code data = pandas.read_csv('titanic.csv') data= data[data['Pclass'].notnull() & data['Sex'].notnull() & data['Age'].not

Solution 1:

You are currently providing a dataframe and not it's numpy array representation as the training input to the fit method. Do this instead:

clf.fit(X=test.values, y=target.values)   
# Even .asmatrix() works but is not generally recommended

Post a Comment for "Unknown Label Type Sklearn"