Class ParamOptimizer
java.lang.Object
_global.tri.oxidationstates.fitting.ParamOptimizer
This class is used for optimizing the model parameters
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThis represents a snapshot of the parameters at one point in the optimization algorithm -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a parameter optimizer for a given set of training dataParamOptimizer(OxidationStateData data, int numThreads) Construct a parameter optimizer for a given set of training data and number of threads -
Method Summary
Modifier and TypeMethodDescriptionbatchEntries(int numBatches) Divide the entries evenly into batches, each to be handled on its own threadgetData()Returns the training datagetParameterState(LikelihoodCalculator calculator) Returns a state representing the parameters contained in the provided calculator.getParameterState(String paramFileName) Returns a state representing a set of parameters read from a filedoubleReturns the regularization parametervoidsetRegularizationParameter(double value) Sets the regularization parameter
-
Constructor Details
-
ParamOptimizer
Construct a parameter optimizer for a given set of training data- Parameters:
data- The set of training data
-
ParamOptimizer
Construct a parameter optimizer for a given set of training data and number of threads- Parameters:
data- The set of training datanumThreads- The number of threads to run on (shared memory).
-
-
Method Details
-
batchEntries
Divide the entries evenly into batches, each to be handled on its own thread- Parameters:
numBatches- The number of batches (should match the number of threads)- Returns:
- The entries in the training set divided evenly into batches
-
setRegularizationParameter
public void setRegularizationParameter(double value) Sets the regularization parameter- Parameters:
value- The regularization parameter
-
getRegularizationParamaeter
public double getRegularizationParamaeter()Returns the regularization parameter- Returns:
- the regularization parameter
-
getData
Returns the training data- Returns:
- the training data
-
getParameterState
Returns a state representing the parameters contained in the provided calculator.- Parameters:
calculator- The calculator containing the parameters and used to evaluate them.- Returns:
- a state representing a current snapshot of the parameters
-
getParameterState
Returns a state representing a set of parameters read from a file- Parameters:
paramFileName- The name of the file to read- Returns:
- a state representing a set of parameters read from a file
-