/** * Initialize the estimator with a new dataset. Finds min and max first. * * @param data the dataset used to build this estimator * @param attrIndex attribute the estimator is for * @exception Exception if building of estimator goes wrong */ public void addValues(Instances data, int attrIndex) throws Exception { // can estimator handle the data? getCapabilities().testWithFail(data); double[] minMax = new double[2]; try { EstimatorUtils.getMinMax(data, attrIndex, minMax); } catch (Exception ex) { ex.printStackTrace(); System.out.println(ex.getMessage()); } double min = minMax[0]; double max = minMax[1]; // factor is 1.0, data set has not been reduced addValues(data, attrIndex, min, max, 1.0); }
/** * Initialize the estimator with a new dataset. Finds min and max first. * * @param data the dataset used to build this estimator * @param attrIndex attribute the estimator is for * @exception Exception if building of estimator goes wrong */ public void addValues(Instances data, int attrIndex) throws Exception { // can estimator handle the data? getCapabilities().testWithFail(data); double[] minMax = new double[2]; try { EstimatorUtils.getMinMax(data, attrIndex, minMax); } catch (Exception ex) { ex.printStackTrace(); System.out.println(ex.getMessage()); } double min = minMax[0]; double max = minMax[1]; // factor is 1.0, data set has not been reduced addValues(data, attrIndex, min, max, 1.0); }
EstimatorUtils.getMinMax(data, attrIndex, minMax); } catch (Exception ex) { ex.printStackTrace();
EstimatorUtils.getMinMax(data, attrIndex, minMax); } catch (Exception ex) { ex.printStackTrace();