Iris Model Predict Module

Iris Model Input Schema

This section describes the input data structure for the predict() method.

https://example.com/input-schema.json

type

object

properties

  • sepal_length

type

number

  • sepal_width

type

number

  • petal_length

type

number

  • petal_width

type

number

additionalProperties

False

Iris Model Output Schema

This section describes the output data structure of the predict() method.

https://example.com/output-schema.json

type

object

properties

  • species

type

string

additionalProperties

False

Iris Model Prediction Code

class iris_model.iris_predict.IrisModel

A demonstration of how to use the MLModel base class

__init__()

Class constructor that loads and deserializes the iris model parameters.

Note

The trained model parameters are loaded from the “model_files” directory.

predict(data)

Method to make a prediction with the Iris model.

Parameters

data (dict) – Data for making a prediction with the Iris model. Object must meet requirements of the input schema.

Return type

dict – The result of the prediction, the output object will meet the requirements of the output schema.