Home > other >  Python machine learning and practice
Python machine learning and practice

Time:10-02

Many years ago when the second learn decision tree, in the transformation characteristics encountered this problem, when something wrong

The from sklearn. Model_selection import train_test_split
X_train X_test, y_train, y_test=train_test_split (X, y, test_size=0.25, random_state=33)

The from sklearn. Feature_extraction import DictVectorizer
Vec=DictVectorizer (sparse=False)
X_train=vec. Fit_transform (X_train to_dict (received='record'))

TypeError: float () argument must be a string or a number, not 'method'
  • Related