source: src/main/java/weka/attributeSelection/AttributeTransformer.java @ 6

Last change on this file since 6 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 2.2 KB
Line 
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 *    AttributeTransformer.java
19 *    Copyright (C) 2000 University of Waikato, Hamilton, New Zealand
20 *
21 */
22
23package weka.attributeSelection;
24
25import weka.core.Instance;
26import weka.core.Instances;
27
28/**
29 * Abstract attribute transformer. Transforms the dataset.
30 *
31 * @author Mark Hall (mhall@cs.waikato.ac.nz)
32 * @version $Revision: 4613 $
33 */
34public interface AttributeTransformer {
35    // ===============
36    // Public methods.
37    // ===============
38
39  /**
40   * Returns just the header for the transformed data (ie. an empty
41   * set of instances. This is so that AttributeSelection can
42   * determine the structure of the transformed data without actually
43   * having to get all the transformed data through getTransformedData().
44   * @return the header of the transformed data.
45   * @exception Exception if the header of the transformed data can't
46   * be determined.
47   */
48  Instances transformedHeader() throws Exception;
49
50  /**
51   * Transform the supplied data set (assumed to be the same format
52   * as the training data)
53   * @return A set of instances representing the transformed data
54   * @exception Exception if the attribute could not be evaluated
55   */
56  Instances transformedData(Instances data) throws Exception;
57
58  /**
59   * Transforms an instance in the format of the original data to the
60   * transformed space
61   * @return a transformed instance
62   * @exception Exception if the instance could not be transformed
63   */
64  Instance convertInstance(Instance instance) throws Exception;
65}
Note: See TracBrowser for help on using the repository browser.