neurostatx.cli.ApplyModel
Attributes
| Name | Description |
|---|---|
app | Cyclopts application for the ApplyModel command-line tool. |
Functions
| Name | Description |
|---|---|
ApplyModel | Apply a pickled SEMopy, FactorAnalyzer, or sklearn model to a dataset. |
appattributemodule attribute#
app = App(default_parameter=Parameter(negative=()))Cyclopts application for the ApplyModel command-line tool.
ApplyModelfunction#
def ApplyModel(in_dataset: Annotated[str, Parameter(show_default=False, group='Essential Files Options')], model: Annotated[str, Parameter(show_default=False, group='Essential Files Options')], id_column: Annotated[str, Parameter(show_default=False, group='Essential Files Options')], desc_columns: Annotated[int, Parameter(show_default=False, group='Essential Files Options')], out_folder: Annotated[str, Parameter(group='Essential Files Options')] = './ApplyModel/', verbose: Annotated[bool, Parameter(-v, --verbose, group='Optional parameters')] = False, save_parameters: Annotated[bool, Parameter(-s, --save_parameters, group='Optional parameters')] = False, overwrite: Annotated[bool, Parameter(-f, --overwrite, group='Optional parameters')] = False)Apply a pickled SEMopy, FactorAnalyzer, or sklearn model to a dataset.
Features in the dataset are scaled before the model is applied.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
in_dataset | str | required | Input dataset. |
model | str | required | Path to the model to apply. |
id_column | str | required | Column name to use as index. |
desc_columns | int | required | Number of columns to use as descriptors. |
out_folder | str | './ApplyModel/' | Output folder. Defaults to ./ApplyModel/. |
verbose | bool | False | Increase verbosity. Defaults to False. |
save_parameters | bool | False | Save parameters to a file. Defaults to False. |
overwrite | bool | False | Overwrite output folder if it already exists. Defaults to False. |
Examples
ApplyModel --in-dataset dataset.xlsx --model model.pkl --id-column ID--desc-columns 1 --out-folder ./output -v -f -s