| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IntervalEstimator |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * This program is free software: you can redistribute it and/or modify | |
| 3 | * it under the terms of the GNU General Public License as published by | |
| 4 | * the Free Software Foundation, either version 3 of the License, or | |
| 5 | * (at your option) any later version. | |
| 6 | * | |
| 7 | * This program is distributed in the hope that it will be useful, | |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 10 | * GNU General Public License for more details. | |
| 11 | * | |
| 12 | * You should have received a copy of the GNU General Public License | |
| 13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 14 | */ | |
| 15 | ||
| 16 | /* | |
| 17 | * IntervalEstimator.java | |
| 18 | * Copyright (C) 2005-2012 University of Waikato, Hamilton, New Zealand | |
| 19 | * | |
| 20 | */ | |
| 21 | ||
| 22 | package weka.classifiers; | |
| 23 | ||
| 24 | import weka.core.Instance; | |
| 25 | ||
| 26 | /** | |
| 27 | * Interface for numeric prediction schemes that can output prediction | |
| 28 | * intervals. | |
| 29 | * | |
| 30 | * @author Kurt Driessens (kurtd@cs.waikato.ac.nz) | |
| 31 | * @version $Revision: 8034 $ | |
| 32 | */ | |
| 33 | public interface IntervalEstimator { | |
| 34 | ||
| 35 | /** | |
| 36 | * Returns an N * 2 array, where N is the number of prediction | |
| 37 | * intervals. In each row, the first element contains the lower | |
| 38 | * boundary of the corresponding prediction interval and the second | |
| 39 | * element the upper boundary. | |
| 40 | * | |
| 41 | * @param inst the instance to make the prediction for. | |
| 42 | * @param confidenceLevel the percentage of cases that the interval should cover. | |
| 43 | * @return an array of prediction intervals | |
| 44 | * @exception Exception if the intervals can't be computed | |
| 45 | */ | |
| 46 | double[][] predictIntervals(Instance inst, double confidenceLevel) throws Exception; | |
| 47 | } | |
| 48 |