私はwebscrapingしています。私はutf-8をcsvに保存して、それをきれいにしました。今はFacebookのfastTextを使用できるようにトレーニングとテストファイルを作成しようとしています。私が持っているものであり、それはfastText Pythonの実装トレーニングとテストセットの作成
from sklearn.cross_validation import train_test_split
y_all = df["normalized"]
X_all = df.drop('normalized', axis = 1)
X_train, X_test, y_train, y_test = train_test_split(X_all, y_all, `test_size=0.3, random_state=1)`
import fasttext as ft
classifier = ft.supervised(X_train, y_train)
私にエラーを与えているし、これはそれが戻っているとエラーになり、これは、私はあなたが道を考えるjupyterノートブック内のウィンドウkwashington122 @
TypeError Traceback (most recent call last)
<ipython-input-47-1f4fa41d367f> in <module>()
----> 1 classifier = ft.supervised(X_train, y_train)
fasttext/fasttext.pyx in fasttext.fasttext.supervised (fasttext/fasttext.cpp:6665)()
fasttext/fasttext.pyx in fasttext.fasttext.train_wrapper (fasttext/fasttext.cpp:4732)()
C:\Program Files\Anaconda3\lib\genericpath.py in isfile(path)
28 """Test whether a path is a regular file"""
29 try:
---> 30 st = os.stat(path)
31 except OSError:
32 return False
TypeError: argument should be string, bytes or integer, not DataFrame
'y_all = df [" normalized "]。値' 'X_all = df.drop( '正規化'、axis = 1).values'を試してください。 –