Configure model

In {classifier.model_base_dir}, create the model.py with the following template.

model.py
def model():
  # Model definition here
  # Takes certain parameters like random_state from config.yaml
  return ...

def param_grid():
  # Optional. Only useful in ClassifierGridSearch, ignored otherwise.
  return ...

def resample():
  # Optional. Remove/Comment this entire function to disable sampler.
  # Takes certain parameters like random_state from config.yaml
  return ...

def cross_validation():
  # Optional. Remove/Comment this entire function to use default CV of 5 splits from StratifiedKFold.
  # Takes certain parameters like random_state, n_splits from config.yaml
  return ...

def pipeline():
  # Optional. Remove/Comment this entire function to disable any pipeline functions to be run.

Directory structure

{classifier.model_base_dir}/
β”œβ”€β”€ model.py
β”œβ”€β”€ KaraOne
β”‚   β”œβ”€β”€ EvaluateClassifier
β”‚   β”‚   β”œβ”€β”€ output.txt
β”‚   β”‚   β”œβ”€β”€ task-0
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ ClassifierGridSearch
β”‚   β”‚   └── ...
β”‚   └── RegularClassifier
β”‚       └── ...
└── FEIS
    └── ...

Last updated

Was this helpful?