Extract Model Tech Specs and Testing Results

With Obviously AI API you can also access the Model Tech Specs which gives you detailed insights regarding the algorithm, columns used, model performance and accuracy metrics.

The Tech Specs contains the following details :

  1. Algorithm
  2. Testing Accuracy
  3. Train Test Split
  4. Training Accuracy
  5. Validation Accuracy

Curl and Python Implementation

Curl

curl https://api.obviously.ai/user/report/<report_id>
-H 'Authorization: ApiKey <api_key>'

Python

import requests
head = {
  'Authorization' : 'ApiKey <api_key>'
}
response = requests.get(
  'https://api.obviously.ai/user/report/<report_id>', 
  headers = head
)
response.json()

In the above code simply replace the api_key and report_id to match your credentials.This will return a JSON object containing the Tech Specs Along with Drivers and their Impact.

From the Tech specs below it can be inferred that Logistic Regression was the best Algorithm and the ratio of the train test split was 80:20. Also, the Accuracy of the model on the training, validation and test data is similar which is a strong indicator that the model is doing a great job.

"tech_specs": 
   {
        "algorithm": "Logistic Regression",
        "testing_accuracy": "78.64%",
        "train_test_split": "80/20",
        "training_accuracy": "81.0%",
        "validation_accuracy": "79.42%"
    }

Extract testing Results

You can also retrieve testing set results CSV file from your prediction reports using the API.

Curl

curl https://api.obviously.ai/user/testing-results/<report_id>
-H 'Authorization: ApiKey <api_key>'

Python

import requests
head = {
  'Authorization' : 'ApiKey <api_key>'
}
response = requests.get(
  'https://api.obviously.ai/user/testing-results/<report_id>', 
  headers = head
)
response.content.decode('utf-8')