Package org.jquantlib.math.optimization

Examples of org.jquantlib.math.optimization.EndCriteria


            }
        }

        final LevenbergMarquardt solver = new LevenbergMarquardt (ts.accuracy(), ts.accuracy(), ts.accuracy());

        final EndCriteria endCriteria = new EndCriteria (100, 10, 0.00, ts.accuracy(), 0.00);
        final Constraint solverConstraint = (forcePositive ? new PositiveConstraint() : new NoConstraint());
        int i = localisation -1;
        //FIXME, convexmonotone interpolation?
        final int dataAdjust = 1;
View Full Code Here


        // initialize optimization methods
        final OptimizationMethod methods[] = new OptimizationMethod[2];
        methods[0] = new Simplex(0.01);
        methods[1] = new LevenbergMarquardt(1e-8, 1e-8, 1e-8);
        // Initialize end criteria
        final EndCriteria endCriteria = new EndCriteria(100000, 100, 1e-8, 1e-8, 1e-8);

        // Test looping over all possibilities
        for (int j=0; j<methods.length; ++j) {
          for (int i=0; i<vegaWeighted.length; ++i) {
            for (int k_a=0; k_a<isAlphaFixed.length; ++k_a) {
View Full Code Here

        maxIterations_.add(1000); // maxIterations
        maxStationaryStateIterations_.add(100); // MaxStationaryStateIterations
        rootEpsilons_.add(1e-8); // rootEpsilon
        functionEpsilons_.add(1e-16); // functionEpsilon
        gradientNormEpsilons_.add(1e-8); // gradientNormEpsilon
        endCriterias_.add(new EndCriteria(maxIterations_.get(maxIterations_.size() - 1), maxStationaryStateIterations_
                .get(maxStationaryStateIterations_.size() - 1), rootEpsilons_.get(rootEpsilons_.size() - 1), functionEpsilons_
                .get(functionEpsilons_.size() - 1), gradientNormEpsilons_.get(gradientNormEpsilons_.size() - 1)));
        // Set optimization methods for optimizer
        final OptimizationMethodType optimizationMethodTypes[] = { OptimizationMethodType.simplex };/* OptimizationMethodType.levenbergMarquardt};*/
        final double simplexLambda = 0.1;
View Full Code Here

                // optMethod_ = boost::shared_ptr<OptimizationMethod>(new
        // LevenbergMarquardt(1e-8, 1e-8, 1e-8));
        optMethod_ = new Simplex(0.01);
            }
      if (endCriteria_ != null) {
        endCriteria_ = new EndCriteria(60000, 100, 1e-8, 1e-8, 1e-8);
      }
      itsCoeffs.weights_ = new Array(vx.size());
      for (int i = 0; i < itsCoeffs.weights_.size(); i++) {
                itsCoeffs.weights_.set(i, 1.0 / vx.size());
            }
View Full Code Here

        // initialize optimization methods
        final OptimizationMethod methods[] = new OptimizationMethod[2];
        methods[0] = new Simplex(0.01);
        methods[1] = new LevenbergMarquardt(1e-8, 1e-8, 1e-8);
        // Initialize end criteria
        final EndCriteria endCriteria = new EndCriteria(100000, 100, 1e-8, 1e-8, 1e-8);

        // Test looping over all possibilities
        for (int j=0; j<methods.length; ++j) {
          for (int i=0; i<vegaWeighted.length; ++i) {
            for (int k_a=0; k_a<isAlphaFixed.length; ++k_a) {
View Full Code Here

       
       
       

        final LevenbergMarquardt solver = new LevenbergMarquardt(ts_.accuracy(), ts_.accuracy(), ts_.accuracy());
        final EndCriteria endCriteria = new EndCriteria(100, 10, 0.00, ts_.accuracy(), 0.00);
        final Constraint solverConstraint = forcePositive_ ? new PositiveConstraint() : new NoConstraint();

        // now start the bootstrapping.
        /*Size*/ final int iInst = localisation_-1;

View Full Code Here

        // initialize optimization methods
        final List<OptimizationMethod> methods_ = new ArrayList<OptimizationMethod>();
        methods_.add(new Simplex(0.01));
        methods_.add(new LevenbergMarquardt(1e-8, 1e-8, 1e-8));
        // Initialize end criteria
        final EndCriteria endCriteria = new EndCriteria(100000, 100, 1e-8, 1e-8, 1e-8);
        // Test looping over all possibilities
        for (int j=0; j<methods_.size(); ++j) {
          for (int i=0; i<vegaWeighted.length; ++i) {
            for (int k_a=0; k_a<isAlphaFixed.length; ++k_a) {
              for (int k_b=0; k_b<isBetaFixed.length; ++k_b) {
View Full Code Here

        maxIterations_.add(1000); // maxIterations
        maxStationaryStateIterations_.add(100); // MaxStationaryStateIterations
        rootEpsilons_.add(1e-8); // rootEpsilon
        functionEpsilons_.add(1e-16); // functionEpsilon
        gradientNormEpsilons_.add(1e-8); // gradientNormEpsilon
        endCriterias_.add(new EndCriteria(maxIterations_.get(maxIterations_.size() - 1), maxStationaryStateIterations_
                .get(maxStationaryStateIterations_.size() - 1), rootEpsilons_.get(rootEpsilons_.size() - 1), functionEpsilons_
                .get(functionEpsilons_.size() - 1), gradientNormEpsilons_.get(gradientNormEpsilons_.size() - 1)));
        // Set optimization methods for optimizer
        final OptimizationMethodType optimizationMethodTypes[] = { OptimizationMethodType.simplex };/* OptimizationMethodType.levenbergMarquardt};*/
        final double simplexLambda = 0.1;
View Full Code Here

                // optMethod_ = boost::shared_ptr<OptimizationMethod>(new
        // LevenbergMarquardt(1e-8, 1e-8, 1e-8));
        optMethod_ = new Simplex(0.01);
            }
      if (endCriteria_ != null) {
        endCriteria_ = new EndCriteria(60000, 100, 1e-8, 1e-8, 1e-8);
      }
      itsCoeffs.weights_ = new Array(vx.size());
      for (int i = 0; i < itsCoeffs.weights_.size(); i++) {
                itsCoeffs.weights_.set(i, 1.0 / vx.size());
            }
View Full Code Here

TOP

Related Classes of org.jquantlib.math.optimization.EndCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.