0
Somebody please spot me what's wrong.
I got all the test cases correct except the 3 and 6 but since I'm not in the pro pack, couldn't see them and realise my mistake... Here's my code. import numpy as np from sklearn.linear_model import LinearRegression model=LinearRegression() n = int(input()) X = [] for i in range(n): X.append([float(x) for x in input().split()]) y = [int(x) for x in input().split()] datapoint = [float(x) for x in input().split()] model.fit(X,y) print(int(model.predict([datapoint])))
2 Respuestas
+ 2
Thnx very much...
+ 1
You should indicate which problem this is.
But, this does look like Bob the Builder.
Only thing that jumps out to me is that you're using LinearRegression as opposed to LogisticRegression.
And even us pros don't get to see all the test cases.