类 LeastSquaresFactory
java.lang.Object
org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresFactory
用于创建
LeastSquaresProblem的工厂。
-
方法概要
修饰符和类型方法说明static LeastSquaresProblemcountEvaluations(LeastSquaresProblem problem, Incrementor counter) 计算特定问题的评估次数。static LeastSquaresProblemcreate(MultivariateVectorFunction model, MultivariateMatrixFunction jacobian, double[] observed, double[] start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。static LeastSquaresProblemcreate(MultivariateJacobianFunction model, RealVector observed, RealVector start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。static LeastSquaresProblemcreate(MultivariateJacobianFunction model, RealVector observed, RealVector start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations, boolean lazyEvaluation, ParameterValidator paramValidator) 根据给定元素创建一个LeastSquaresProblem。static LeastSquaresProblemcreate(MultivariateJacobianFunction model, RealVector observed, RealVector start, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。将为PointVectorValuePair指定的收敛检查器视为为LeastSquaresProblem.Evaluation指定的收敛检查器。static MultivariateJacobianFunctionmodel(MultivariateVectorFunction value, MultivariateMatrixFunction jacobian) static LeastSquaresProblemweightDiagonal(LeastSquaresProblem problem, RealVector weights) 将对角权重矩阵应用于LeastSquaresProblem。static LeastSquaresProblemweightMatrix(LeastSquaresProblem problem, RealMatrix weights) 将密集权重矩阵应用于LeastSquaresProblem。
-
方法详细资料
-
create
public static LeastSquaresProblem create(MultivariateJacobianFunction model, RealVector observed, RealVector start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations, boolean lazyEvaluation, ParameterValidator paramValidator) 根据给定元素创建一个LeastSquaresProblem。不会应用权重(单位权重)。- 参数:
-
model- 模型函数。生成计算值。 -
observed- 观察到的(目标)值 -
start- 初始猜测。 -
weight- 权重矩阵 -
checker- 收敛检查器 -
maxEvaluations- 评估模型的最大次数 -
maxIterations- 算法中迭代的最大次数 -
lazyEvaluation- 调用LeastSquaresProblem.evaluate(RealVector)是否推迟到请求值时才进行评估。 -
paramValidator- 模型参数验证器。 - 返回:
- 指定的普通最小二乘问题。
-
create
public static LeastSquaresProblem create(MultivariateJacobianFunction model, RealVector observed, RealVector start, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。不会应用权重(单位权重)。- 参数:
-
model- 模型函数。生成计算值。 -
observed- 观察到的(目标)值 -
start- 初始猜测。 -
checker- 收敛检查器 -
maxEvaluations- 评估模型的最大次数 -
maxIterations- 算法中迭代的最大次数 - 返回:
- 指定的普通最小二乘问题。
-
create
public static LeastSquaresProblem create(MultivariateJacobianFunction model, RealVector observed, RealVector start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。- 参数:
-
model- 模型函数。生成计算值。 -
observed- 观察到的(目标)值 -
start- 初始猜测。 -
weight- 权重矩阵 -
checker- 收敛检查器 -
maxEvaluations- 评估模型的最大次数 -
maxIterations- 算法中迭代的最大次数 - 返回:
- 指定的普通最小二乘问题。
-
create
public static LeastSquaresProblem create(MultivariateVectorFunction model, MultivariateMatrixFunction jacobian, double[] observed, double[] start, RealMatrix weight, ConvergenceChecker<LeastSquaresProblem.Evaluation> checker, int maxEvaluations, int maxIterations) 根据给定元素创建一个LeastSquaresProblem。此工厂方法用于与先前接口保持连续性。新应用程序应使用
create(MultivariateJacobianFunction, RealVector, RealVector, ConvergenceChecker, int, int)或create(MultivariateJacobianFunction, RealVector, RealVector, RealMatrix, ConvergenceChecker, int, int)。- 参数:
-
model- 模型函数。生成计算值。 -
jacobian- 模型相对于参数的雅可比矩阵 -
observed- 观察到的(目标)值 -
start- 初始猜测。 -
weight- 权重矩阵 -
checker- 收敛检查器 -
maxEvaluations- 评估模型的最大次数 -
maxIterations- 算法中迭代的最大次数 - 返回:
- 指定的普通最小二乘问题。
-
weightMatrix
将密集权重矩阵应用于LeastSquaresProblem。- 参数:
-
problem- 未加权的问题 -
weights- 权重矩阵 - 返回:
-
应用权重后的新
LeastSquaresProblem。原始problem不会被修改。
-
weightDiagonal
将对角权重矩阵应用于LeastSquaresProblem。- 参数:
-
problem- 未加权的问题 -
weights- 权重矩阵的对角线 - 返回:
-
应用权重后的新
LeastSquaresProblem。原始problem不会被修改。
-
countEvaluations
public static LeastSquaresProblem countEvaluations(LeastSquaresProblem problem, Incrementor counter) 计算特定问题的评估次数。每次在返回的问题上调用LeastSquaresProblem.evaluate(RealVector)时,counter都会递增。- 参数:
-
problem- 要跟踪的问题。 -
counter- 要递增的计数器。 - 返回:
- 跟踪评估次数的最小二乘问题
-
evaluationChecker
public static ConvergenceChecker<LeastSquaresProblem.Evaluation> evaluationChecker(ConvergenceChecker<PointVectorValuePair> checker) 将为PointVectorValuePair指定的收敛检查器视为为LeastSquaresProblem.Evaluation指定的收敛检查器。- 参数:
-
checker- 要适应的收敛检查器。 - 返回:
-
委托给
checker的收敛检查器。
-
model
public static MultivariateJacobianFunction model(MultivariateVectorFunction value, MultivariateMatrixFunction jacobian) - 参数:
-
value- 向量值函数 -
jacobian- 雅可比函数 - 返回:
- 一个同时计算两者的函数
-