public abstract class REpiceaPredictor extends SensitivityAnalysisParameter<ModelParameterEstimates>
Modifier and Type | Class and Description |
---|---|
protected static class |
REpiceaPredictor.CruiseLine
This class creates a fake subject for cruise line random effects.
|
static class |
REpiceaPredictor.ErrorTermGroup |
protected static class |
REpiceaPredictor.IntervalNestedInPlotDefinition
This class creates a fake subject for interval random effects nested in the plots.
|
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<java.lang.Integer> |
DefaultZeroIndex |
protected boolean |
isRandomEffectsVariabilityEnabled |
protected boolean |
isResidualVariabilityEnabled |
protected java.util.concurrent.CopyOnWriteArrayList<REpiceaPredictorListener> |
listeners |
protected Matrix |
oXVector |
isParametersVariabilityEnabled
Modifier | Constructor and Description |
---|---|
protected |
REpiceaPredictor(boolean isParametersVariabilityEnabled,
boolean isRandomEffectsVariabilityEnabled,
boolean isResidualVariabilityEnabled)
General constructor for all combinations of uncertainty sources.
|
Modifier and Type | Method and Description |
---|---|
void |
addModelBasedSimulatorListener(REpiceaPredictorListener listener)
This method adds the listener instance to the list of listeners.
|
protected boolean |
doBlupsExistForThisSubject(MonteCarloSimulationCompliantObject subject) |
protected boolean |
doesThisSubjectHaveResidualErrorTerm(MonteCarloSimulationCompliantObject subject) |
protected boolean |
doRandomDeviatesExistForThisSubject(MonteCarloSimulationCompliantObject subject) |
protected void |
fireModelBasedSimulatorEvent(REpiceaPredictorEvent event) |
protected void |
fireRandomEffectDeviateGeneratedEvent(MonteCarloSimulationCompliantObject subject,
Estimate<? extends StandardGaussianDistribution> originalRandomEffects,
Matrix randomDeviates) |
protected Estimate<? extends StandardGaussianDistribution> |
getBlupsForThisSubject(MonteCarloSimulationCompliantObject subject)
This method returns the blups for the subject or nothing if there is no blups for this subject
|
protected REpiceaPredictor.CruiseLine |
getCruiseLineForThisSubject(java.lang.String cruiseLineID,
MonteCarloSimulationCompliantObject stand)
This method checks if a cruise line exists for this plot
|
protected java.util.Map<java.lang.String,Estimate<? extends StandardGaussianDistribution>> |
getDefaultRandomEffects() |
protected Estimate<? extends StandardGaussianDistribution> |
getDefaultRandomEffects(HierarchicalLevel level) |
protected GaussianErrorTermEstimate |
getDefaultResidualError(java.lang.Enum<?> enumVar) |
protected GaussianErrorTermList |
getGaussianErrorTerms(MonteCarloSimulationCompliantObject subject) |
protected REpiceaPredictor.IntervalNestedInPlotDefinition |
getIntervalNestedInPlotDefinition(MonteCarloSimulationCompliantObject stand,
int date)
This method checks if the interval definition is available for the stand at that date.
|
protected Matrix |
getParametersForThisRealization(MonteCarloSimulationCompliantObject subject)
This method calls the setSpecificParametersDeviateForThisRealization method if the parameter variability is enabled and returns
a realization-specific simulated vector of model parameters.
|
protected Matrix |
getRandomEffectsForThisSubject(MonteCarloSimulationCompliantObject subject)
This method calls the setSpecificPlotRandomEffectsForThisStand method if the random effects variability is enabled and returns
a stand-specific simulated vector of random effects.
|
protected Matrix |
getResidualError()
This method returns the residual error under the assumption of iid and that the error is unique for all groups.
|
protected Matrix |
getResidualErrorForThisSubject(MonteCarloSimulationCompliantObject subject,
java.lang.Enum<?> group)
This method returns the residual error or the vector of residual errors associated with the subjectId.
|
protected java.lang.String |
getSubjectPlusMonteCarloSpecificId(MonteCarloSimulationCompliantObject object) |
protected static java.lang.String |
getSubjectPlusMonteCarloSpecificId(java.lang.String subjectID,
int monteCarloRealizationID) |
protected boolean |
hasSubjectBeenTestedForBlups(MonteCarloSimulationCompliantObject subject) |
protected abstract void |
init()
This method reads all the parameters in .csv files and stores the estimates into members defaultBeta, defaultResidualError,
and defaultRandomEffects.
|
protected void |
recordSubjectTestedForBlups(MonteCarloSimulationCompliantObject subject) |
void |
removeModelBasedSimulatorListener(REpiceaPredictorListener listener)
This method removes the listener instance from the list of listeners.
|
protected void |
setBlupsForThisSubject(MonteCarloSimulationCompliantObject subject,
Estimate<? extends StandardGaussianDistribution> blups) |
protected void |
setDefaultRandomEffects(HierarchicalLevel level,
Estimate<? extends StandardGaussianDistribution> newEstimate) |
protected void |
setDefaultResidualError(java.lang.Enum<?> enumVar,
GaussianErrorTermEstimate estimate) |
protected void |
setDeviatesForRandomEffectsOfThisSubject(MonteCarloSimulationCompliantObject subject,
Matrix randomDeviates) |
protected void |
setParameterEstimates(ModelParameterEstimates gaussianEstimate) |
protected Matrix |
simulateDeviatesForRandomEffectsOfThisSubject(MonteCarloSimulationCompliantObject subject,
Estimate<?> randomEffectsEstimate)
This method simulates random deviates from an estimate and stores them in the simulatedRandomEffects
member.
|
getParameterEstimates
protected static final java.util.List<java.lang.Integer> DefaultZeroIndex
protected final java.util.concurrent.CopyOnWriteArrayList<REpiceaPredictorListener> listeners
protected boolean isRandomEffectsVariabilityEnabled
protected boolean isResidualVariabilityEnabled
protected Matrix oXVector
protected REpiceaPredictor(boolean isParametersVariabilityEnabled, boolean isRandomEffectsVariabilityEnabled, boolean isResidualVariabilityEnabled)
isParametersVariabilityEnabled
- a boolean that enables the variability at the parameter levelisRandomEffectsVariabilityEnabled
- a boolean that enables the variability at the random effect levelisResidualVariabilityEnabled
- a boolean that enables the variability at the tree levelprotected abstract void init()
protected java.util.Map<java.lang.String,Estimate<? extends StandardGaussianDistribution>> getDefaultRandomEffects()
protected void setParameterEstimates(ModelParameterEstimates gaussianEstimate)
setParameterEstimates
in class SensitivityAnalysisParameter<ModelParameterEstimates>
protected void setDefaultRandomEffects(HierarchicalLevel level, Estimate<? extends StandardGaussianDistribution> newEstimate)
protected Estimate<? extends StandardGaussianDistribution> getDefaultRandomEffects(HierarchicalLevel level)
protected void setDefaultResidualError(java.lang.Enum<?> enumVar, GaussianErrorTermEstimate estimate)
protected GaussianErrorTermEstimate getDefaultResidualError(java.lang.Enum<?> enumVar)
protected REpiceaPredictor.IntervalNestedInPlotDefinition getIntervalNestedInPlotDefinition(MonteCarloSimulationCompliantObject stand, int date)
stand
- A MonteCarloSimulationCompliantObject that designates the standdate
- an Integerprotected REpiceaPredictor.CruiseLine getCruiseLineForThisSubject(java.lang.String cruiseLineID, MonteCarloSimulationCompliantObject stand)
cruiseLineID
- the id of the cruise linestand
- a MonteCarloSimulationCompliantObject instanceprotected final Matrix getParametersForThisRealization(MonteCarloSimulationCompliantObject subject)
getParametersForThisRealization
in class SensitivityAnalysisParameter<ModelParameterEstimates>
subject
- a subject that implements the MonteCarloSimulationCompliantObject interfaceprotected void fireRandomEffectDeviateGeneratedEvent(MonteCarloSimulationCompliantObject subject, Estimate<? extends StandardGaussianDistribution> originalRandomEffects, Matrix randomDeviates)
protected Matrix simulateDeviatesForRandomEffectsOfThisSubject(MonteCarloSimulationCompliantObject subject, Estimate<?> randomEffectsEstimate)
subject
- a MonteCarloSimulationCompliantObject instancerandomEffectsEstimate
- the estimate from which the random deviates are generatedprotected final void setDeviatesForRandomEffectsOfThisSubject(MonteCarloSimulationCompliantObject subject, Matrix randomDeviates)
protected final java.lang.String getSubjectPlusMonteCarloSpecificId(MonteCarloSimulationCompliantObject object)
protected static java.lang.String getSubjectPlusMonteCarloSpecificId(java.lang.String subjectID, int monteCarloRealizationID)
protected final Matrix getRandomEffectsForThisSubject(MonteCarloSimulationCompliantObject subject)
subject
- a MonteCarloSimulationCompliantObject objectprotected final boolean doRandomDeviatesExistForThisSubject(MonteCarloSimulationCompliantObject subject)
protected final Matrix getResidualErrorForThisSubject(MonteCarloSimulationCompliantObject subject, java.lang.Enum<?> group)
subject
- a MonteCarloSimulationCompliantObject instancegroup
- an Enum that defines the group in case of different error term specificationsprotected final GaussianErrorTermList getGaussianErrorTerms(MonteCarloSimulationCompliantObject subject)
protected final boolean doesThisSubjectHaveResidualErrorTerm(MonteCarloSimulationCompliantObject subject)
protected final Matrix getResidualError()
protected void fireModelBasedSimulatorEvent(REpiceaPredictorEvent event)
public void addModelBasedSimulatorListener(REpiceaPredictorListener listener)
listener
- a ModelBasedSimulatorListener listenerpublic void removeModelBasedSimulatorListener(REpiceaPredictorListener listener)
listener
- a ModelBasedSimulatorListener listenerprotected boolean doBlupsExistForThisSubject(MonteCarloSimulationCompliantObject subject)
protected Estimate<? extends StandardGaussianDistribution> getBlupsForThisSubject(MonteCarloSimulationCompliantObject subject)
subject
- a MonteCarloSimulationCompliantObject instanceprotected final void setBlupsForThisSubject(MonteCarloSimulationCompliantObject subject, Estimate<? extends StandardGaussianDistribution> blups)
protected final void recordSubjectTestedForBlups(MonteCarloSimulationCompliantObject subject)
protected final boolean hasSubjectBeenTestedForBlups(MonteCarloSimulationCompliantObject subject)