Uploading LCR assignment 1.#1
Open
abeerkhe wants to merge 1 commit into
Open
Conversation
|
Hi Abeer PR Feedback ReportStudent: Abeer What You Did Well (Hits)The student correctly inspected the data, scaled the data, set up the parameter grid for the grid search, and used 10-fold cross-validation. The best hyperparameter was correctly identified as 8. Areas for Improvement (Errors)The accuracy score in question 4 is 0.944, which is slightly off from the expected 0.947. Advice and RecommendationsYour submission is very close to complete. Double check the accuracy score in question 4. Make sure you are using the correct test data for the prediction. Keep up the great work. Overall AssessmentGood |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Create and test a KNN model for the class of wine from the load_wine dataset.
What did you learn from the changes you have made?
How to understand pandas dataframes, fit a model, use the model to predict values, and test the accuracy of that model.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
N/A
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
A couple challenges:
The first time around I accidentally fitted the model to the dataframe altogether (‘wine_df‘) and not the training data (‘wine_train‘). I caught this while reviewing material during the final question and had to go through and update the correct code.
During question 4, I was getting an indexing error which was because my code to create the predicted values (‘wine_test["predicted"]‘) was using incorrect indexing which tried to use the ‘wine_test[class]‘ column. This was because the ‘wine_test.iloc[:, :-2])‘ code originally used ‘-1‘ instead, which only excluded the last column--the newly-created ‘wine_test["predicted"]‘ column.
How were these changes tested?
When the error codes disappeared. :)
That being said, I'm still not fully confident with the 100% match for Question 4 which would be related to training vs testing data. I'm not familiar enough with wine or the dataset to know if the dependent variable, ‘class‘, can be fully explained by our independent variables.
A reference to a related issue in your repository (if applicable)
N/A - I created and navigated to the correct branch before starting the assignment this time.
Checklist