@Override protected boolean initializeAlgorithm() { this.setResult( this.getObjectToOptimize().clone() ); this.getCostFunction().setCostParameters( this.getData() ); this.dampingFactor = 1.0; this.lastCost = SumSquaredErrorCostFunction.Cache.compute( this.getResult(), this.getData() ); ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased f = new ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased( this.getResult(), this.getCostFunction() ); // Load up the line function with the current direction and // the search direction, which is the negative gradient, in other words // the direction of steepest descent Vector parameters = this.getResult().convertToVector(); int M = parameters.getDimensionality(); this.lineFunction = new DirectionalVectorToDifferentiableScalarFunction( f, parameters, this.lastCost.Jte ); this.hessianInverse = MatrixFactory.getDefault().createIdentity( M, M ).scale( 0.5 ); return true; }
@Override protected boolean initializeAlgorithm() { this.setResult( this.getObjectToOptimize().clone() ); this.getCostFunction().setCostParameters( this.getData() ); this.dampingFactor = 1.0; this.lastCost = SumSquaredErrorCostFunction.Cache.compute( this.getResult(), this.getData() ); ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased f = new ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased( this.getResult(), this.getCostFunction() ); // Load up the line function with the current direction and // the search direction, which is the negative gradient, in other words // the direction of steepest descent Vector parameters = this.getResult().convertToVector(); int M = parameters.getDimensionality(); this.lineFunction = new DirectionalVectorToDifferentiableScalarFunction( f, parameters, this.lastCost.Jte ); this.hessianInverse = MatrixFactory.getDefault().createIdentity( M, M ).scale( 0.5 ); return true; }
@Override protected boolean initializeAlgorithm() { this.setResult( this.getObjectToOptimize().clone() ); this.getCostFunction().setCostParameters( this.getData() ); this.dampingFactor = 1.0; this.lastCost = SumSquaredErrorCostFunction.Cache.compute( this.getResult(), this.getData() ); ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased f = new ParameterDifferentiableCostMinimizer.ParameterCostEvaluatorDerivativeBased( this.getResult(), this.getCostFunction() ); // Load up the line function with the current direction and // the search direction, which is the negative gradient, in other words // the direction of steepest descent Vector parameters = this.getResult().convertToVector(); int M = parameters.getDimensionality(); this.lineFunction = new DirectionalVectorToDifferentiableScalarFunction( f, parameters, this.lastCost.Jte ); this.hessianInverse = MatrixFactory.getDefault().createIdentity( M, M ).scale( 0.5 ); return true; }
this.getResult(), this.getData() );
this.getResult(), this.getData() );
this.getResult(), this.getData() );