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
WARNING: You are using pip version 22.0.3; however, version 22.0.4 is available.
You should consider upgrading via the '/opt/hostedtoolcache/Python/3.9.10/x64/bin/python3 -m pip install --upgrade pip' command.

/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/xgboost/compat.py:31: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
  from pandas import MultiIndex, Int64Index
brainome v1.8-120-prod

1. brainome help

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

!brainome --help
/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/xgboost/compat.py:31: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.
  from pandas import MultiIndex, Int64Index
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] [-nofun] [-modelonly]
                [-json JSON] [-C REGULARIZATION_STRENGTH]
                input [input ...]

Brainome Table Compiler (tm)  v1.8-120-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.
  -nofun                Stop compilation if there are warnings.
  -modelonly            Perform only the measurements needed to build the model.
  -json JSON            Document the session using json formatting.

  -C REGULARIZATION_STRENGTH

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/