model_prediction module#

class edgeimpulse_api.models.model_prediction.ModelPrediction(
*,
sampleId: StrictInt,
startMs: float,
endMs: float,
label: StrictStr | None = None,
prediction: StrictStr,
predictionCorrect: StrictBool | None = None,
f1Score: float | None = None,
anomalyScores: List[List[float]] | None = None,
)[source]#

Bases: BaseModel

class Config[source]#

Bases: object

allow_population_by_field_name = True#
validate_assignment = False#
anomaly_scores: List[List[float]] | None#
end_ms: float#
f1_score: float | None#
classmethod from_dict(
obj: dict,
) ModelPrediction[source]#

Create an instance of ModelPrediction from a dict

classmethod from_json(
json_str: str,
) ModelPrediction[source]#

Create an instance of ModelPrediction from a JSON string

label: StrictStr | None#
prediction: StrictStr#
prediction_correct: StrictBool | None#
sample_id: StrictInt#
start_ms: float#
to_dict()[source]#

Returns the dictionary representation of the model using alias

to_json() str[source]#

Returns the JSON representation of the model using alias

to_str() str[source]#

Returns the string representation of the model using alias