0

What is causing the error in it

import pandas as pd from sklearn.model_selection import train_test_split from sklearn.model_selection import KFold from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier from sklearn import metrics a = int(input()) n1 = input().split(" ") n2 = input().split(" ") n3 = input().split(" ") n4 = input().split(" ") n5 = input().split(" ") n6 = input().split(" ") b = {'Row1':[n1[0],n2[0],n3[0],n4[0],n5[0],n6[0]],'Row2':[n1[1],n2[1],n3[1],n4[1],n5[1],n6[1]],"s":[1,1,1,0,0,0]} data = pd.DataFrame(b,columns=['Row1','Row2','s']) x = data[['Row1','Row2']].values.reshape(-1,1) y = data['s'].values c = LogisticRegression() c.fit(x,y) w = c.predict(x) print(c.predict(y))

13th Jul 2021, 5:45 AM
Shahir
Shahir - avatar
1 Odpowiedź
0
What's the Error Message? Your code is really difficult to read. Try to format it in a better way.
13th Jul 2021, 7:51 PM
Zen Coding
Zen Coding - avatar