gov.sandia.cognition.learning.algorithm.regression
Class LogisticRegression.Function

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.util.DefaultPair<Evaluator<? super InputType,? extends IntermediateType>,Evaluator<? super IntermediateType,? extends OutputType>>
          extended by gov.sandia.cognition.evaluator.CompositeEvaluatorPair<Vectorizable,Double,Double>
              extended by gov.sandia.cognition.learning.algorithm.regression.LogisticRegression.Function
All Implemented Interfaces:
Evaluator<Vectorizable,Double>, Vectorizable, CloneableSerializable, Pair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>, Serializable, Cloneable
Enclosing class:
LogisticRegression

public static class LogisticRegression.Function
extends CompositeEvaluatorPair<Vectorizable,Double,Double>
implements Vectorizable

Class that is a linear discriminant, followed by a sigmoid function.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.util.DefaultPair
first, second
 
Constructor Summary
LogisticRegression.Function(int dimensionality)
          Creates a new instance of Function
 
Method Summary
 LogisticRegression.Function clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 void convertFromVector(Vector parameters)
          Converts the object from a Vector of parameters.
 Vector convertToVector()
          Converts the object to a vector.
 LinearDiscriminantWithBias getFirst()
          Gets the first object.
 LogisticDistribution.CDF getSecond()
          Gets the second object.
 
Methods inherited from class gov.sandia.cognition.evaluator.CompositeEvaluatorPair
create, evaluate
 
Methods inherited from class gov.sandia.cognition.util.DefaultPair
create, equals, equals, hashCode, mergeCollections, setFirst, setSecond
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogisticRegression.Function

public LogisticRegression.Function(int dimensionality)
Creates a new instance of Function

Parameters:
dimensionality - Dimensionality of the inputs
Method Detail

clone

public LogisticRegression.Function clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface Vectorizable
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class DefaultPair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>
Returns:
A clone of this object.

convertToVector

public Vector convertToVector()
Description copied from interface: Vectorizable
Converts the object to a vector.

Specified by:
convertToVector in interface Vectorizable
Returns:
The Vector form of the object.

convertFromVector

public void convertFromVector(Vector parameters)
Description copied from interface: Vectorizable
Converts the object from a Vector of parameters.

Specified by:
convertFromVector in interface Vectorizable
Parameters:
parameters - The parameters to incorporate.

getFirst

public LinearDiscriminantWithBias getFirst()
Description copied from class: DefaultPair
Gets the first object.

Specified by:
getFirst in interface Pair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>
Overrides:
getFirst in class DefaultPair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>
Returns:
The first object.

getSecond

public LogisticDistribution.CDF getSecond()
Description copied from class: DefaultPair
Gets the second object.

Specified by:
getSecond in interface Pair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>
Overrides:
getSecond in class DefaultPair<Evaluator<? super Vectorizable,? extends Double>,Evaluator<? super Double,? extends Double>>
Returns:
The second object.