Module aivis_engine_v2_sp_sdk_python.inference
Classes
class SignalPredictionInference (handle, key)-
Class for creating and handling signal prediction inference. This is your entry point for all inference operations.
Private constructor. To create new instances use any of:
Static methods
def create_by_incremental_learning(cls, learning: SignalPredictionIncrementalLearning, config_json: str) ‑> SignalPredictionInference-
@
FlavourRequirement([Flavour.FULL])Create signal prediction inference for the given learning handle and config.
To create predictions with this inference instance use any of:
SignalPredictionInference.infer_boolean()SignalPredictionInference.infer_float()SignalPredictionInference.infer_string()
Parameters
learning:aivis_engine_v2_sp_sdk_python.learning.SignalPredictionIncrementalLearning- Instance of signal prediction incremental learning
config_json:strDtoInferenceConfigas JSON string
Returns
SignalPredictionInference- Instance of signal prediction inference
def create_by_model(cls, model_json: str, config_json: str) ‑> SignalPredictionInference-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Create signal prediction inference for given model and config.
To create predictions with this inference instance use any of:
SignalPredictionInference.infer_boolean()SignalPredictionInference.infer_float()SignalPredictionInference.infer_string()
Parameters
model_json:strDtoModelas JSON stringconfig_json:strDtoInferenceConfigas JSON string
Returns
SignalPredictionInference- Instance of signal prediction inference
def create_by_training(cls, training: SignalPredictionTraining, config_json: str) ‑> SignalPredictionInference-
@
FlavourRequirement([Flavour.FULL])Create signal prediction inference for given training handle and config.
To create predictions with this inference instance use any of:
SignalPredictionInference.infer_boolean()SignalPredictionInference.infer_float()SignalPredictionInference.infer_string()
Parameters
training:SignalPredictionTraining- Instance of signal prediction training
config_json:strDtoInferenceConfigas JSON string
Returns
SignalPredictionInference- Instance of signal prediction inference
Methods
def destroy(self)-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Destroy this signal prediction inference. It's always safe to destroy an inference. Internally the destruction only takes place after all references to this object have been released.
def get_data_specification(self) ‑> str-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Get this inference's
DtoInferenceDataSpecificationReturns
strDtoInferenceDataSpecificationas JSON string
def get_output_specification(self) ‑> str-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Get this inference's
DtoInferenceOutputSpecificationReturns
strDtoInferenceOutputSpecificationas JSON string
def infer_boolean(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoBooleanDataPoint]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate boolean-valued inference for given data context and timestamps. The result will be a list of
DtoBooleanDataPointinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoBooleanDataPoint]- List of boolean data points
def infer_boolean_with_category_probabilities(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoBooleanDataPointWithCategoryProbabilities]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate boolean-valued category-probability inference list for given signal prediction inference, data context and timestamps. Method can only be called if underlying model was trained with categorical interpreter. The result will be a list of
DtoBooleanDataPointWithCategoryProbabilitiesinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoBooleanDataPointWithCategoryProbabilities]- List of data points consisting of list of category-probability pairs for boolean categories
def infer_float(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoFloatDataPoint]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate float-valued inference for given data context and timestamps. The result will be a list of
DtoFloatDataPointinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoFloatDataPoint]- List of float data points
def infer_float_with_category_probabilities(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoFloatDataPointWithCategoryProbabilities]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate float-valued category-probability inference list for given signal prediction inference, data context and timestamps. Method can only be called if underlying model was trained with categorical interpreter. The result will be a list of
DtoFloatDataPointWithCategoryProbabilitiesinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoFloatDataPointWithCategoryProbabilities]- List of data points consisting of list of category-probability pairs for float categories
def infer_float_with_next_normal(self, data: SignalPredictionData, timestamps: List[int], config_json: str) ‑> List[DtoFloatDataPointWithNextNormal]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])For given data, timestamps and next normal config, calculate the inference and the closest point that is normal as defined by the normal config. The result will be a list of
DtoFloatDataPointWithNextNormalinstances corresponding to given timestamps. Make sure to fill theaivis_engine_v2_ad_sdk_python.data.AnomalyDetectionDatawith all data needed for calculation. Check the model's inference data specification for needed signals and time ranges.@experimental: Might change in future releases. See the user guide for known performance issues.
Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
config_json:strDtoFloatNextNormalConfigas JSON string
Returns
List[DtoFloatDataPointWithNextNormal]- List of enhanced float data points
def infer_string(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoStringDataPoint]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate string-valued inference for given data context and timestamps. The result will be a list of
DtoStringDataPointinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoStringDataPoint]- List of string data points
def infer_string_with_category_probabilities(self, data: SignalPredictionData, timestamps: List[int]) ‑> List[DtoStringDataPointWithCategoryProbabilities]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate string-valued category-probability inference list for given signal prediction inference, data context and timestamps. Method can only be called if underlying model was trained with categorical interpreter. The result will be a list of
DtoStringDataPointWithCategoryProbabilitiesinstances corresponding to given timestamps. Make sure to fill the data context with all data needed for calculation. Check the model'sDtoInferenceDataSpecificationfor needed signals and time ranges.Parameters
data:SignalPredictionData- Instance of signal prediction data
timestamps:List[int]- List of timestamps
Returns
List[DtoStringDataPointWithCategoryProbabilities]- List of data points consisting of list of category-probability pairs for string categories