0

Need Help at the Bob the Builder Task

I have tried this solution. 4 out of 6 test cases are working but the 3rd and 6th are not working. Can anyone please help me with a new solution? 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()] import numpy as np from sklearn.linear_model import LinearRegression lreg = LinearRegression().fit(X, y) y_pred = lreg.predict([datapoint]) print(int(y_pred[0]))

16th May 2022, 10:57 AM
Georg Trübenbach
3 Réponses
+ 2
use LogisticRegression. It is stated in the problem.
16th May 2022, 11:10 AM
Bob_Li
Bob_Li - avatar
+ 1
Well… yeah thank you.
16th May 2022, 11:12 AM
Georg Trübenbach
0
from sklearn.linear_midel SyntaxError : invalided syntax Can someone explain this why?
12th Oct 2022, 1:15 PM
CHUN