Neural Network

This model is … by default we use this many layer/nodes etc etc. In the context of Olympus it has the advantage/disadvantage of …

class olympus.models.NeuralNet(scope='model', hidden_depth=3, hidden_nodes=48, hidden_act='leaky_relu', out_act='linear', l2_activity=0.001, gaussian_dropout=0.0, dropout=0.1, learning_rate=0.001, pred_int=100, reg=0.001, es_patience=100, max_epochs=100000, batch_size=20)[source]

Neural network model.

Parameters
  • scope (str) – TensorFlow scope.

  • hidden_depth (int) – Number of hidden layers.

  • hidden_nodes (int) – Number of hidden nodes per layer.

  • hidden_act (str) – Hidden activation function. Available options are ‘linear’, ‘leaky_relu’, ‘relu’, ‘softmax’, ‘softplus’, ‘softsign’, ‘sigmoid’.

  • out_act (str) – Output activation function. Available options are ‘linear’, ‘leaky_relu’, ‘relu’, ‘softmax’, ‘softplus’, ‘softsign’, ‘sigmoid’.

  • l2_activity (float) – L2 regularization.

  • learning_rate (float) – Learning rate.

  • pred_int (int) – Frequency with which we make predictions on the validation/training set (in number of epochs).

  • reg (float) –

    ???

  • es_patience (int) – Early stopping patience.

  • max_epochs (int) – Maximum number of epochs allowed.

  • batch_size (int) – Size batches used for training.

Methods

train(train_features, train_targets, …[, plot])

param train_features

features of the training set.

predict(features[, num_samples])

Method that returns a prediction.

predict(features, num_samples=1)

Method that returns a prediction. We expect some standard output from this method.

train(train_features, train_targets, valid_features, valid_targets, model_path, plot=False)
Parameters
  • train_features – features of the training set.

  • train_targets – targets of the training set.

  • valid_features – features of the validation/test set, used for early stopping.

  • valid_targets – targets of the validation/test set, used for early stopping.

  • model_path (str) – where the TensorFlow checkpoints will be written.

  • plot (bool) – whether to show scatter plots of the training progression.

  • feature_transformer

  • target_transformer

Returns

best r2 score on training set max_valid_r2: best r2 score on validation set

Return type

max_train_r2