Question: Create a dataframe X with input features Distance and ScoreDiffPreKick. Create a dataframe y with output feature Outcome. Flatten y into an array called yArray

Create a dataframe X with input features Distance and ScoreDiffPreKick.
Create a dataframe y with output feature Outcome.
Flatten y into an array called yArray using np.ravel().
Initialize a logistic regression model using LogisticRegression().
Fit the model to the input and flattened output features in X and yArray.
Create a new dataframe XNew with user-input values for Distance and ScoreDiffPreKick.
Use the fitted logistic regression model to predict the outcome from the new data.
Determine the accuracy of a fitted logistic regression classification model.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!