[4] | 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 2 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, write to the Free Software |
---|
| 14 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | /* |
---|
| 18 | * Prediction.java |
---|
| 19 | * Copyright (C) 2002 University of Waikato, Hamilton, New Zealand |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | package weka.classifiers.evaluation; |
---|
| 24 | |
---|
| 25 | /** |
---|
| 26 | * Encapsulates a single evaluatable prediction: the predicted value plus the |
---|
| 27 | * actual class value. |
---|
| 28 | * |
---|
| 29 | * @author Len Trigg (len@reeltwo.com) |
---|
| 30 | * @version $Revision: 5987 $ |
---|
| 31 | */ |
---|
| 32 | public interface Prediction { |
---|
| 33 | |
---|
| 34 | /** |
---|
| 35 | * Constant representing a missing value. This should have the same value |
---|
| 36 | * as weka.core.Instance.MISSING_VALUE |
---|
| 37 | */ |
---|
| 38 | double MISSING_VALUE |
---|
| 39 | = weka.core.Utils.missingValue(); |
---|
| 40 | |
---|
| 41 | /** |
---|
| 42 | * Gets the weight assigned to this prediction. This is typically the weight |
---|
| 43 | * of the test instance the prediction was made for. |
---|
| 44 | * |
---|
| 45 | * @return the weight assigned to this prediction. |
---|
| 46 | */ |
---|
| 47 | double weight(); |
---|
| 48 | |
---|
| 49 | /** |
---|
| 50 | * Gets the actual class value. |
---|
| 51 | * |
---|
| 52 | * @return the actual class value, or MISSING_VALUE if no |
---|
| 53 | * prediction was made. |
---|
| 54 | */ |
---|
| 55 | double actual(); |
---|
| 56 | |
---|
| 57 | /** |
---|
| 58 | * Gets the predicted class value. |
---|
| 59 | * |
---|
| 60 | * @return the predicted class value, or MISSING_VALUE if no |
---|
| 61 | * prediction was made. |
---|
| 62 | */ |
---|
| 63 | double predicted(); |
---|
| 64 | |
---|
| 65 | } |
---|