org.wso2.carbon.ml.rest.api

## Class AnalysisApiV11

- java.lang.Object
- - org.wso2.carbon.ml.rest.api.MLRestAPI
  - - org.wso2.carbon.ml.rest.api.AnalysisApiV11

-     public class AnalysisApiV11
      extends MLRestAPI

  WSO2 ML Analyses API. All the operations related to analyses are delegated from this class.

- - ### Field Summary

    - ### Fields inherited from class org.wso2.carbon.ml.rest.api.MLRestAPI

      `auditLog`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalysisApiV11()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `addCustomizedFeatures(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> customizedFeatures)` Adding customized features of an analysis.
    `javax.ws.rs.core.Response` | `addDefaultsIntoCustomizedFeatures(long analysisId, org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues)` Set default features as customized features of an analysis.
    `javax.ws.rs.core.Response` | `addDefaultsIntoHyperParameters(long analysisId)` Load default configurations as configurations of an analysis.
    `javax.ws.rs.core.Response` | `addHyperParameters(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> hyperParameters, String algorithmName)` Add hyper-parameters for the selected algorithm of an analysis.
    `javax.ws.rs.core.Response` | `addModelConfiguration(long analysisId, List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs)` Add configurations of an analysis.
    `javax.ws.rs.core.Response` | `createAnalysis(org.wso2.carbon.ml.commons.domain.MLAnalysis analysis)` Create a new analysis of a project.
    `javax.ws.rs.core.Response` | `deleteAnalysis(long analysisId)` Delete an analysis of a given ID.
    `javax.ws.rs.core.Response` | `getAlgorithmName(long analysisId)` Get the algorithm name of an analysis.
    `javax.ws.rs.core.Response` | `getAlgorithmType(long analysisId)` Get the algorithm type of an analysis.
    `javax.ws.rs.core.Response` | `getAllAnalyses()` Retrieve all analyses.
    `javax.ws.rs.core.Response` | `getAllFeatures(String analysisId)` Get all feature names of an analysis.
    `javax.ws.rs.core.Response` | `getAllModelsOfAnalysis(long analysisId)` Get all models of an analysis.
    `javax.ws.rs.core.Response` | `getConfigs(long analysisId, int limit, int offset)` Get configurations of an analysis.
    `javax.ws.rs.core.Response` | `getCustomizedFeatures(long analysisId, int limit, int offset)` Get customized features of an analysis.
    `javax.ws.rs.core.Response` | `getfilteredFeatures(String analysisId, String featureType)` Get filtered feature names of an analysis.
    `javax.ws.rs.core.Response` | `getHyperParameters(long analysisId, String algorithmName)` Get hyper-parameter of an analysis.
    `javax.ws.rs.core.Response` | `getNewAnomalyLabel(long analysisId)` Get the new anomaly labels of an analysis.
    `javax.ws.rs.core.Response` | `getNewNormalLabel(long analysisId)` Get the new normal label of an analysis.
    `javax.ws.rs.core.Response` | `getNormalization(long analysisId)` Get the normalization option of an analysis.
    `javax.ws.rs.core.Response` | `getNormalLabels(long analysisId)` Get the normal labels of an analysis.
    `javax.ws.rs.core.Response` | `getObservationList(long analysisId)` get the observation list fraction of an analysis.
    `javax.ws.rs.core.Response` | `getProductVariable(long analysisId)` get the product variable of an analysis.
    `javax.ws.rs.core.Response` | `getRatingVariable(long analysisId)` get the rating variable of an analysis.
    `javax.ws.rs.core.Response` | `getResponseVariable(long analysisId)` Get the response variable of an analysis.
    `javax.ws.rs.core.Response` | `getSummarizedFeatures(long analysisId, int limit, int offset)` Get summarized features of an analysis.
    `javax.ws.rs.core.Response` | `getSummaryStatistics(long analysisId, String featureName)` Get summary statistics of a feature of an analysis.
    `javax.ws.rs.core.Response` | `getTrainDataFraction(long analysisId)` Get the train data fraction of an analysis.
    `javax.ws.rs.core.Response` | `getUserVariable(long analysisId)` get the user variable of an analysis.
    `javax.ws.rs.core.Response` | `isTimeSeriesDataset(long analysisId)` Get whether the current dataset is a time series or not.
    `javax.ws.rs.core.Response` | `options()` HTTP Options method implementation for analysis API.

    - ### Methods inherited from class org.wso2.carbon.ml.rest.api.MLRestAPI

      `getTenantID`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AnalysisApiV11

          public AnalysisApiV11()

  - ### Method Detail

    - #### options

          public javax.ws.rs.core.Response options()

      HTTP Options method implementation for analysis API.
      Returns:

    - #### createAnalysis

          public javax.ws.rs.core.Response createAnalysis(org.wso2.carbon.ml.commons.domain.MLAnalysis analysis)

      Create a new analysis of a project.
      Parameters:
        `analysis` - `MLAnalysis` object

    - #### isTimeSeriesDataset

          public javax.ws.rs.core.Response isTimeSeriesDataset(long analysisId)

      Get whether the current dataset is a time series or not.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        A boolean falg which indicates whether this dataset is time series or not.

    - #### addCustomizedFeatures

          public javax.ws.rs.core.Response addCustomizedFeatures(long analysisId,
                                                        List<org.wso2.carbon.ml.commons.domain.MLCustomizedFeature> customizedFeatures)

      Adding customized features of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `customizedFeatures` - `List` of `MLCustomizedFeature` objects

    - #### addDefaultsIntoCustomizedFeatures

          public javax.ws.rs.core.Response addDefaultsIntoCustomizedFeatures(long analysisId,
                                                                    org.wso2.carbon.ml.commons.domain.MLCustomizedFeature customizedValues)

      Set default features as customized features of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `customizedValues` - `MLCustomizedFeature` object

    - #### getSummarizedFeatures

          public javax.ws.rs.core.Response getSummarizedFeatures(long analysisId,
                                                        int limit,
                                                        int offset)

      Get summarized features of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `limit` - Number of features need to retrieve, from the starting index
        `offset` - Starting index
      Returns:
        JSON array of `FeatureSummary` objects

    - #### getCustomizedFeatures

          public javax.ws.rs.core.Response getCustomizedFeatures(long analysisId,
                                                        int limit,
                                                        int offset)

      Get customized features of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `limit` - Number of features need to retrieve, from the starting index
        `offset` - Starting index
      Returns:
        JSON array of `MLCustomizedFeature` objects

    - #### getConfigs

          public javax.ws.rs.core.Response getConfigs(long analysisId,
                                             int limit,
                                             int offset)

      Get configurations of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `limit` - Number of features included in the analysis configuration
        `offset` - Starting index of the features
      Returns:
        JSON array of `MLAnalysisConfigsBean` objects

    - #### getfilteredFeatures

          public javax.ws.rs.core.Response getfilteredFeatures(String analysisId,
                                                      String featureType)

      Get filtered feature names of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `featureType` - Feature type need to retrieve (Categorical or Numerical)
      Returns:
        JSON array of feature names

    - #### getAllFeatures

          public javax.ws.rs.core.Response getAllFeatures(String analysisId)

      Get all feature names of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        JSON array of feature names

    - #### getResponseVariable

          public javax.ws.rs.core.Response getResponseVariable(long analysisId)

      Get the response variable of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Response variable name

    - #### getAlgorithmName

          public javax.ws.rs.core.Response getAlgorithmName(long analysisId)

      Get the algorithm name of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Algorithm name

    - #### getAlgorithmType

          public javax.ws.rs.core.Response getAlgorithmType(long analysisId)

      Get the algorithm type of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Algorithm type

    - #### getNormalLabels

          public javax.ws.rs.core.Response getNormalLabels(long analysisId)

      Get the normal labels of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Normal Labels

    - #### getNormalization

          public javax.ws.rs.core.Response getNormalization(long analysisId)

      Get the normalization option of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Normalization option

    - #### getNewNormalLabel

          public javax.ws.rs.core.Response getNewNormalLabel(long analysisId)

      Get the new normal label of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        New Normal Label

    - #### getNewAnomalyLabel

          public javax.ws.rs.core.Response getNewAnomalyLabel(long analysisId)

      Get the new anomaly labels of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        New Anomaly Label

    - #### getTrainDataFraction

          public javax.ws.rs.core.Response getTrainDataFraction(long analysisId)

      Get the train data fraction of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        Train data fraction

    - #### getSummaryStatistics

          public javax.ws.rs.core.Response getSummaryStatistics(long analysisId,
                                                       String featureName)

      Get summary statistics of a feature of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `featureName` - Name of the feature
      Returns:
        Summary statistics of the feature

    - #### addModelConfiguration

          public javax.ws.rs.core.Response addModelConfiguration(long analysisId,
                                                        List<org.wso2.carbon.ml.commons.domain.MLModelConfiguration> modelConfigs)

      Add configurations of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `modelConfigs` - `List` of `MLModelConfiguration` objects

    - #### addHyperParameters

          public javax.ws.rs.core.Response addHyperParameters(long analysisId,
                                                     List<org.wso2.carbon.ml.commons.domain.MLHyperParameter> hyperParameters,
                                                     String algorithmName)

      Add hyper-parameters for the selected algorithm of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `hyperParameters` - `List` of `MLHyperParameter` objects
        `algorithmName` - Algorithm name

    - #### getHyperParameters

          public javax.ws.rs.core.Response getHyperParameters(long analysisId,
                                                     String algorithmName)

      Get hyper-parameter of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
        `algorithmName` - Algorithm name
      Returns:
        JSON array of `MLHyperParameter` objects

    - #### addDefaultsIntoHyperParameters

          public javax.ws.rs.core.Response addDefaultsIntoHyperParameters(long analysisId)

      Load default configurations as configurations of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis

    - #### getAllAnalyses

          public javax.ws.rs.core.Response getAllAnalyses()

      Retrieve all analyses.
      Returns:
        JSON array of `MLAnalysis` objects

    - #### getAllModelsOfAnalysis

          public javax.ws.rs.core.Response getAllModelsOfAnalysis(long analysisId)

      Get all models of an analysis.
      Parameters:
        `analysisId` - Unique id of the analysis
      Returns:
        JSON array of `MLModelData` objects

    - #### deleteAnalysis

          public javax.ws.rs.core.Response deleteAnalysis(long analysisId)

      Delete an analysis of a given ID.
      Parameters:
        `analysisId` - Unique id of the analysis

    - #### getUserVariable

          public javax.ws.rs.core.Response getUserVariable(long analysisId)

      get the user variable of an analysis.

    - #### getProductVariable

          public javax.ws.rs.core.Response getProductVariable(long analysisId)

      get the product variable of an analysis.

    - #### getRatingVariable

          public javax.ws.rs.core.Response getRatingVariable(long analysisId)

      get the rating variable of an analysis.

    - #### getObservationList

          public javax.ws.rs.core.Response getObservationList(long analysisId)

      get the observation list fraction of an analysis.

Copyright © 2017 WSO2, Inc.. All Rights Reserved.