ReportDeco

class lightautoml.report.report_deco.ReportDeco(*args, **kwargs)[source]

Bases: object

Decorator to wrap AutoML class to generate html report on fit_predict and predict.

Example

>>> report_automl = ReportDeco(output_path="output_path", report_file_name="report_file_name")(automl).
>>> report_automl.fit_predict(train_data)
>>> report_automl.predict(test_data)

Report will be generated at output_path/report_file_name automatically.

Warning

Do not use it just to inference (if you don”t need report), because:

  • It needs target variable to calc performance metrics.

  • It takes additional time to generate report.

  • Dump of decorated automl takes more memory to store.

To get unwrapped fitted instance to pickle and inferecne access report_automl.model attribute.

property model

Get unwrapped model.

Returns:

model.

__init__(*args, **kwargs)[source]

Note

Valid kwargs are:

  • output_path: Folder with report files.

  • report_file_name: Name of main report file.

Parameters:
  • *args – Arguments.

  • **kwargs – Additional parameters.

fit_predict(*args, **kwargs)[source]

Wrapped automl.fit_predict method.

Valid args, kwargs are the same as wrapped automl.

Parameters:
  • *args – Arguments.

  • **kwargs – Additional parameters.

Returns:

OOF predictions.

predict(*args, **kwargs)[source]

Wrapped automl.predict method.

Valid args, kwargs are the same as wrapped automl.

Parameters:
  • *args – arguments.

  • **kwargs – additional parameters.

Returns:

predictions.