Machine Learning to predict the quality of a climbing route based on various attributes, images, and descriptors.
Note for any predictor, you can add -b
to the end of the command line args to run
in binary classification mode where a 3 or 4 star route is 1, and other routes are 0.
python3 create_lexicon.py featuresInLexicon
Your lexicon will be saved in ./lexicons
.
python3 predict-svm.py # if you want all routes
python3 predict-svm.py Trad,Sport,TR # if you want only these types of routes
python3 predict-knn.py 5 # 5 is k for knn
python3 predict-bow-nn.py numberOfEpochs featuresInLexicon
Where featuresInLexicon
in lexicon should correspond to a lexicon you created using
the create_lexicon.py
script. Your neural network model will be saved in ./models
.
python3 predict-bow-svm.py featuresInLexicon
python3 predict-nn.py numberOfEpochs
Your neural network model will be saved in ./models
.
# will create table and crawl, getting specified number of routes and parsing description out of html
python3 crawler.py max_num_routes
# will download the api json for each route that doesn't have it
python3 api.py
# will parse the api json for each route that has not been parsed
python3 api_parse.py
Route description neural net. Make sure if the model was created in binary mode, you run this file also in binary mode.
python3 restore-bow-nn.py path_to_model
# ex:
python3 restore-bow-nn.py ./models/route_description_100_words_binary/model -b
Route features neural net.
python3 restore-nn.py path_to_model
# ex:
python3 restore-nn.py ./models/route_features_model_binary/model -b