Struct aws_sdk_machinelearning::types::Prediction
source · #[non_exhaustive]pub struct Prediction {
pub predicted_label: Option<String>,
pub predicted_value: Option<f32>,
pub predicted_scores: Option<HashMap<String, f32>>,
pub details: Option<HashMap<DetailsAttributes, String>>,
}
Expand description
The output from a Predict
operation:
-
Details
- Contains the following attributes:DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS
DetailsAttributes.ALGORITHM - SGD
-
PredictedLabel
- Present for either aBINARY
orMULTICLASS
MLModel
request. -
PredictedScores
- Contains the raw classification score corresponding to each label. -
PredictedValue
- Present for aREGRESSION
MLModel
request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.predicted_label: Option<String>
The prediction label for either a BINARY
or MULTICLASS
MLModel
.
predicted_value: Option<f32>
The prediction value for REGRESSION
MLModel
.
predicted_scores: Option<HashMap<String, f32>>
Provides the raw classification score corresponding to each label.
details: Option<HashMap<DetailsAttributes, String>>
Provides any additional details regarding the prediction.
Implementations§
source§impl Prediction
impl Prediction
sourcepub fn predicted_label(&self) -> Option<&str>
pub fn predicted_label(&self) -> Option<&str>
The prediction label for either a BINARY
or MULTICLASS
MLModel
.
sourcepub fn predicted_value(&self) -> Option<f32>
pub fn predicted_value(&self) -> Option<f32>
The prediction value for REGRESSION
MLModel
.
source§impl Prediction
impl Prediction
sourcepub fn builder() -> PredictionBuilder
pub fn builder() -> PredictionBuilder
Creates a new builder-style object to manufacture Prediction
.
Trait Implementations§
source§impl Clone for Prediction
impl Clone for Prediction
source§fn clone(&self) -> Prediction
fn clone(&self) -> Prediction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Prediction
impl Debug for Prediction
source§impl PartialEq for Prediction
impl PartialEq for Prediction
source§fn eq(&self, other: &Prediction) -> bool
fn eq(&self, other: &Prediction) -> bool
self
and other
values to be equal, and is used
by ==
.