Pipeline and GridSearch for Doc2Vec

感情迁移 提交于 2019-12-05 09:30:27

1) init() lets you define the parameters you would like your class to take at initialization (equivalent to contructor in java).

Please look at these questions for more details:

2) Why do you want to add the RandomForestClassifier and what will be its input?

Looking at your other two questions, do you want to compare the output of RandomForestClassifier with LogisticRegression here? If so, you are doing good in this question of yours.

3) You have imported the train_test_split, just use it.

X_train, X_test, y_train, y_test = train_test_split(dataset["posts"], dataset["type"])

fitted = log_grid.fit(X_train, y_train)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!