Question: Week 9 - Exercise Notebook created by Jonathan Penava For this exercise you are going to try to try and predict the carat range of
Week Exercise
Notebook created by Jonathan Penava
For this exercise you are going to try to try and predict the carat range of a diamond based on some of its properties. Start by importing the standard libraries and reading in the 'diamonds.csv file.
Drop the 'Color', 'Clarity', and 'Unnamed: Columns.
You will need to change the 'cut' values into int values.
Referencing what we did in week create a new column for carat ranges with the values
Drop the column 'carat' after you have created the carat ranges column
Using KNearest Neighbours classify your carat ranges based on the other values in your dataframe. Print out an accuracy score and a classification report for your algorithm.
Create a diagram of error rates for different values of K What value of K will give you a more accurate result?# Week Exercise
### Notebook created by Jonathan Penava
For this exercise you are going to try to try and predict the carat range of a diamond based on some of its properties. Start by importing the standard libraries and reading in the 'diamonds.csv file.
Drop the 'Color', 'Clarity', and 'Unnamed: Columns.
You will need to change the 'cut' values into int values.
Referencing what we did in week create a new column for carat ranges with the values
Drop the column 'carat' after you have created the carat ranges column
Using KNearest Neighbours classify your carat ranges based on the other values in your dataframe. Print out an accuracy score and a classification report for your algorithm.
Create a diagram of error rates for different values of K What value of K will give you a more accurate result?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
