Documentation

Access all resources and documentation or contact us for additional assistance.

Build and run

Most of the time, the only command you need to type is “brainome ”. 


For example:

brainome https://download.brainome.ai/data/public/titanic_train.csv

Brainome will automatically (1) clean the data, (2) split it into training and validation sets, (3) extract measurements and select a machine learning model type (DT, NN or RF), (4) build the model based on the measurements, and (5) train the model. At the end, Brainome will present validation measurements that help you understand the quality of the predictions. More on this later.

The output of Brainome is a self-contained predictor that runs with Python3. By default, the predictor’s name is a.py. The predictor itself has a usage help. For example:

python3 a.py
usage: a.py [-h] [-validate] [-cleanfile] [-headerless] [-json] [-trim]
            csvfile
a.py: error: the following arguments are required: csvfile

To validate the predictor on the training data set, you can run this command:

python3 a.py -validate titanic_train.csv
Classifier Type:                    Random Forest
System Type:                        Binary classifier

Accuracy:
    Best-guess accuracy:            61.50%
    Model accuracy:                 91.12% (729/800 correct)
    Improvement over best guess:    29.62% (of possible 38.5%)

Model capacity (MEC):               11 bits
Generalization ratio:               63.72 bits/bit

Confusion Matrix:

      Actual |   Predicted    
    —————————-
        died |     460       32
    survived |      39      269

Accuracy by Class:

      target |  TP FP  TN FN     TPR     TNR     PPV     NPV      F1      TS
    ——– | — — — — ——- ——- ——- ——- ——- ——-

        died | 460 39 269 32  93.50%  87.34%  92.18%  89.37%  92.84%  86.63%
    survived | 269 32 460 39  87.34%  93.50%  89.37%  92.18%  88.34%  79.12%

Exploring the predictor

The predictor is a standalone Python3 program that can be easily inspected. It contains all measurements, including the Brainome command line (“Invocation”) that was used to create the predictor. Here’s the Python predictor that Brainome creates:

more a.py
#!/usr/bin/env python3
#
# This code has been produced by a paid version of Brainome Table Compiler(tm)
licensed to: User 1.
# Portions of this code copyright (c) 2019-2021 by Brainome, Inc. All Rights Reserved.
# Brainome grants an exclusive (subject to our continuing rights to use and modify models),
# worldwide, non-sublicensable, and non-transferable limited license to use and modify this
# predictor produced through the input of your data:
# (i) for users accessing the service through a free evaluation account, solely for your
# own non-commercial purposes, including for the purpose of evaluating this service, and
# (ii) for users accessing the service through a paid, commercial use account, for your
# own internal  and commercial purposes.
# Please contact support@brainome.ai with any questions.
# Use of predictions results at your own risk.
#
# Output of Brainome Table Compiler v1.002.
# Invocation: brainome https://download.brainome.ai/data/public/titanic_train.csv
# Total compiler execution time: 0:00:13.88. Finished on: May-18-2021 17:55:22.
# This source code requires Python 3.
#
“””
Predictor:                        a.py
    Classifier Type:              Random Forest
    System Type:                  Binary classifier
    Training / Validation Split:  60% : 40%
    Accuracy:
      Best-guess accuracy:        61.50%
      Training accuracy:         100.00% (479/479 correct)
      Validation Accuracy:        77.88% (250/321 correct)
      Combined Model Accuracy:    91.12% (729/800 correct)

    Model Capacity (MEC):         11    bits

    Generalization Ratio:         41.84 bits/bit
    Percent of Data Memorized:     4.85%
    Resilience to Noise:          -1.64 dB
    System Meter Runtime Duration:    1s

    Training Confusion Matrix:
              Actual | Predicted
              —— | ———
                died |  295    0 
            survived |    0  184 

    Validation Confusion Matrix:
              Actual | Predicted
              —— | ———
                died |  165   32 
            survived |   39   85 

    Training Accuracy by Class:
            Survived |   TP   FP   TN   FN     TPR      TNR      PPV      NPV       F1       TS 
            ——– | —- —- —- —- ——– ——– ——– ——– ——– ——–
                died |  295    0  184    0  100.00%  100.00%  100.00%  100.00%  100.00%  100.00%
            survived |  184    0  295    0  100.00%  100.00%  100.00%  100.00%  100.00%  100.00%

    Validation Accuracy by Class:
            Survived |   TP   FP   TN   FN     TPR      TNR      PPV      NPV       F1       TS 
            ——– | —- —- —- —- ——– ——– ——– ——– ——– ——–
                died |  165   39   85   32   83.76%   68.55%   80.88%   72.65%   82.29%   69.92%
            survived |   85   32  165   39   68.55%   83.76%   72.65%   80.88%   70.54%   54.49%

    Attribute Ranking:
                            Feature | Relative Importance
                                Sex :   0.4287
                        Cabin_Class :   0.1785
                       Cabin_Number :   0.0853
                                Age :   0.0535
                               Fare :   0.0465
                     Sibling_Spouse :   0.0432
                      Ticket_Number :   0.0407
                Port_of_Embarkation :   0.0405
                        PassengerId :   0.0354
                               Name :   0.0343
                    Parent_Children :   0.0133         

“””

Now that you’ve created and run a predictor, we are ready for some more advanced uses of Brainome.