AcroLearner

ÜCRETSİZ
Taraf Samurai | Güncelleyen 2 months ago | Artificial Intelligence/Machine Learning
Health Check

N/A

Tüm Eğitimlere Dön (8)

How to get the result of AcroLearner NLP/Linear/Logistic Classification/Prediction

AcroLearner includes a set of RESTful APIs about TextClassification(Naive Bayes Classifier Model) for Natural Language Processing, Linear Regression Prediction and Logistic Regression Classification. Generally, the following steps is necessary.

  1. First of all, a new Machine Learning Theme is posted with some parameters and its items or not. You will get "trainKey" and “resultKey”.
    "trainKey" is unique only for this theme. “resultKey” is changeable. Actually a different “resultKey” will available when you call the Theme every time.

  2. Then you may individually post or put some items of the theme above.

  3. Once you finish the registration of Machine Learning Theme and its items, you may start a training/learning process to generate a Machine Learning Model using “trainKey”.

  4. Finally, you may post your original data to Machine Learning Model above and get the result of Classification/Prediction using “resultKey”.

*Only Japanese morphological analysis is processed, other alphabet languages should be partially supported.
*Test data for Text Classification
https://www.kaggle.com/uciml/sms-spam-collection-dataset
*Test data for Linear Regression Prediction
http://lib.stat.cmu.edu/datasets/boston
*Test data for Logistic Regression Classification
https://archive.ics.uci.edu/ml/machine-learning-databases/iris/

##0401. Get Text Classification
Put a text to get the classification result of Naive Bayes Classifier Model.
https://acrolearner.p.rapidapi.com/AcroLearner/v0_1/CltService/ml/trains/{resultKey}/bayesvalue
http method: post

Request Header parameters:

x-rapidapi-host: acrolearner.p.rapidapi.com
x-rapidapi-key: [your rapidapi-key]

Request Path parameters:

{resultKey}: XXXXXXXXXX

Request JSON Example:

[
    {
        "trainText": "win a gift"
    }
]

“trainText”: Naive Bayes Classifier will analyse the inputed text to get its classification.

Response JSON Example:

-Successful case:

{
    "classification": "spam",
    "errors": null,
    "memo": "Congratulations on your success!",
    "result": true
}

“classification”: the classification result from Naive Bayes Classifier Model

##0402. Get Linear Regression Prediction
Put a numerical array, the prediction result of Linear Regression will be available.
https://acrolearner.p.rapidapi.com/v0_1/CltService/ml/trains/{resultKey}/linearvalue
http method: post

Request Header parameters:

Content-Type: application/json
x-rapidapi-host: acrolearner.p.rapidapi.com
x-rapidapi-key: [your rapidapi-key]

Request Path parameters:

{resultKey}: XXXXXXXXXX

Request JSON Example:

Linear Multiple Regression case

[
  {
    "trainText": "10 20 30 40"
  },
  {
    "trainText": "11 21 31 41"
  }
]

Response JSON Example:

Linear Multiple Regression case

{
    "prediction": "{41.1274620421; 81.4463743901; 121.7652867381; 162.0841990861}",
    "errors": null,
    "memo": "Congratulations on your success!",
    "result": true
}

“prediction”: the prediction result from Linear Regression Model

##0403. Get Logistic Regression Classification
Put a numerical array, the probablity result of Logistic Regression Classification will be available.
https://acrolearner.p.rapidapi.com/v0_1/CltService/ml/trains/{resultKey}/logisticvalue
http method: post

Request Header parameters:

Content-Type: application/json
x-rapidapi-host: acrolearner.p.rapidapi.com
x-rapidapi-key: [your rapidapi-key]

Request Path parameters:

{resultKey}: XXXXXXXXXX

Request JSON Example:

[
    {
        "trainText": "6.6 6.8 6.7 6"
    },
    {
        "trainText": "3 2.8 3 2.9"
    },
    {
        "trainText": "4.4 4.8 5 4.5"
    },
    {
        "trainText": "1.4 1.4 1.7 1.5"
    }
]

Important It is necessary for every “trainText” to keep the same demension.

Response JSON Example:

{
    "classNo.": "0:Iris-setosa 1:Iris-versicolor",
    "classification": "{{0.3365071345,0.6634928655},{0.2680505615,0.7319494385},{0.2437284233,0.7562715767},{0.2873555817,0.7126444183}}",
    "errors": null,
    "memo": "Congratulations on your success!",
    "result": true
}

“classNo.”: Classification order number
"classification": the classification probability result from Logistic Regression Model. The value order is the same with “classNo.”