All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.m5.Function
java.lang.Object
|
+----weka.classifiers.m5.Function
- public final class Function
- extends Object
- implements Serializable
Class for handling a linear function.
- Version:
- $Revision: 1.2 $
- Author:
- Yong Wang (yongwang@cs.waikato.ac.nz)
-
Function()
- Constructs a function of constant value
-
Function(Instances)
- Constucts a function with all attributes except the class in the inst
-
Function(int)
- Constructs a function with one attribute
-
combine(Function, Function)
- Constructs a new function of which the variable list is a combination of those of two functions
-
copy()
- Makes a copy of a function
-
errors(Instances)
- Evaluates a function
-
insignificant(double, Instances)
- Detects the most insignificant variable in the funcion
-
predict(Instance)
- Returns the predicted value of instance i by a function
-
remove(int)
- Removes a term from the function
-
toString(Instances, int)
- Converts a function to a string
Function
public Function()
- Constructs a function of constant value
Function
public Function(Instances inst)
- Constucts a function with all attributes except the class in the inst
- Parameters:
- inst - instances
Function
public Function(int attr)
- Constructs a function with one attribute
- Parameters:
- attr - an attribute
copy
public final Function copy()
- Makes a copy of a function
- Returns:
- the copy of the function
toString
public final String toString(Instances inst,
int startPoint) throws Exception
- Converts a function to a string
- Parameters:
- inst - instances
- startPoint - the starting point on the screen; used to feed line before reaching beyond 80 characters
- Returns:
- the converted string
- Throws: Exception
- if something goes wrong
combine
public static final Function combine(Function f1,
Function f2)
- Constructs a new function of which the variable list is a combination of those of two functions
- Parameters:
- f1 - function 1
- f2 - function 2
- Returns:
- the newly constructed function
errors
public final Errors errors(Instances inst) throws Exception
- Evaluates a function
- Parameters:
- inst - instances
- Returns:
- the evaluation results
- Throws: Exception
- if something goes wrong
predict
public final double predict(Instance instance)
- Returns the predicted value of instance i by a function
- Parameters:
- i - instance i
- inst - instances
- Returns:
- the predicted value
insignificant
public final int insignificant(double sdy,
Instances inst)
- Detects the most insignificant variable in the funcion
- Parameters:
- sdy - the standard deviation of the class variable
- inst - instances
- Returns:
- the index of the most insignificant variable in the function
remove
public final Function remove(int j)
- Removes a term from the function
- Parameters:
- j - the j-th index in the variable list in the function
- Returns:
- the new function with the term removed
All Packages Class Hierarchy This Package Previous Next Index WEKA's home