/** * Initialize the estimator using only the instance of one class. It is using * the values of one attribute only. * * @param data the dataset used to build this estimator * @param attrIndex attribute the estimator is for * @param classIndex index of the class attribute * @param classValue the class value * @param min minimal value of this attribute * @param max maximal value of this attribute * @exception Exception if building of estimator goes wrong */ public void addValues(Instances data, int attrIndex, int classIndex, int classValue, double min, double max) throws Exception { // extract the instances with the given class value Instances workData = new Instances(data, 0); double factor = getInstancesFromClass(data, attrIndex, classIndex, classValue, workData); // if no data return if (workData.numInstances() == 0) { return; } addValues(data, attrIndex, min, max, factor); }
/** * Initialize the estimator using only the instance of one class. It is using * the values of one attribute only. * * @param data the dataset used to build this estimator * @param attrIndex attribute the estimator is for * @param classIndex index of the class attribute * @param classValue the class value * @param min minimal value of this attribute * @param max maximal value of this attribute * @exception Exception if building of estimator goes wrong */ public void addValues(Instances data, int attrIndex, int classIndex, int classValue, double min, double max) throws Exception { // extract the instances with the given class value Instances workData = new Instances(data, 0); double factor = getInstancesFromClass(data, attrIndex, classIndex, classValue, workData); // if no data return if (workData.numInstances() == 0) { return; } addValues(data, attrIndex, min, max, factor); }
double factor = getInstancesFromClass(data, attrIndex, classIndex, classValue, workData);
double factor = getInstancesFromClass(data, attrIndex, classIndex, classValue, workData);