-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54a9f1e
commit 7dd232a
Showing
1 changed file
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
# Model learning pipeline | ||
|
||
## Sample Run | ||
|
||
`from model_loop import ModelLoop` | ||
|
||
`label = 'LABEL'` | ||
`models = ['NB', 'RF', 'ET', 'LR', 'SVM']` | ||
`iterations = 10` | ||
`output_dir = 'output/'` | ||
`for test, train in splits:` | ||
`loop = ModelLoop(train, test, label, models, iterations, output_dir, ignore_columns = ['DATE'])` | ||
`loop.run()` | ||
`pd.read_csv('output/simple_report.csv', quotechar='"', skipinitialspace = True)` | ||
This code implements the model pipeline. | ||
|
||
## Files | ||
|
||
- `model.py`: a class for models | ||
- `model_loop.py`: a class for running a loop of classifiers; takes test-train data splits and various run params | ||
- `run.py`: this code implements the model_loop class; it also implements our re-sampling of the data | ||
- `run.sh`: this code runs the full model pipeline; it contains the specifications to alter the operation of the code | ||
|
||
## To Run | ||
Make any desired edits to the `run.sh` file and execute the following in bash: | ||
|
||
chmod +x run.sh | ||
./run.sh | ||
|