Training and Testing a Set of Machine Learning/Deep Learning Models to Predict Airbnb Prices for NYC
###########################################
Airbnb Price Prediction Using MachineLearning and Sentiment Analysis
Authors:
Pouya Rezazadeh Kalehbasti ([email protected])
Liubov Nikolenko ([email protected])
Hoormazd Rezaei ([email protected])
Link to source paper for citation: https://arxiv.org/abs/1907.12665
###########################################
In order to run the code make sure you pre-instal all the dependecies such as TextBlob and sklearn
Create a directory called "Data", and download the datasets from this link into the directory: https://drive.google.com/drive/folders/1xk5RyR-UgF6M-ddhn11SXHEWJeB0fQo5?usp=sharing
python sentiment_analysis.py
python data_cleanup.py
data_preprocessing_reviews.py
python feature_selection.py
python cv.py
python run_models.py
Note that by commenting/uncommenting certain lines of code you will be able to
run different configurations of the models.coeffs = np.load('../Data/selected_coefs_pvals.npy')
and uncomment line 241
coeffs = np.load('../Data/selected_coefs.npy')
.coeffs = np.load('../Data/selected_coefs_pvals.npy')
and comment out line 241
coeffs = np.load('../Data/selected_coefs.npy')
. print("--------------------Linear Regression--------------------")
LinearModel(X_concat, y_concat, X_test, y_test)
and comment out everything below these lines. Also, comment out the lines 268, 269 and 270
X_train = X_train[list(col_set)]
X_val = X_val[list(col_set)]
X_test = X_test[list(col_set)]
Warning: certain models take a while to train and run!