How to structure this dataset for multinomial logistic regression

1 answer

Dataset

I have a dataset like the one in the picture. I need to apply Logistic Regression to this dataset and try to predict the correct result of R. The problem is that R can assume 3 different values, as you can see in the picture (W,L,D). How can i structure it to work with logistic regression? I am using python and sklearn logistic regression.

All answers to this question, which has the identifier 59795104

The best answer:

Create a dataframe or numpy ndarray with A,M,D,H, lets say it as x_train and then R into another ndarrary lets name it as y_train, now you can use below

LogisticRegression(multi_class='multinomial',solver ='newton-cg').fit(x_train,y_train) 

But based on actual you may need to do some standardization/transform before you fit into a model, you can also refer to this explanation on using iris data set.

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type com.google.firebase.iid.zzav is referenced as an interface from com.google.firebase.messaging.zzd”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data