Class LMSEPolynomialEstimator
java.lang.Object
com.irurueta.numerical.polynomials.estimators.PolynomialEstimator
com.irurueta.numerical.polynomials.estimators.LMSEPolynomialEstimator
This class defines an LMSE (Least Mean Square Error) estimator of a
polynomial of a given degree using points where polynomials (or its
derivatives or integrals) are evaluated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Indicates if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided.static final boolean
Indicates if by default an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided.Fields inherited from class com.irurueta.numerical.polynomials.estimators.PolynomialEstimator
DEFAULT_ESTIMATOR_TYPE, degree, evaluations, listener, locked, MIN_DEGREE
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.LMSEPolynomialEstimator
(int degree) Constructor.LMSEPolynomialEstimator
(int degree, PolynomialEstimatorListener listener) Constructor.LMSEPolynomialEstimator
(int degree, List<PolynomialEvaluation> evaluations) Constructor.LMSEPolynomialEstimator
(int degree, List<PolynomialEvaluation> evaluations, PolynomialEstimatorListener listener) Constructor.Constructor.LMSEPolynomialEstimator
(List<PolynomialEvaluation> evaluations) Constructor.LMSEPolynomialEstimator
(List<PolynomialEvaluation> evaluations, PolynomialEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionestimate()
Estimates a polynomial based on provided evaluations.getType()
Returns type of polynomial estimator.boolean
Indicates if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided.void
setLMSESolutionAllowed
(boolean allowed) Specified if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided.Methods inherited from class com.irurueta.numerical.polynomials.estimators.PolynomialEstimator
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, fillDerivativeEvaluation, fillDirectEvaluation, fillIntegralEvaluation, fillIntegralIntervalEvaluation, getDegree, getEvaluations, getListener, getMinNumberOfEvaluations, getMinNumberOfEvaluations, isLocked, isReady, normalize, setDegree, setDegreeAndEvaluations, setEvaluations, setListener
-
Field Details
-
DEFAULT_ALLOW_LMSE_SOLUTION
public static final boolean DEFAULT_ALLOW_LMSE_SOLUTIONIndicates if by default an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided.- See Also:
-
allowLMSESolution
private boolean allowLMSESolutionIndicates if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided. If false, the exceeding evaluations are ignored, and only the first minimum required are used.
-
-
Constructor Details
-
LMSEPolynomialEstimator
public LMSEPolynomialEstimator()Constructor. -
LMSEPolynomialEstimator
public LMSEPolynomialEstimator(int degree) Constructor.- Parameters:
degree
- degree of polynomial to be estimated.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
LMSEPolynomialEstimator
Constructor.- Parameters:
evaluations
- collection of polynomial evaluations.
-
LMSEPolynomialEstimator
Constructor.- Parameters:
listener
- listener to be notified of events.
-
LMSEPolynomialEstimator
Constructor.- Parameters:
degree
- degree of polynomial to be estimated.evaluations
- collection of polynomial evaluations.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
LMSEPolynomialEstimator
Constructor.- Parameters:
degree
- degree of polynomial to be estimated.listener
- listener to be notified of events.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
LMSEPolynomialEstimator
public LMSEPolynomialEstimator(List<PolynomialEvaluation> evaluations, PolynomialEstimatorListener listener) Constructor.- Parameters:
evaluations
- collection of polynomial evaluations.listener
- listener to be notified of events.
-
LMSEPolynomialEstimator
public LMSEPolynomialEstimator(int degree, List<PolynomialEvaluation> evaluations, PolynomialEstimatorListener listener) Constructor.- Parameters:
degree
- degree of polynomial to be estimated.evaluations
- collection of polynomial evaluations.listener
- listener to be notified of events.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
-
Method Details
-
isLMSESolutionAllowed
public boolean isLMSESolutionAllowed()Indicates if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided. If false, the exceeding evaluations are ignored, and only the first minimum required are used.- Returns:
- true if LMSE solution is allowed, false otherwise.
-
setLMSESolutionAllowed
Specified if an LMSE (Least Mean Square Error) solution is allowed if more evaluations than the required minimum are provided. If false, the exceeding evaluations are ignored, and only the first minimum required are used.- Parameters:
allowed
- true if LMSE solution is allowed, false otherwise.- Throws:
LockedException
- if estimator is locked.
-
estimate
public Polynomial estimate() throws LockedException, NotReadyException, PolynomialEstimationExceptionEstimates a polynomial based on provided evaluations.- Specified by:
estimate
in classPolynomialEstimator
- Returns:
- estimated polynomial.
- Throws:
LockedException
- if estimator is locked.NotReadyException
- if estimator is not ready.PolynomialEstimationException
- if polynomial estimation fails.
-
getType
Returns type of polynomial estimator.- Specified by:
getType
in classPolynomialEstimator
- Returns:
- type of polynomial estimator.
-