util.results
Class SigmoidFunction

java.lang.Object
  extended by 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

Constructor Summary
SigmoidFunction()
           
 
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
 

Constructor Detail

SigmoidFunction

public SigmoidFunction()
Method Detail

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 predictions
y - An array which contains all classes (in most cases only 2 : +1 /-1)
numNeg - The number of negative training instances
numPos - The number of positive training instances
A_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)