Python Exercise Homework 4 (solution)

preview_player
Показать описание
COHE 6590 Health Data Analytics
Homework 4 (100 points)
Assignment Goals

Submission Instructions

• If they ask for authentication let me know so we could work at the same time so I could provide you with the code. So please try the code first you only required the code once. First, message me on messaging board, then if I reply only request for code and only request once. if not, you would be kicked out. Don’t request for code at night or early in the morning. I live in the central time zone

• Only open this in chrome and on the left-hand side you could see PANOPTO VIDEO, click on that you could see the homework 4 walkthrough, this video has all answers to it you just have to listen to the instructions and do it accordingly, it so easy you have to see this video and answer that’s all.
• These are the questions to be answered
• "# (1) Create column died (13.1 exercises) (5 points)\n",
• "# (2) Drop column discharge_disposition_code (13.1 exercises) (5 points)\n",
• "# (3) Create dummies for race, hispanic, gender, insurance_code, and transport_code (13.1 exercises) (5 points)\n",
• "# 2. Prepare for Test/Train\n",
• # (1) Remove null values (store as new DataFrame d) and print covid_like_illness value_counts (13.1 exercises) (5 points)\n",
• "# (2) Set X and y (13.1 exercises) (5 points)\n",
• "# (3) Oversample X and y using SMOTE, and over write X and y (11.2 and 13.1 exercises) (5 points)\n",
• "# (4) Perform train-test split using trainTestSplit(X, y) which returns X_train, X_test, y_train, y_test (5 points)\n",
• "# (5) Scale X_train and X_test using scale(X_train, X_test) which returns X_train, X_test (5 points)\n",
• "# 3. Classification Experiments\n",
• "## 3.A. Feature Preserving"
• ### 3.A.1. Logistic Regression Grid Search CV\n",
• "#### Complete the numbered item"
• # (1) Import LogisticRegression and call executeGridSearchCV with parameters \n",
• "# LogisticRegression(), param_grid, k, X_train, X_test, y_train, y_test (6 points)\n",
• "### 3.A.2. KNN Grid Search CV\n",
• "#### Complete the numbered item"
• # Using GridSearchCV here is just too expensive to bother (6 points)\n",
• "from ...\n",
• # (1) Scale X using scale(X) and store as X_scaled (2 points)\n",
• (2) Import PCA and call transform(PCA(n_components=100, whiten='True'), X_scaled, 0.997),\n",
"# storing the results as X_results, then print(X_results) (5 points)\n",
• (3) Perform train-test split using trainTestSplit(X_results, y) \n",
"# which returns X_train, X_test, y_train, y_test (3 points)\n",
"...\n",
• (4) Import MLPClassifer and call executeModel with parameters \n",
"# MLPClassifier(), X_train, X_test, y_train, y_test (3 points)\n",
"from ...\n" "..."
• "# (2) Import LinearDiscriminantAnalysis and call transform(LinearDiscriminantAnalysis(), X_scaled, y),\n",
• "# storing the results as X_results, then print(X_results) (5 points)\n",
• "from ...\n",
• # 4. Questions\n",
Answer the questions below in each cell."
1. Rank the experiments by test accuracy (most to leasts accurate). 3 points"
• ]
• #### (2) Rank the experiments by time in seconds (fastest to slowest time). 3 points"
3. Rank the experiments by the false negatives (fewest to most false negatives). 3 points"
4. Which is the best result overall? Justify. 10 points"

This video guides you on how to use python, and jupyter notebook to find your assignment and homework solution.

• ***I only permit you to see the things with are required to complete the work Do not submit anything on the account or even the assignment ****

The remaining files can be found attached to the work.
Рекомендации по теме
join shbcf.ru