@mindconnect/mindconnect-nodejs
Version:
NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy
117 lines (116 loc) • 7.41 kB
TypeScript
import { SdkClient } from "../common/sdk-client";
import { AnomalyDetectionModels } from "./anomaly-detection-models";
/**
* Service for configuring, reading and managing assets, asset ~ and aspect types.
*
* @export
* @class AssetManagementClient
* @extends {SdkClient}
*/
export declare class AnomalyDetectionClient extends SdkClient {
private _baseUrl;
/**
* Creates new model based on given timeseries data. Analytic Model Management service is used to store created model.
* @summary Train model
* @param {Array<Timeseries>} ioTTimeSeriesItems An array containing the time series items. Data to train a model. Data must contain 10 variables at max. Each timeseries item must have equal number of variables.
* @param {number} epsilon Threshold for the distance to check if point belongs to cluster.
* @param {number} minPointsPerCluster Minimum cluster size. Positive. Minimum is 2.
* @param {'EUCLIDEAN' | 'MANHATTAN' | 'CHEBYSHEV'} [distanceMeasureAlgorithm] Name of the distance measure algorithm.
* @param {string} [name] Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model
* @returns {Array<AnomalyDetectionModels.Timeseries>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
PostModel(ioTTimeSeriesItems: Array<AnomalyDetectionModels.Timeseries>, epsilon: number, minPointsPerCluster: number, distanceMeasureAlgorithm?: "EUCLIDEAN" | "MANHATTAN" | "CHEBYSHEV", name?: string): Promise<AnomalyDetectionModels.Model>;
/**
* Performs anomaly detection for given timeseries data against specified model.
* @summary Anomaly detection
* @param {Array<AnomalyDetectionModels.Timeseries>} ioTTimeSeriesItems An array containing the time series items. Data to performs detection on. Data must contain 10 variables at max. Each timeseries item must have equal number of variables. Variables must be the same as the ones used to train the model (the same number of variables and the same names).
* @param {string} modelID ID of the model to use.
* @returns {Promise<Array<AnomalyDetectionModels.Anomaly>>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
DetectAnomalies(ioTTimeSeriesItems: Array<AnomalyDetectionModels.Timeseries>, modelID: string): Promise<Array<AnomalyDetectionModels.Anomaly>>;
/**
* Creates new model based on given asset details. Analytic Model Management service is used to store created model.
* @summary Train model in direct integration with IoT time series
* @param {number} epsilon Threshold for the distance to check if point belongs to cluster.
* @param {number} minPointsPerCluster Minimum cluster size. Positive. Minimum is 2.
* @param {string} assetId unique identifier of the asset (entity)
* @param {string} aspectName Name of the aspect (property set).
* @param {Date} from Beginning of the time range to be retrieved (exclusive).
* @param {Date} to End of the time range to be retrieved (exclusive).
* @param {'EUCLIDEAN' | 'MANHATTAN' | 'CHEBYSHEV'} [distanceMeasureAlgorithm] Name of the distance measure algorithm.
* @param {string} [name] Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model
* @returns {Promise<AnomalyDetectionModels.Model>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
PostModelDirect(epsilon: number, minPointsPerCluster: number, assetId: string, aspectName: string, from: Date, to: Date, distanceMeasureAlgorithm?: "EUCLIDEAN" | "MANHATTAN" | "CHEBYSHEV", name?: string): Promise<AnomalyDetectionModels.Model>;
/**
* Performs anomaly detection for given asset details against specified model.
* @summary Anomaly detection in direct integration with IoT time series
* @param {string} modelID ID of the model to use.
* @param {string} assetId unique identifier of the asset (entity)
* @param {string} aspectName Name of the aspect (property set).
* @param {Date} from Beginning of the time range to be retrieved (exclusive).
* @param {Date} to End of the time range to be retrieved (exclusive).
* @returns {Promise<Array<AnomalyDetectionModels.Anomaly>>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
DetectAnomaliesDirect(modelID: string, assetId: string, aspectName: string, from: Date, to: Date): Promise<Array<AnomalyDetectionModels.Anomaly>>;
/**
* Cancels specified job.
* @summary Cancel jod.
* @param {string} id ID of the job to get status for.
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
CancelDetectAnomaliesJob(id: string): Promise<void>;
/**
* Returns current status for specified jod.
* @summary Get job status.
* @param {string} id ID of the job to get status for.
* @returns {Promise<AnomalyDetectionModels.ReasoningJobInfo>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
GetDetectAnomaliesJob(id: string): Promise<AnomalyDetectionModels.ReasoningJobInfo>;
/**
* Performs long running reasoning (anomaly detection) for given timeseries data.
* @summary Anomaly Detection batch reasoning
* @param {AnomalyDetectionModels.SubmitReasoningRequest} [submitReasoningRequest] Request data to launch reasoning job.
* @returns {Promise<AnomalyDetectionModels.ReasoningJobInfo>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
PostDetectAnomaliesJob(submitReasoningRequest?: AnomalyDetectionModels.SubmitReasoningRequest): Promise<AnomalyDetectionModels.ReasoningJobInfo>;
/**
* Performs long running model training for given timeseries data. The number of timeseries items to process is limited by 1000000, this parameter can be changed in the future without notice.
* @summary Anomaly Detection batch model training
* @param {AnomalyDetectionModels.SubmitTrainingRequest} [submitTrainingRequest] Request data to launch training job.
* @returns {Promise<AnomalyDetectionModels.TrainingJobInfo>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
PostTrainModelJob(submitTrainingRequest?: AnomalyDetectionModels.SubmitTrainingRequest): Promise<AnomalyDetectionModels.TrainingJobInfo>;
/**
* Returns current status for specified jod.
* @summary Get job status.
* @param {string} id ID of the job to get status for.
* @returns {Promise<AnomalyDetectionModels.TrainingJobInfo>}
* @throws {AnomalyDetectionModels.RequiredError}
* @memberof AnomalyDetectionClient
*/
GetTrainModelJob(id: string): Promise<AnomalyDetectionModels.TrainingJobInfo>;
/**
* Cancels specified job.
* @summary Cancel job.
* @param {string} id ID of the job to get status for.
* @throws {RequiredError}
* @memberof AnomalyDetectionClient
*/
CancelTrainModelJob(id: string): Promise<void>;
}