KNN is a technique used to estimate new values based on the similarity of known ones. In this assignment, your company wants you to estimate the selling price of a customer's building The price you calculate will be given to the customer as the company selling price recommendation. You decide to use Data Science techniques such as the K-Nearest Neighbor.(KNN) You will need to: Import the necessary libraries from your program. (You can use the model class sklearn.neighbors.KNeighborsClassifier, part of the package sci-kit-learn 1.1.1 (Links to an external site) or any other. Train/test the model with the data included in the module (cal_housing.tgz). The house you need to estimate the value for has the following properties: longitude: 120.75 latitude: 39.34 housingMedianAge: 35.5 total rooms: 260 totalBedrooms:120 population:540 households: 12 medianIncome:1.8 K BuildingValue: ? What is the recommended price? You need to provide the code, properly commented. You could use the following packages (if you like): from matplotlib.pyplot import sca from sklearn import datasets,neighbors from sklearn.neighbors import KNeighborsRegressor from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler import numpy as np import pandas as pd
KNN is a technique used to estimate new values based on the similarity of known ones.
In this assignment, your company wants you to estimate the selling price of a customer's building
The price you calculate will be given to the customer as the company selling price recommendation.
You decide to use Data Science techniques such as the K-Nearest Neighbor.(KNN)
You will need to:
- Import the necessary libraries from your program. (You can use the model class sklearn.neighbors.KNeighborsClassifier, part of the package sci-kit-learn 1.1.1 (Links to an external site) or any other.
- Train/test the model with the data included in the module (cal_housing.tgz).
The house you need to estimate the value for has the following properties:
longitude: 120.75
latitude: 39.34
housingMedianAge: 35.5
total rooms: 260
totalBedrooms:120
population:540
households: 12
medianIncome:1.8 K
BuildingValue: ?
What is the recommended price?
You need to provide the code, properly commented.
You could use the following packages (if you like):
from sklearn import datasets,neighbors
from sklearn.neighbors import KNeighborsRegressor
from sklearn.preprocessing import StandardScaler
import pandas as pd
![✓ Details
Reading Assignment: Learn this tutorial about the K-Nearest Neighbourhood (K-NN)
K-Nearest Neighbours - GeeksforGeeks
KNN is a technique used to estimate new values based on the similarity of known ones.
In this assignment, your company wants you to estimate the selling price of a customer's building
The price you calculate will be given to the customer as the company selling price recommendation.
You decide to use Data Science techniques such as the K-Nearest Neighbor.(KNN)
You will need to:
• Import the necessary libraries from your program. (You can use the model class sklearn.neighbors.KNeighbors Classifier, part of the package sci-kit-learn
1.1.1
The house you need to estimate the value for has the following properties:
longitude: 120.75
latitude: 39.34
housing MedianAge: 35.5
total rooms: 260
total Bedrooms:120
population:540
households: 12
medianIncome:1.8 K
BuildingValue: ?
What is the recommended price?
You need to provide the code, properly commented.
from matplotlib.pyplot import sca
from sklearn import datasets, neighbors
from sklearn.neighbors import KNeighborsRegressor
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
import numpy as np
import pandas as pd](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5e0ec61a-8b9e-4998-a965-62d1137431de%2F9c9254e8-c519-4640-8a42-67123b68be4d%2Fr8hp5x_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)