We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from machine_learning_algorithm.cross_validation import validate
ModuleNotFoundError: No module named 'machine_learning_algorithm'
请问一下,您这个模块是没有上传到github上吗
The text was updated successfully, but these errors were encountered:
from machine_learning_algorithm.cross_validation import validate ModuleNotFoundError: No module named 'machine_learning_algorithm' 请问一下,您这个模块是没有上传到github上吗
hey brother 用下面这几句替代作者那几句 if name == 'main': import pandas as pd dataset=pd.read_csv('iris.csv',names=['sepal length','sepal width','petal length','petal width','class']) dataset['class']=np.where(dataset['class'].str.contains('Iris-setosa'), 1,np.where(dataset['class'].str.contains('Iris-versicolor'),2,3)) X=dataset.values x=X[:,:4] y=X[:,4] from sklearn.model_selection import KFold kf = KFold(n_splits=10) for xun, ce in kf.split(X): X_data_train,X_data_test,y_data_train,y_data_test = x[xun], x[ce], y[xun], y[ce] clf = CART_CLF() clf.fit(X_data_train, y_data_train) score = 0 for a, b in zip(X_data_test,y_data_test): if clf.predict(a) == b: score += 1 print(score / len(y_data_test))
其中iris数据集自己去下载。
Sorry, something went wrong.
改成 from cross_validation import validate 就行了,那个是博主自己写的代码
No branches or pull requests
ModuleNotFoundError: No module named 'machine_learning_algorithm'
请问一下,您这个模块是没有上传到github上吗
The text was updated successfully, but these errors were encountered: