scripts.nn#
Functions#
|
Helper function to build a fresh model. |
|
Returns the threshold that gives the best accuracy, not a quantile but the actual threshold. |
|
Predicts the species of the test data. |
|
|
|
|
|
|
|
Helper function to train the model and return validation accuracy. |
Module Contents#
- scripts.nn.build_model(input_dim, num_classes)#
Helper function to build a fresh model.
- scripts.nn.calculate_threshold(uncertainties, y_pred_classes, y_true_classes, species_names)#
Returns the threshold that gives the best accuracy, not a quantile but the actual threshold. Thus, its value can be higher than 1.0.
- scripts.nn.predict_validation(model, X_val_bf, y_val_bf, species_names)#
Predicts the species of the test data.
- scripts.nn.prepare_for_training(TrainPanel=None, **kwargs)#
- scripts.nn.save_train_stats(model, X_val_bf, y_val_bf, species_names, model_dir, best_accuracy, fold_count, best_fold=None)#
- scripts.nn.train_neural_network(TrainPanel=None, **kwargs)#
- scripts.nn.train_wrapper(model, X_train, y_train, y_train_int, X_val, y_val, epochs, batch_size, patience)#
Helper function to train the model and return validation accuracy.