High level API
- falcon.AutoML(task: str, train_data: Any, test_data: Optional[Any] = None, features: Optional[Any] = None, target: Optional[Any] = None, manager_configuration: Optional[Union[Dict, str]] = None, config: Optional[Union[Dict, str]] = None) TaskManager
High level API for one line model training and evaluation.
- When calling the following steps will be executed:
task manager object will be initialized;
the model will be trained;
performance summary table is printed (if test set is not provided, random split is done);
the model is saved as an onnx file.
- Parameters
task (str) – type of the task, currently supported tasks are [tabular_classification, tabular_regression]
train_data (Any) – data to be used for training, for tabular classification and regression this can be: path to .csv or .parquet file, pandas dataframe, numpy array, tuple (X,y)
test_data (Any, optional) – data to be used for evaluation, for tabular classification and regression this can be: path to .csv or .parquet file, pandas dataframe, numpy array, tuple (X,y)
features (Any, optional) – features to be used for training, for tabular classification and regression this can be: list of column names or indexes, by default None
target (Any, optional) – target to be used for training, for tabular classification and regression this can be: column name or index, by default None
manager_configuration (Union[Dict, str], optional) – task manager configuration to be used (can be used to replace pipeline/learner and/or their arguments), by default None
config (Union[Dict, str], optional) – alias for manager_configuration argument
- Returns
Task Manager object for the corresponding task.
- Return type
- falcon.initialize(task: str, data: Any, pipeline: Optional[Type[Pipeline]] = None, pipeline_options: Optional[Dict] = None, extra_pipeline_options: Optional[Dict] = None, features: Optional[Any] = None, target: Optional[Any] = None, **options: Any) TaskManager
Initializes and returns a task manager object for a given task.
- Parameters
task (str) – type of the task
data (Any) – data to be used for training
pipeline (Optional[Type[Pipeline]], optional) – class to be used as pipeline, by default None
pipeline_options (Optional[Dict], optional) – arguments to be passed to the pipeline, by default None. These options will overwrite the ones from default_pipeline_options attribute
extra_pipeline_options (Optional[Dict], optional) – arguments to be passed to the pipeline, by default None. These options will be passed in addition to the ones from default_pipeline_options attribute. This argument is ignored if pipeline_options is not None
features (Any, optional) – features to be used for training, by default None
target (Any, optional) – target to be used for training, by default None
- Returns
Initialized task manager object
- Return type
- falcon.run_model(model_path: str, X: ndarray[Any, dtype[ScalarType]]) Union[List[ndarray[Any, dtype[ScalarType]]], ndarray]
Runs input data through the saved model.
- Parameters
model_path (str) – model path
X (npt.NDArray) – model inputs
- Returns
model predictions
- Return type
Union[List[npt.NDArray], np.ndarray]