Danger

You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software

Click here to go to the new docs pages.

sdv.metrics.tabular.MLPRegressor.compute

classmethod MLPRegressor.compute(test_data, train_data, metadata=None, target=None, scorer=None)

Compute this metric.

This fits a Machine Learning model on the training data and then evaluates it making predictions on the test data.

A target column name must be given, either directly or as a first level entry in the metadata dict, which will be used as the target column for the Machine Learning prediction.

Optionally, a list of ML scorer functions can be given. Otherwise, the default one for the type of problem is used.

Parameters
  • test_data (Union[numpy.ndarray, pandas.DataFrame]) – The values from the test dataset.

  • train_data (Union[numpy.ndarray, pandas.DataFrame]) – The values from the training dataset.

  • target (str) – Name of the column to use as the target.

  • scorer (Union[callable, list[callable], NoneType]) – Scorer (or list of scorers) to apply. If not passed, use the default one for the type of metric.

Returns

Scores obtained by the models when evaluated on the test data.

Return type

union[float, tuple[float]]