# Configure model

In {classifier.model\_base\_dir}, create the `model.py` with the following template.

{% code title="model.py" %}

```python
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.
```

{% endcode %}

## Directory structure

```markdown
{classifier.model_base_dir}/
├── model.py
├── KaraOne
│   ├── EvaluateClassifier
│   │   ├── output.txt
│   │   ├── task-0
│   │   │   └── ...
│   │   └── ...
│   ├── ClassifierGridSearch
│   │   └── ...
│   └── RegularClassifier
│       └── ...
└── FEIS
    └── ...
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ashrithsagar.gitbook.io/eeg-imagined-speech-recognition/usage/configure-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
