This implementation is the model training and evaluation part of Titanic Project (Machine Learning from Disaster).
This is the third package in our pipeline of project(Assignment 4b). It uses the data after feature engineering, trains the knn or decision tree model, and makes predictions.
Each package, as a part in the brane pipeline, can be run separately to produce the corresponding results (processed data, ML models, visualization)
- Download the source code by
git clone
$ git clone https://github.com/TISNN/brane-trainandpredict.git
$ cd brane-trainandpredict
- Build brane package by .yml file
$ brane build container.yml
- Check availablity
$ brane list
- import brane package
$ brane import TISNN/brane-trainandpredict
- Check availablity
$ brane list
If you see train_predict
package with version==8.0.0, it was successfully built.
$ brane --debug test --data ./data train_predict
- Choosing the train_predict function
- Enter "knn" or "decision_tree" as source string
- It runs correctly with output "Accuracy of <> model is <> and the <> results was saved at /data"
- The model in
.pkl
format will be save to./data
folder in your local file system.
This repository is equipped with a GitHub Action workflow.
Every time we push the code to this repository, it will automatically run the tests using branescript. The build status of the project can be viewed on the Actions page.
- The
brane
is the executable compiled binary file, used for automated testing. - The
test.txt
is the branescript used for automated testing.
You also can test for a single function by python.
Parameters can be changed in file: pytest.py
$ python pytest.py