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 | * CARuleMiner.java |
---|
19 | * Copyright (C) 2004 University of Waikato, Hamilton, New Zealand |
---|
20 | * |
---|
21 | */ |
---|
22 | |
---|
23 | package weka.associations; |
---|
24 | |
---|
25 | import weka.core.FastVector; |
---|
26 | import weka.core.Instances; |
---|
27 | import weka.core.OptionHandler; |
---|
28 | |
---|
29 | /** |
---|
30 | * Interface for learning class association rules. All schemes for learning |
---|
31 | * class association rules implemement this interface. |
---|
32 | * |
---|
33 | * @author Stefan Mutter (mutter@cs.waikato.ac.nz) |
---|
34 | * @version $Revision: 1.3 $ |
---|
35 | */ |
---|
36 | public interface CARuleMiner extends OptionHandler { |
---|
37 | |
---|
38 | /** |
---|
39 | * Method for mining class association rules. |
---|
40 | * Must initialize all fields of the CARuleMiner that are not being set via options (ie. multiple calls of mineCARs |
---|
41 | * must always lead to the same result). Must not change the dataset in any way. |
---|
42 | * @param data the insatnces for which class association rules are mined |
---|
43 | * @throws Exception throws exception if class association rules cannot be mined |
---|
44 | * @return class association rules and their scoring metric in an FastVector array |
---|
45 | */ |
---|
46 | public FastVector[] mineCARs(Instances data) throws Exception; |
---|
47 | |
---|
48 | /** |
---|
49 | * Gets the instances without the class attribute |
---|
50 | * @return the instances withoput the class attribute |
---|
51 | */ |
---|
52 | public Instances getInstancesNoClass(); |
---|
53 | |
---|
54 | /** |
---|
55 | * Gets the class attribute and its values for all instances |
---|
56 | * @return the class attribute and its values for all instances |
---|
57 | */ |
---|
58 | public Instances getInstancesOnlyClass(); |
---|
59 | |
---|
60 | /** |
---|
61 | * Gets name of the scoring metric used for car mining |
---|
62 | * @return string containing the name of the scoring metric |
---|
63 | */ |
---|
64 | public String metricString(); |
---|
65 | |
---|
66 | /** |
---|
67 | * Sets the class index for the class association rule miner |
---|
68 | * @param index the class index |
---|
69 | */ |
---|
70 | public void setClassIndex(int index); |
---|
71 | |
---|
72 | } |
---|