What does the worker do
It will use 4 different methods to solve the Boston House Price problem. The input file specifies the method (model), and the output file contains the R-squared score of the trained model on test data.
......
methods = {
"random forest": random_forest.train_evaluation_model,
"linear regression": linear_regression.train_evaluation_model,
"multi-layer perceptron": mlp.train_evaluation_model,
"svm": svm.train_evaluation_model
}
X_train, X_test, y_train, y_test = get_X_y()
acc = methods.get(first_line, default_method)(
X_train, X_test, y_train, y_test)
......The input file like the following:
job1.txt:
linear regression
job2.txt:
random forest
job3.txt:
multi-layer perceptron
job4.txt:
svmLast updated
Was this helpful?