brainome logo

102 Using brainome CLI

Brainome’s primary interface is the command line.

  1. brainome command line –help

  2. CLI documentation in depth

Prerequisites

This notebook assumes brainome as installed per notebook brainome_101_Quick_Start

!python3 -m pip install brainome --quiet
!brainome --version
brainome v1.006-19-prod

1. brainome help

Ever forget a command parameter? Want to know what else we can do?

!brainome --help
usage: brainome [-h] [-version] [-headerless] [-target TARGET]
                [-ignorecolumns IGNORECOLUMNS] [-rank [ATTRIBUTERANK]]
                [-measureonly] [-f FORCEMODEL] [-nosplit] [-split FORCESPLIT]
                [-nsamples NSAMPLES] [-ignoreclasses IGNORELABELS]
                [-usecolumns IMPORTANTCOLUMNS] [-o OUTPUT] [-v] [-q] [-y]
                [-e EFFORT] [-biasmeter] [-novalidation] [-balance]
                [-O OPTIMIZE] [-nofun] [-modelonly]
                input [input ...]

Brainome Table Compiler (tm)  v1.006-19-prod

Required arguments:
  input                 Table as CSV files and/or URLs or Command above

Optional arguments:
  -h                    show this help message and exit
  -version, --version   show program's version number and exit

Basic options:
  -headerless           Headerless CSV input file.
  -target TARGET        Specify target column by name or number. Default: last column of table.
  -ignorecolumns IGNORECOLUMNS
                        Comma-separated list of columns to ignore by name or number.
  -rank [ATTRIBUTERANK]
                        Select the optimal subset of columns for accuracy on held out data
                        If optional parameter N is given, select the optimal N columns. Works best for DT.
  -measureonly          Only output measurements, no predictor is built.
  -f FORCEMODEL         Force model type: DT, NN, RF  Default: RF
  -nosplit              Use all of the data for training. Default: dataset is split between training and validation.
  -split FORCESPLIT     Pass it an integer between 50 and 90 telling our system to use that percent of the data for training, and the rest for validation

Intermediate options:
  -nsamples NSAMPLES    Train only on a subset of N random samples of the dataset. Default: entire dataset.
  -ignoreclasses IGNORELABELS
                        Comma-separated list of classes to ignore.
  -usecolumns IMPORTANTCOLUMNS
                        Comma-separated list of columns by name or number used to build the predictor.
  -o OUTPUT             Predictor filename. Default: a.py
  -v                    Verbose output
  -q                    Quiet operation.
  -y                    Answers yes to all overwrite questions.

Advanced options:
  -e EFFORT             Increase compute time to improve accuracy. 1=<EFFORT<100. Default: 1
  -biasmeter            Measure model bias
  -novalidation         Do not measure validation scores for created predictor.
  -balance              Treat classes as if they were balanced (only active for NN).
  -O OPTIMIZE           Maximize true positives towards a single class.
  -nofun                Stop compilation if there are warnings.
  -modelonly            Perform only the measurements needed to build the model.

Examples:
Measure and build a random forest predictor for titanic
	brainome https://download.brainome.ai/data/public/titanic_train.csv 

Build a better predictor by ignoring columns:
	brainome titanic_train.csv -ignorecolumns "PassengerId,Name" -target Survived 

Automatically select the important columns by using ranking:
	brainome titanic_train.csv -rank -target Survived 

Build a neural network model with effort of 5:
	brainome titanic_train.csv -f NN -e 5 -target Survived

Measure headerless dataset:
	brainome https://download.brainome.ai/data/public/bank.csv -headerless -measureonly

Full documentation can be found at https://www.brainome.ai/documentation

2. CLI documentation in depth

Additional documentation can be found at

https://www.brainome.ai/documentation/tutorial_advanced/