aws_sdk_machinelearning/client/
predict.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`Predict`](crate::operation::predict::builders::PredictFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`ml_model_id(impl Into<String>)`](crate::operation::predict::builders::PredictFluentBuilder::ml_model_id) / [`set_ml_model_id(Option<String>)`](crate::operation::predict::builders::PredictFluentBuilder::set_ml_model_id):<br>required: **true**<br><p>A unique identifier of the <code>MLModel</code>.</p><br>
7    ///   - [`record(impl Into<String>, impl Into<String>)`](crate::operation::predict::builders::PredictFluentBuilder::record) / [`set_record(Option<HashMap::<String, String>>)`](crate::operation::predict::builders::PredictFluentBuilder::set_record):<br>required: **true**<br><p>A map of variable name-value pairs that represent an observation.</p><br>
8    ///   - [`predict_endpoint(impl Into<String>)`](crate::operation::predict::builders::PredictFluentBuilder::predict_endpoint) / [`set_predict_endpoint(Option<String>)`](crate::operation::predict::builders::PredictFluentBuilder::set_predict_endpoint):<br>required: **true**<br>(undocumented)<br>
9    /// - On success, responds with [`PredictOutput`](crate::operation::predict::PredictOutput) with field(s):
10    ///   - [`prediction(Option<Prediction>)`](crate::operation::predict::PredictOutput::prediction): <p>The output from a <code>Predict</code> operation:</p> <ul>  <li>   <p><code>Details</code> - Contains the following attributes: <code>DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS</code> <code>DetailsAttributes.ALGORITHM - SGD</code></p></li>  <li>   <p><code>PredictedLabel</code> - Present for either a <code>BINARY</code> or <code>MULTICLASS</code> <code>MLModel</code> request.</p></li>  <li>   <p><code>PredictedScores</code> - Contains the raw classification score corresponding to each label.</p></li>  <li>   <p><code>PredictedValue</code> - Present for a <code>REGRESSION</code> <code>MLModel</code> request.</p></li> </ul>
11    /// - On failure, responds with [`SdkError<PredictError>`](crate::operation::predict::PredictError)
12    pub fn predict(&self) -> crate::operation::predict::builders::PredictFluentBuilder {
13        crate::operation::predict::builders::PredictFluentBuilder::new(self.handle.clone())
14    }
15}