public final class Function
extends java.lang.Object
Constructor and Description |
---|
Function()
Constructs a function of constant value
|
Function(int attr)
Constructs a function with one attribute
|
Function(MyDataset inst)
Constucts a function with all attributes except the class in the inst
|
Modifier and Type | Method and Description |
---|---|
static Function |
combine(Function f1,
Function f2)
Constructs a new function of which the variable list is a combination of those of two functions
|
Function |
copy()
Makes a copy of a function
|
static double[] |
dVectorCopy(double[] a,
int n) |
Results |
errors(MyDataset inst)
Evaluates a function
|
int |
insignificant(double sdy,
MyDataset inst)
Detects the most insignificant variable in the funcion
|
static int[] |
iVectorCombine(int[] list1,
int[] list2) |
static int[] |
iVectorCopy(int[] a,
int n) |
double |
predict(Itemset itemset)
Returns the predicted value of itemset i by a function
|
Function |
remove(int j)
Removes a term from the function
|
java.lang.String |
toString() |
java.lang.String |
toString(MyDataset inst,
int startPoint)
Converts a function to a string
|
public Function()
public Function(MyDataset inst)
inst
- itemsetspublic Function(int attr)
attr
- an attributepublic final Function copy()
public static final double[] dVectorCopy(double[] a, int n)
public static final int[] iVectorCopy(int[] a, int n)
public final java.lang.String toString(MyDataset inst, int startPoint) throws java.lang.Exception
inst
- itemsetsstartPoint
- the starting point on the screen; used to feed line before reaching beyond 80 charactersjava.lang.Exception
- if something goes wrongpublic final java.lang.String toString()
toString
in class java.lang.Object
public static final Function combine(Function f1, Function f2)
f1
- function 1f2
- function 2public static final int[] iVectorCombine(int[] list1, int[] list2)
public final Results errors(MyDataset inst) throws java.lang.Exception
inst
- itemsetsjava.lang.Exception
- if something goes wrongpublic final double predict(Itemset itemset)
itemset
- itemset ipublic final int insignificant(double sdy, MyDataset inst)
sdy
- the standard deviation of the class variableinst
- itemsetspublic final Function remove(int j)
j
- the j-th index in the variable list in the function