0

Logistic regression

It’s from the bob the builder project of the course, I couldn’t know what’s wrong with it, any help https://code.sololearn.com/ca191a10A47A/?ref=app

3rd Mar 2021, 2:44 PM
Med Hedi Bejaoui
Med Hedi Bejaoui - avatar
3 Respuestas
0
what is the error message you’re getting? We do not have the quiz input, and do not know what the expected output is.
3rd Mar 2021, 9:02 PM
Wilbur Jaywright
Wilbur Jaywright - avatar
0
from sklearn.linear_model import LogisticRegression import pandas as pd # Input number of samples n = int(input()) # Read feature data X = [] for _ in range(n): X.append([float(x) for x in input().split()]) # Read target values y = [int(x) for x in input().split()] # Read a single data point (not used in scoring here) datapoint = [float(x) for x in input().split()] # Train logistic regression model model = LogisticRegression() model.fit(X, y) # Predict (not used but shown here) predictions = model.predict(X) # Output the model's accuracy score print(int(model.score(X, y))) ------- Use the above code. Learn more from- https://www.statisticalaid.com/
17th May 2025, 4:54 PM
Md Touhidul Islam
Md Touhidul Islam - avatar