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.
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.
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.
19
* Copyright (C) 2002 University of Waikato, Hamilton, New Zealand
23
package weka.gui.boundaryvisualizer;
28
* Interface to something that can generate new instances based on
29
* a set of input instances
31
* @author <a href="mailto:mhall@cs.waikato.ac.nz">Mark Hall</a>
32
* @version $Revision: 1.4 $
35
public interface DataGenerator {
38
* Build the data generator
40
* @param inputInstances Instances to build the generator from
41
* @exception Exception if an error occurs
43
void buildGenerator(Instances inputInstances) throws Exception;
46
* Generate an instance. Should return a new Instance object
48
* @return an <code>Instance</code> value
49
* @exception Exception if an error occurs
51
double [][] generateInstances(int [] indices) throws Exception;
56
double [] getWeights() throws Exception;
59
* Set the dimensions to be used in computing a weight for
60
* each instance generated
62
* @param dimensions an array of booleans specifying the dimensions to
63
* be used when computing instance weights
65
void setWeightingDimensions(boolean [] dimensions);
68
* Set the values of the dimensions (chosen via setWeightingDimensions)
69
* to be used when computing instance weights
71
* @param vals a <code>double[]</code> value
73
void setWeightingValues(double [] vals);
76
* Returns the number of generating models used by this DataGenerator
78
* @return an <code>int</code> value
80
int getNumGeneratingModels();
83
* Set a seed for random number generation (if needed).
85
* @param seed an <code>int</code> value
87
void setSeed(int seed);