|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DifferentiableSequenceScore
This interface is the main part of any ScoreClassifier
.
Field Summary | |
---|---|
static int |
UNKNOWN
Indicates that the number of parameters of this DifferentiableSequenceScore
is not known (yet). |
Method Summary | |
---|---|
DifferentiableSequenceScore |
clone()
Creates a clone (deep copy) of the current DifferentiableSequenceScore
instance. |
double[] |
getCurrentParameterValues()
Returns a double array of dimension
getNumberOfParameters() containing the current parameter values. |
double |
getInitialClassParam(double classProb)
Returns the initial class parameter for the class this DifferentiableSequenceScore is responsible for, based on the class
probability classProb . |
double |
getLogScoreAndPartialDerivation(Sequence seq,
int start,
int end,
IntList indices,
DoubleList partialDer)
Returns the logarithmic score for a Sequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations. |
double |
getLogScoreAndPartialDerivation(Sequence seq,
int start,
IntList indices,
DoubleList partialDer)
Returns the logarithmic score for a Sequence beginning at
position start in the Sequence and fills lists with
the indices and the partial derivations. |
double |
getLogScoreAndPartialDerivation(Sequence seq,
IntList indices,
DoubleList partialDer)
Returns the logarithmic score for a Sequence seq and
fills lists with the indices and the partial derivations. |
int |
getNumberOfParameters()
Returns the number of parameters in this DifferentiableSequenceScore . |
int |
getNumberOfRecommendedStarts()
This method returns the number of recommended optimization starts. |
void |
initializeFunction(int index,
boolean freeParams,
DataSet[] data,
double[][] weights)
This method creates the underlying structure of the DifferentiableSequenceScore . |
void |
initializeFunctionRandomly(boolean freeParams)
This method initializes the DifferentiableSequenceScore randomly. |
void |
setParameters(double[] params,
int start)
This method sets the internal parameters to the values of params between start and
start + |
Methods inherited from interface de.jstacs.sequenceScores.SequenceScore |
---|
getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized |
Methods inherited from interface de.jstacs.Storable |
---|
toXML |
Field Detail |
---|
static final int UNKNOWN
DifferentiableSequenceScore
is not known (yet).
Method Detail |
---|
DifferentiableSequenceScore clone() throws CloneNotSupportedException
DifferentiableSequenceScore
instance.
clone
in interface SequenceScore
DifferentiableSequenceScore
CloneNotSupportedException
- if something went wrong while cloning the
DifferentiableSequenceScore
void initializeFunction(int index, boolean freeParams, DataSet[] data, double[][] weights) throws Exception
DifferentiableSequenceScore
.
index
- the index of the class the DifferentiableSequenceScore
modelsfreeParams
- indicates whether the (reduced) parameterization is useddata
- the samplesweights
- the weights of the sequences in the samples
Exception
- if something went wrongvoid initializeFunctionRandomly(boolean freeParams) throws Exception
DifferentiableSequenceScore
randomly. It has to
create the underlying structure of the DifferentiableSequenceScore
.
freeParams
- indicates whether the (reduced) parameterization is used
Exception
- if something went wrongdouble getLogScoreAndPartialDerivation(Sequence seq, IntList indices, DoubleList partialDer)
Sequence
seq
and
fills lists with the indices and the partial derivations.
seq
- the Sequence
indices
- an IntList
of indices, after method invocation the
list should contain the indices i
where
partialDer
- a DoubleList
of partial derivations, after method
invocation the list should contain the corresponding
Sequence
double getLogScoreAndPartialDerivation(Sequence seq, int start, IntList indices, DoubleList partialDer)
Sequence
beginning at
position start
in the Sequence
and fills lists with
the indices and the partial derivations.
seq
- the Sequence
start
- the start position in the Sequence
indices
- an IntList
of indices, after method invocation the
list should contain the indices i where
partialDer
- a DoubleList
of partial derivations, after method
invocation the list should contain the corresponding
Sequence
double getLogScoreAndPartialDerivation(Sequence seq, int start, int end, IntList indices, DoubleList partialDer) throws Exception
Sequence
beginning at
position start
in the Sequence
and fills lists with
the indices and the partial derivations.
seq
- the Sequence
start
- the start position in the Sequence
end
- the end position (inclusive) in the Sequence
indices
- an IntList
of indices, after method invocation the
list should contain the indices i where
partialDer
- a DoubleList
of partial derivations, after method
invocation the list should contain the corresponding
Sequence
Exception
- if, for instance, the subsequence length can not be handledint getNumberOfParameters()
DifferentiableSequenceScore
. If the
number of parameters is not known yet, the method returns
UNKNOWN
.
DifferentiableSequenceScore
UNKNOWN
int getNumberOfRecommendedStarts()
double[] getCurrentParameterValues() throws Exception
double
array of dimension
getNumberOfParameters()
containing the current parameter values.
If one likes to use these parameters to start an optimization it is
highly recommended to invoke
initializeFunction(int, boolean, DataSet[], double[][])
before.
After an optimization this method can be used to get the current
parameter values.
Exception
- if no parameters exist (yet)void setParameters(double[] params, int start)
params
between start
and
start + getNumberOfParameters()
- 1
params
- the new parametersstart
- the start index in params
double getInitialClassParam(double classProb)
DifferentiableSequenceScore
is responsible for, based on the class
probability classProb
.
classProb
- the class probability
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |