ModelProxy Class
Note
This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
Proxy object for AutoML models that enables inference on remote compute.
Create an AutoML ModelProxy object to submit inference to the training environment.
- Inheritance
-
builtins.objectModelProxy
Constructor
ModelProxy(child_run, compute_target=None)
Parameters
- child_run
The child run from which the model will be downloaded.
- compute_target
Overwrite for the target compute to inference on.
Methods
forecast |
Submit a job to run forecast on the model for the given values. |
forecast_quantiles |
Submit a job to run forecast_quantiles on the model for the given values. |
predict |
Submit a job to run predict on the model for the given values. |
predict_proba |
Submit a job to run predict_proba on the model for the given values. |
test |
Retrieve predictions from the |
forecast
Submit a job to run forecast on the model for the given values.
forecast(X_values: Any, y_values: Any | None = None) -> Tuple[AbstractDataset, AbstractDataset]
Parameters
- y_values
- AbstractDataset or DataFrame or ndarray
Input y values to run the forecast on.
Returns
The forecast values.
forecast_quantiles
Submit a job to run forecast_quantiles on the model for the given values.
forecast_quantiles(X_values: Any, y_values: Any | None = None, forecast_destination: Any | None = None, ignore_data_errors: bool = False) -> AbstractDataset
Parameters
- y_values
Input y values to run the forecast on.
- forecast_destination
- <xref:pandas.Timestamp>
Forecast_destination: a time-stamp value. Forecasts will be made all the way to the forecast_destination time, for all grains. Dictionary input { grain -> timestamp } will not be accepted. If forecast_destination is not given, it will be imputed as the last time occurring in X_pred for every grain.
predict
Submit a job to run predict on the model for the given values.
predict(values: Any) -> AbstractDataset
Parameters
Returns
The predicted values.
predict_proba
Submit a job to run predict_proba on the model for the given values.
predict_proba(values: Any) -> AbstractDataset
Parameters
Returns
The predicted values.
test
Retrieve predictions from the test_data
and compute relevant metrics.
test(test_data: AbstractDataset, include_predictions_only: bool = False) -> Tuple[AbstractDataset, Dict[str, Any]]
Parameters
- test_data
The test dataset.
- include_predictions_only
Whether or not to only include the predictions as part of the predictions.csv output.
If this parameter is True
then the output CSV columns look like
(forecasting is the same as regression):
Classification => [predicted values], [probabilities]
Regression => [predicted values]
else (default):
Classification => [original test data labels], [predicted values], [probabilities], [features]
Regression => [original test data labels], [predicted values], [features]
The [original test data labels]
column name = [label column name] + "_orig"
.
The [predicted values]
column name = [label column name] + "_predicted"
.
The [probabilities]
column names = [class name] + "_predicted_proba"
.
The [features]
column names = [feature column name] + "_orig"
.
If the test_data
does not include a target column then [original test data labels]
will not be in the output dataframe.
Returns
A tuple containing the predicted values and the metrics.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for