Skip to content

neurostatx.cli.ApplyModel

Attributes

NameDescription
appCyclopts application for the ApplyModel command-line tool.

Functions

NameDescription
ApplyModelApply 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

NameTypeDefaultDescription
in_datasetstrrequiredInput dataset.
modelstrrequiredPath to the model to apply.
id_columnstrrequiredColumn name to use as index.
desc_columnsintrequiredNumber of columns to use as descriptors.
out_folderstr'./ApplyModel/'Output folder. Defaults to ./ApplyModel/.
verboseboolFalseIncrease verbosity. Defaults to False.
save_parametersboolFalseSave parameters to a file. Defaults to False.
overwriteboolFalseOverwrite output folder if it already exists. Defaults to False.

Examples

Terminal window
ApplyModel --in-dataset dataset.xlsx --model model.pkl --id-column ID
--desc-columns 1 --out-folder ./output -v -f -s