Examples

Each example is a Jupyter notebook. Download it to run it yourself, or open it in Google Colab and add %pip install djinnml as the first cell. The notebooks take a minute or two each on a laptop CPU.

Notebook

What it covers

Get it

Quickstart: regression

Regression on California housing: the hyperparameter search, fit, predict, score, then save, load and continue_training.

.ipynb · Colab

Classification

Wine cultivars with string labels: predict_proba, classes_ and a confusion matrix.

.ipynb · Colab

Multiple outputs

Predicting the range and height of a projectile together.

.ipynb · Colab

Uncertainty with Bayesian DJINN

Bayesian DJINN with dropout: prediction intervals with bma_predict and checking how often they cover the true values.

.ipynb · Colab

Using DJINN with scikit-learn

DataFrames, Pipeline, ColumnTransformer, cross_val_score against a random forest and gradient boosting, GridSearchCV and pickling.

.ipynb · Colab

How DJINN builds a network from a tree

Step by step: grow a tree, map it to a network, look at the starting weights, then train.

.ipynb · Colab