learn_api module

LearnApi

class edgeimpulse_api.api.learn_api.LearnApi(
		api_client=None
)

Parameters

  • api_client=None

Methods

add_keras_files

edgeimpulse_api.api.learn_api.add_keras_files(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})],
		zip: pydantic.types.StrictStr,
		**kwargs
)> edgeimpulse_api.models.generic_api_response.GenericApiResponse

Add Keras files

Add Keras block files with the contents of a zip. This is an internal API.

Parameters

  • self

  • project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]

  • zip: pydantic.types.StrictStr

  • **kwargs

Return

edgeimpulse_api.models.generic_api_response.GenericApiResponse

anomaly_trained_features

edgeimpulse_api.api.learn_api.anomaly_trained_features(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})],
		feature_ax1: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 1', extra={})],
		feature_ax2: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 2', extra={})],
		**kwargs
)> edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeaturesResponse

Trained features

Get a sample of trained features, this extracts a number of samples and their features.

Parameters

  • self

  • project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]

  • feature_ax1: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 1', extra={})]

  • feature_ax2: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Feature axis 2', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeaturesResponse

anomaly_trained_features_per_sample

edgeimpulse_api.api.learn_api.anomaly_trained_features_per_sample(
		self,
		project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})],
		learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})],
		sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})],
		**kwargs
)> edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeaturesResponse

Trained features for sample

Get trained features for a single sample. This runs both the DSP prerequisites and the anomaly classifier.

Parameters

  • self

  • project_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Project ID', extra={})]

  • learn_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Learn Block ID, use the impulse functions to retrieve the ID', extra={})]

  • sample_id: typing_extensions.Annotated[pydantic.types.StrictInt, FieldInfo(default=Ellipsis, description='Sample ID', extra={})]

  • **kwargs

Return

edgeimpulse_api.models.anomaly_trained_features_response.AnomalyTrainedFeatures