/****************************************************************************************/ /* */ /* Project : 1D-BRNN */ /* Release : 3.3 */ /* */ /* File : Options.h */ /* Description : Options to train or retrain a BRNN model */ /* */ /* Author(s) : Christophe Magnan (2013) - New generic version */ /* : Jianlin Cheng (2003) - New custom version for SCRATCH */ /* : Gianluca Pollastri (2001) - Customized version for SCRATCH */ /* : Paolo Frasconi (1997) - Initial generic version */ /* */ /* Copyright : Institute for Genomics and Bioinformatics */ /* University of California, Irvine */ /* */ /* Modified : 2015/07/01 */ /* */ /****************************************************************************************/ #include "Import.h" class Options { public: // Model Options int FEATURES; // Number of data features in input of the BRNN int CLASSES; // Number of target classes in output of the BRNN int HIDDEN; // Number of hidden nodes in the main network of the BRNN int CONTEXT_FWD; // Number of adjacent positions s.t. outputs of forward network -> inputs of main network int CONTEXT_BWD; // Number of adjacent positions s.t. outputs of backward network -> inputs of main network int OUTPUTS_FWD; // Number of output nodes in the forward network of the BRNN int OUTPUTS_BWD; // Number of output nodes in the backward network of the BRNN int HIDDEN_FWD; // Number of hidden nodes in the forward network of the BRNN int HIDDEN_BWD; // Number of hidden nodes in the backward network of the BRNN // Training Options float LEARN_RATE; // Learning rate - controls the weights update during the maximization step int NUM_EPOCHS; // Number of training periods to run with or without the adaptative procedure int NUM_BATCHS; // Number of model updates by training period (dataset divided in batchs) int ADAP_EPOCHS; // Number of periods without improvement before decreasing the learning rate int ADAP_RELOAD; // Reload the last model saved when the adaptative procedure starts int SHUFFLE; // Shuffle the training dataset before each training period int SEED; // Seed for randomization functions (0 to generate it automatically) // Interface Options(); ~Options(); void display(); void load(char* filein,int model); private: // Methods void check_model_viability(); void check_training_viability(); };