Examples of Bind2nd


Examples of org.jquantlib.math.functions.Bind2nd

        final int n = getSampleSize();
        QL.require(n >= 1 , unsufficient_sample_size);

        final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
        functions.add(new Square());
        functions.add(new Bind2nd(new Minus(), mean()));
        final Expression comp = new Expression(functions);

        // Evaluate the composed function in the specified range (ie. everyWhere).
        final double s2 = expectationValue(comp, new TruePredicate()).getFirst();
        return s2*n/(n-1.0);
 
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

        if (n <= 2)
            throw new IllegalArgumentException(unsufficient_sample_size_2);

        final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
        functions.add(new Cube());
        functions.add(new Bind2nd(new Minus(), mean()));
        final Expression comp = new Expression(functions);

        final double x = expectationValue(comp, new TruePredicate()).getFirst();
        final double sigma = standardDeviation();
        final double _n = n;
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

        if (n <= 3)
            throw new IllegalArgumentException(unsufficient_sample_size_3);

        final List<DoubleOp> functions = new ArrayList<DoubleOp>();
        functions.add(new Fourth());
        functions.add(new Bind2nd(new Minus(), mean()));
        final Expression comp = new Expression(functions);

        final double x = expectationValue(comp, new TruePredicate()).getFirst();

        final double _N = n;
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

    public double regret(final double target){
        // average over the range below the target

        final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
        functions.add(new Square());
        functions.add(new Bind2nd(new Minus(), target));
        final Expression comp = new Expression(functions);
        final Ops.DoublePredicate less = new Bind2ndPredicate(new LessThanPredicate(), target);

        final Pair<Double, Integer> result = statistics.expectationValue(comp, less);
        final double x = result.getFirst();
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

        QL.require(N > 1, "sample number <=1, unsufficient");
        // Subtract the mean and square. Repeat on the whole range.
        // Hopefully, the whole thing will be inlined in a single loop.
        /*@Real*/ final double s2 = expectationValue(
            new ComposedFunction(
                new Square(), new Bind2nd(
                    new Minus(), mean())),
                                   new Everywhere()).first();
        return s2*N/(N-1.0);
    }
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

        /*@Size*/ final int N = samples();
        QL.require(N > 2, "sample number <=2, unsufficient");

        /*@Real*/ final double x = expectationValue(
            new ComposedFunction(
                new Cube(), new Bind2nd(
                    new Minus(), mean())),
                                  new Everywhere()).first();
        /*@Real*/ final double sigma = standardDeviation();

        return (x/(sigma*sigma*sigma))*(N/(N-1.0))*(N/(N-2.0));
 
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

        /*@Size*/ final int N = samples();
        QL.require(N > 3, "sample number <=3, unsufficient");

        /*@Real*/ final double x = expectationValue(
            new ComposedFunction(
                new Fourth(), new Bind2nd(
                    new Minus(), mean())),
                                  new Everywhere()).first();
        /*@Real*/ final double sigma2 = variance();

        /*@Real*/ final double c1 = (N/(N-1.0)) * (N/(N-2.0)) * ((N+1.0)/(N-3.0));
 
View Full Code Here

Examples of org.jquantlib.math.functions.Bind2nd

  public /*@Real*/ double regret(final /*@Real*/ double target) /*@ReadOnly*/ {
    // average over the range below the target

    final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
    functions.add(new Square());
    functions.add(new Bind2nd(new Minus(), target));
    final Expression comp = new Expression(functions);
    final Ops.DoublePredicate less = new Bind2ndPredicate(new LessThanPredicate(), target);

    final Pair<Double, Integer> result = expectationValue(comp, less);
    final double x = result.first();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.