LogisticRegression | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

LogisticRegression

Hello everyone, i have a little Problem with the sklearn kit and with the LogisticRegression, and with the predict method. this is the Question asked : Task You are given a feature matrix and a single datapoint to predict. Your job will be to build a Logistic Regression model with the feature matrix and make a prediction (1 or 0) of the single datapoint. Input Format First line: Number of data points in the feature matrix (n) Next n lines: Values of the row in the feature matrix, separated by spaces Next line: Target values separated by spaces Final line: Values (separated by spaces) of a single datapoint without a target value Output Format Either 1 or 0 Sample Input 6 1 3 3 5 5 7 3 1 5 3 7 5 1 1 1 0 0 0 2 4 Sample Output 1 and this is my code: https://code.sololearn.com/cMmHLE1z04nm and i dont know what to do to get to the right awnser. Thanks for your help

16th Feb 2022, 1:22 PM
Ramiz Besic
Ramiz Besic - avatar
3 Answers
+ 1
ok, thanks anyway for trying!
16th Feb 2022, 7:48 PM
Ramiz Besic
Ramiz Besic - avatar
0
Hold on edit: nevermind, I forgot most of machine learning stuff, sry
16th Feb 2022, 3:56 PM
Da GD Bot
Da GD Bot - avatar
0
3rd Aug 2022, 1:33 PM
Temesgen