|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.Neuro.SVM.SVM
SciLib.Neuro.SVM.BSVM
public class BSVM
| Field Summary | |
|---|---|
protected int |
c1
|
protected int |
c2
|
| Fields inherited from class SciLib.Neuro.SVM.SVM |
|---|
alpha, B, b_low, b_up, binary, C, eps, error_cache, file, GACV1, i_low, i_up, JHB, K, M, N, patterns, sparse, sv, svIndex, targets, tolerance |
| Constructor Summary | |
|---|---|
BSVM(FileHandler file,
boolean transf,
int c1)
Constructor |
|
BSVM(FileHandler file,
Kernel K,
boolean transf,
int c1)
Constructor |
|
BSVM(matrix patterns,
integerVector targets,
Kernel K)
Constructor |
|
BSVM(matrix patterns,
integerVector targets,
Kernel K,
boolean transf,
int c1)
Constructor |
|
BSVM(matrix patterns,
integerVector targets,
Kernel K,
int c1,
int c2)
Constructor |
|
| Method Summary | |
|---|---|
void |
crossValidation(int k,
double startLog2C,
int cs,
double startLambda,
int ls,
double a,
double b)
cross-validation |
void |
doneTransf()
|
boolean |
doneTransform()
|
int |
getC1()
|
int |
getC2()
|
void |
LOOValidation(int type,
double[] cPar,
double[] lambdaPar,
double a,
double b)
|
void |
LOOValidation(int type,
double startLog2C,
int cs,
double startLambda,
int ls,
double a,
double b)
Leave-one-out-validation |
int |
misclassified(matrix p,
integerVector t)
|
double |
testing(FileHandler testFile)
test svm without scaling method |
double |
testing(FileHandler testFile,
double a,
double b)
test svm with scaling method |
double |
testing(FileHandler testFile,
java.lang.String alphaFile)
test svm without scaling method |
double |
testing(FileHandler testFile,
java.lang.String alphaFile,
double a,
double b)
test svm with scaling method |
void |
training(java.lang.String alphaFile)
the training algorithm with no cross validation and no scaling |
void |
training(java.lang.String alphaFile,
double a,
double b)
training svm with the data scaled between a, b ( a < b ) |
| Methods inherited from class SciLib.Neuro.SVM.SVM |
|---|
computeB, f, f, getAlpha, getB, getC, getEpsi, getFile, getKernel, getNoOfSV, getPatterns, getSV, getSVIndex, getTargets, getTolerance, initialize, initiateParameter, isBinary, isInI0I1I2, isInI0I3I4, isInI1I2, isInI3I4, isSparse, makeTargets, readSVs, setB, setC, setEpsi, setFile, setKernel, setN, setTolerance, writeReport, writeResultToFile |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int c1
protected int c2
| Constructor Detail |
|---|
public BSVM(FileHandler file,
Kernel K,
boolean transf,
int c1)
file - the file that handles training data, FileHandlerK - the kernel of SVM, Kerneltransf - convert the target data to the form of 1 and -1, booleanc1 - will be convert to 1, int
public BSVM(FileHandler file,
boolean transf,
int c1)
file - the file that handles training data, FileHandlertransf - convert the target data to the form of 1 and -1, booleanc1 - will be convert to 1, int
public BSVM(matrix patterns,
integerVector targets,
Kernel K,
boolean transf,
int c1)
patterns - the training data, matrixtargets - labels of the training data, integerVectorK - the kernel of SVM, Kerneltransf - convert the target data to the form of 1 and -1, booleanc1 - will be convert to 1, int
public BSVM(matrix patterns,
integerVector targets,
Kernel K,
int c1,
int c2)
patterns - the training data, matrixtargets - labels of the training data, integerVectorK - the kernel of SVM, Kernelc1 - will be convert to 1, intc2 - will be convert to -1, int
public BSVM(matrix patterns,
integerVector targets,
Kernel K)
patterns - the training data, matrixtargets - labels of the training data, integerVectorK - the kernel of SVM, Kernel| Method Detail |
|---|
public boolean doneTransform()
public void doneTransf()
public int getC1()
public int getC2()
public void training(java.lang.String alphaFile)
training in interface SMOtraining in class SVMalphaFile - fileName for store the support vectors
public void training(java.lang.String alphaFile,
double a,
double b)
training in interface SMOtraining in class SVMalphaFile - fileName for store the support vectorsa - the lower bound of scaled datab - the upper bound of scaled data
public void crossValidation(int k,
double startLog2C,
int cs,
double startLambda,
int ls,
double a,
double b)
crossValidation in interface SMOcrossValidation in class SVMk - k-fold cross validation k > 1startLog2C - log2 of the start value of C, doublecs - the size of the set that contains all C, intstartLambda - log2 of the start value of lambda, doublels - the size of the set that contains all lambdas, inta - the lower bound of scaled datab - the upper bound of scaled data
public int misclassified(matrix p,
integerVector t)
misclassified in interface SMOmisclassified in class SVMpublic double testing(FileHandler testFile)
testing in interface SMOtesting in class SVMtestFile - FileHandler handles the test file data
public double testing(FileHandler testFile,
double a,
double b)
testing in interface SMOtesting in class SVMtestFile - FileHandler handles the test file dataa - the lower bound of scaled datab - the upper bound of scaled data
public double testing(FileHandler testFile,
java.lang.String alphaFile)
testing in interface SMOtesting in class SVMtestFile - FileHandler handles the test file dataalphaFile - the file name of the file that stores support vectors
public double testing(FileHandler testFile,
java.lang.String alphaFile,
double a,
double b)
testing in interface SMOtesting in class SVMtestFile - FileHandler handles the test file dataalphaFile - the file name of the file that stores support vectorsa - the lower bound of scaled datab - the upper bound of scaled data
public void LOOValidation(int type,
double startLog2C,
int cs,
double startLambda,
int ls,
double a,
double b)
LOOValidation in interface SMOLOOValidation in class SVMtype - method of LOO validation, constant JHB, GACV1. etc.startLog2C - log2 of the start value of C, doublecs - the size of the set that contains all C, intstartLambda - log2 of the start value of lambda, doublels - the size of the set that contains all lambdas, inta - the lower bound of scaled datab - the upper bound of scaled data
public void LOOValidation(int type,
double[] cPar,
double[] lambdaPar,
double a,
double b)
LOOValidation in interface SMOLOOValidation in class SVM
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||