Page 1 of 1

Python Code only The given data:

Posted: Sun May 15, 2022 1:23 pm
by answerhappygod
Python Code only
Python Code Only The Given Data 1
Python Code Only The Given Data 1 (199.47 KiB) Viewed 52 times
The given data:
Python Code Only The Given Data 2
Python Code Only The Given Data 2 (26.41 KiB) Viewed 52 times
Table 1: Data Description Field Description StdID Student ID index) Statistical background Whether the student has a background in statistics. Python background The student background in python (Excellent, Good, Fair) Gender The student gender (Male or Female) Class level The student class level (Freshman, Sophomore, Junior, Senior) Weekly studying hours Average number of hours student studies per week. Previous exams Number of previous exams solved. Absences Number of absences throughout the semester Class size Number of students in the class. Mid Midterm score Project score Project score Final Final score (output variable) Note: Solve all the above questions using Python. Use Pandas, Seaborn, Sklearn, etc. libraries for all the above analysis Do the following tasks using data given in HW6Data and Table-1: A-1: Regression. Given a regression problem along with the input columns and output column, describe the steps to build a regression model. Explain how the regression model can be used for predicting the output column values. A-2: Regularization. Discuss in detail the potential use of both Ridge and LASSO regression? How are they different from the OLS regression? A-3: Cross-Validation. In both Ridge and LASSO regression, which technique do we use to select the best value for a? A-4: Given Data. Read and display the data given in HW6DataA. Refer to Table-1 for the data description A-5: OLS Regression. Build an OLS regression model for predicting the Final score of each student. Consider the following: All the variables except StdID, Gender, and Final shall be considered as input variables. • Train the model using 70% of the data and use the rest for testing. Set random state to 42. A-6: LASSO and Ridge. Using the same training data from OLS model (task A-5), estimate the coefficients (betas) using LASSO and Ridge regression. Obtain the best value of a among {10-3,10-2, 10-1, 100, 101, 102, 103}

1 E Class level H Absences Class size F G G Weekly studying hours Previous exams 7 1 FR 4 5 12 12 J K к L Mid score Project score Final 22 5 29 10 18 SR 2 А 1 Std D 2 s38893 3 s13237 4 S42562 5 S43697 6 s37267 7 s14869 8 s12343 0 7 2 4 17 B B с D Statistical Python background Gender Yes Good Yes Excellent F NO Good M No Fair No Fair Yes Excellent M No Excellent No Good JR JR 5 4 38 50 39 32 35 50 13 21 6 3 3 3 3 3 3 и оо оооо FR UNNNNN 7 2 2 3 2 5 11 18 21 24 SR 1 1 5 9 9 JR 1 1 24 2 2 13 12 45 38 9 S22587 FR 6 5 21 5