Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import pandas as pd
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. import sklearn.model_selection as train_test_split
  5. from sklearn.tree import DecisionTreeClassifier
  6. %matplotlib inline
  7. import seaborn as sns
  8. sns.set()
  9. from sklearn.neighbors import KNeighborsClassifier
  10. import pandas as pd
  11. import numpy as np
  12. import matplotlib.pyplot as plt
  13. import sklearn.model_selection as train_test_split
  14. from sklearn.tree import DecisionTreeClassifier
  15. %matplotlib inline
  16. import seaborn as sns
  17. sns.set()
  18. train=pd.read_csv(r"C:UsersPranjal PathakDesktopkaggle-titanic-masterDigit recognizer kaggletrain.csv")
  19. test=pd.read_csv(r"C:UsersPranjal PathakDesktopkaggle-titanic-masterDigit recognizer kaggletest.csv")
  20.  
  21. from sklearn.neighbors import KNeighborsClassifier
  22. score=cross_val_score(clf,train1,test1,cv=KFold,n_jobs=1,scoring=scoring) ```
  23.  
  24. On running above I am getting the following response:
  25. 'DataFrame' object has no attribute 'n_splits'
  26. How to get rid of this?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement