Module aivis_engine_v2_sd_sdk_python.inference
Classes
class StateDetectionInference (handle, key)-
Class for creating and handling state detection inference. This is your entry point for all inference operations.
Private constructor. To create new instances use:
Static methods
def create_by_model(cls, model_json: str, config_json: str) ‑> StateDetectionInference-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Create state detection inference for given model and config.
Use
StateDetectionInference.infer()to create predictions with this inference instance.Parameters
model_json:str- Instance of
DtoModelas JSON string config_json:str- Instance of
DtoInferenceConfigas JSON string
Returns
StateDetectionInference- Instance of state detection inference
def create_by_training(cls, training: StateDetectionTraining, config_json: str) ‑> StateDetectionInference-
@
FlavourRequirement([Flavour.FULL])Create state detection inference for given training handle and config.
Use
StateDetectionInference.infer()to create predictions with this inference instance.Parameters
training:StateDetectionTraining- Instance of state detection training
config_json:strDtoInferenceConfigas JSON string
Returns
StateDetectionInference- Instance of state detection inference
Methods
def destroy(self)-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Destroy this state detection 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 infer(self, data: StateDetectionData, timestamps: List[int]) ‑> List[DtoSegmentsFloatDataPoint]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])Calculate segmented inference for given data context and timestamps. The result will be a list of
DtoSegmentsFloatDataPointinstances 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:StateDetectionData- Instance of state detection data
timestamps:List[int]- List of timestamps
Returns
List[DtoSegmentsFloatDataPoint]- List of segmented float data points
def infer_with_next_normal(self, data: StateDetectionData, timestamps: List[int], config_json: str) ‑> List[DtoSegmentsFloatDataPointWithNextNormal]-
@
FlavourRequirement([Flavour.FULL, Flavour.INFERENCE])For given data, timestamps, and next normal config, calculate for each segment the inference and the closest point that is normal as defined by the normal config. The result will be a list of
DtoSegmentsFloatDataPointWithNextNormalinstances 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.@experimental: Might change in future releases. See the user guide for known performance issues.
Parameters
data:StateDetectionData- Instance of state detection data
timestamps:List[int]- List of timestamps
config_json:strDtoNextNormalConfigas JSON string
Returns
List[DtoSegmentsFloatDataPointWithNextNormal]- List of segmented float data points enhanced with next normal data