weka.filters
Interface Sourcable
-
- All Known Implementing Classes:
- AllFilter, Center, Normalize, ReplaceMissingValues, Standardize
public interface SourcableInterface for filters that can be converted to Java source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.StringtoSource(java.lang.String className, Instances data)Returns a string that describes the filter as source.
-
-
-
Method Detail
-
toSource
java.lang.String toSource(java.lang.String className, Instances data) throws java.lang.ExceptionReturns a string that describes the filter as source. The filter will be contained in a class with the given name (there may be auxiliary classes), and will contain two methods with these signatures:
where the array// converts one row public static Object[] filter(Object[] i); // converts a full dataset (first dimension is row index) public static Object[][] filter(Object[][] i);icontains elements that are either Double, String, with missing values represented as null. The generated code is public domain and comes with no warranty.- Parameters:
className- the name that should be given to the source class.data- the dataset used for initializing the filter- Returns:
- the object source described by a string
- Throws:
java.lang.Exception- if the source can't be computed
-
-
DataMelt 3.0 © DataMelt by jWork.ORG