Question: Instructions- Provide the python code and the mathematical equation. 4.)Logistic regression. For this exercise, you will be working with Baseball data. In this case, you
Instructions- Provide the python code and the mathematical equation.
4.)Logistic regression. For this exercise, you will be working with Baseball data. In this case, you have a players name, the number of homeruns they hit, and their salary. Salary is represented as either high or low. Conduct logistic regression for this question.
| Player | HR | Salary Groups |
| Allen, Greg | 4 | Low |
| Altuve, Jose | 31 | High |
| Arenado, Nolan | 41 | High |
| Bauers, Jake | 12 | Low |
| Betts, Mookie | 29 | High |
| Blackmon, Charlie | 32 | High |
| Bote, David | 11 | Low |
| Cabrera, Miguel | 12 | High |
| Cano, Robinson | 13 | High |
| Choo, Shin-Soo | 24 | High |
| Cooper, Garrett | 15 | Low |
| Cordell, Ryan | 7 | Low |
| Dahl, David | 15 | Low |
| Davis, Chris | 12 | High |
| Donaldson, Josh | 37 | High |
| Encarnacion, Edwin | 21 | High |
| Farmer, Kyle | 9 | Low |
| Fletcher, David | 6 | Low |
| Freeman, Freddie | 38 | High |
| Gallagher, Cam | 3 | Low |
| Gordon, Alex | 13 | High |
| Grandal, Yasmani | 28 | High |
| Guillorme, Luis | 1 | Low |
| Hampson, Garrett | 8 | Low |
| Harper, Bryce | 35 | High |
| Heineman, Scott | 2 | Low |
| Herrera, Rosell | 2 | Low |
| Heyward, Jason | 21 | High |
| Hosmer, Eric | 22 | High |
| Kelly, Carson | 18 | Low |
| Longoria, Evan | 20 | High |
| Machado, Manny | 32 | High |
| Martin, Richie | 6 | Low |
| Martinez, J.D. | 36 | High |
| McCutchen, Andrew | 10 | High |
| McMahon, Ryan | 24 | Low |
| Molina, Yadier | 10 | High |
| Mullins, Cedric | 0 | Low |
| Nunez, Renato | 31 | Low |
| O'Hearn, Ryan | 14 | Low |
| Posey, Buster | 7 | High |
| Pujols, Albert | 23 | High |
| Rendon, Anthony | 34 | High |
| Reynolds, Mark | 4 | Low |
| Riddle, JT | 6 | Low |
| Robles, Victor | 17 | Low |
| Rondon, Jose | 3 | Low |
| Sandoval, Pablo | 14 | High |
| Santana, Carlos | 34 | High |
| Smith, Dwight | 13 | Low |
| Stewart, Christin | 10 | Low |
| Tapia, Raimel | 9 | Low |
| Tauchman, Mike | 13 | Low |
| Tellez, Rowdy | 21 | Low |
| Trout, Mike | 45 | High |
| Upton, Justin | 12 | High |
| Vargas, Ildemaro | 6 | Low |
| Verdugo, Alex | 12 | Low |
| Votto, Joey | 15 | High |
| Zimmerman, Ryan | 6 | High |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
