-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHouseRentPredictionController.py
More file actions
27 lines (21 loc) · 1.36 KB
/
HouseRentPredictionController.py
File metadata and controls
27 lines (21 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pandas as pd
from HouseRentPredictor import Regression
class HouseRentPredictionController:
def __init__(self):
self.train = pd.read_csv('train.csv')
self.test = pd.read_csv('test.csv')
def predict(self, ms_sub_class, ms_zoning, lot_frontage, lot_area, street,lot_shape,
land_contour, utilities, lot_config, land_slope,house_style, overall_qual,
overall_cond, year_built, year_remod_add, exter_cond, foundation, gr_liv_area,
full_bath, bedroom_abv_gr,kitchen_abv_gr, kitchen_qual, tot_rms_abv_grd,
garage_cars, garage_area, garage_cond, sale_condition):
linear_regression = Regression(None, None, None, None, None, None, self.train, self.test)
return linear_regression.predict(ms_sub_class, ms_zoning, lot_frontage, lot_area, street,lot_shape,
land_contour, utilities, lot_config, land_slope,house_style, overall_qual,
overall_cond, year_built, year_remod_add,exter_cond, foundation, gr_liv_area,
full_bath, bedroom_abv_gr,kitchen_abv_gr, kitchen_qual, tot_rms_abv_grd,
garage_cars, garage_area, garage_cond, sale_condition)
hp = HouseRentPredictionController()
hp.predict(0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0)