The predictor can output validation measurements in json rather than human-readable text.
This notebook assumes brainome is installed as per notebook brainome_101_Quick_Start
The data sets are:
!python3 -m pip install brainome --quiet
!brainome --version
import urllib.request as request
response2 = request.urlretrieve('https://download.brainome.ai/data/public/titanic_validate.csv', 'titanic_validate.csv')
%ls -lh titanic_validate.csv
The predictor filename is predictor_303.py
!brainome https://download.brainome.ai/data/public/titanic_train.csv -y -o predictor_303.py -modelonly -q
print('\nCreated predictor_303.py')
!ls -lh predictor_303.py
The same measurements as all previous exercises can be generated in JSON format for further system integration
Use -validate -json
to trigger the predictor to output json validation measurements.
!python3 predictor_303.py -validate titanic_validate.csv -json > validation_measurements_303.json
import json
with open('validation_measurements_303.json', 'r') as measurement_file:
validation_measurements = json.load(measurement_file)
print(json.dumps(validation_measurements, indent=4))