util.results
Class SigmoidFunction
java.lang.Object
util.results.SigmoidFunction
public class SigmoidFunction
- extends java.lang.Object
Class that computes the alfa and beta values for a sigmoid function.
Code is taken from original SpliceMachine code.
- Author:
- Michiel Van Bel,Sven Degroeve, Yvan Saeys
Method Summary |
double |
Log(double number)
|
double |
Log2(double number)
|
static void |
main(java.lang.String[] args)
|
void |
trainSigmoid(double[] out,
double[] y,
int numNeg,
int numPos,
java.lang.Double[] A_B)
Computes the sigmoid function for data, and stores the resulting A and B values
in a passed Parameter. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SigmoidFunction
public SigmoidFunction()
main
public static void main(java.lang.String[] args)
trainSigmoid
public void trainSigmoid(double[] out,
double[] y,
int numNeg,
int numPos,
java.lang.Double[] A_B)
- Computes the sigmoid function for data, and stores the resulting A and B values
in a passed Parameter. Coding style is C-like (but it is just C-code revamped
as Java code).
- Parameters:
out
- The distances to the SVM hyperplane from the predictionsy
- An array which contains all classes (in most cases only 2 : +1 /-1)numNeg
- The number of negative training instancesnumPos
- The number of positive training instancesA_B
- The resulting array which contains at the first position the A value, and at
the second position it contains the B value.
Log
public double Log(double number)
Log2
public double Log2(double number)