/** * Parameters Constructor * * @param dataBase Set of training data which is necessary to generate a rule * @param train Training data set with information to construct the rule base (mainly, the * training examples) */ public RuleBase(DataBase dataBase, myDataset train) { this.ruleBase = new ArrayList<Rule>(); this.dataBase = dataBase; this.train = train; this.n_variables = dataBase.numVariables(); this.fitness = 0; this.totalLabels = new int[this.n_variables]; for (int i = 0; i < this.n_variables; i++) this.totalLabels[i] = dataBase.numLabels(i); }