Examples of mapFunction()


Examples of org.drools.pmml.pmml_4_1.PMML4Helper.mapFunction()

    @Test
    public void testFunctionMapping() {
        PMML4Helper ctx = new PMML4Helper();

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

    @Test
    public void testFunctionMapping() {
        PMML4Helper ctx = new PMML4Helper();

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

    @Test
    public void testFunctionMapping() {
        PMML4Helper ctx = new PMML4Helper();

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

    public void testFunctionMapping() {
        PMML4Helper ctx = new PMML4Helper();

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        PMML4Helper ctx = new PMML4Helper();

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("+","2","3","4"));
        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(2 - 3)" , ctx.mapFunction("-","2","3"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("*","2","3","4"));
        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(2 / 4)" , ctx.mapFunction("/","2","4"));

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
View Full Code Here

Examples of org.drools.pmml.pmml_4_2.PMML4Helper.mapFunction()

        assertEquals("(Math.min(2,Math.min(3,4)))" , ctx.mapFunction("min","2","3","4"));
        assertEquals("(Math.max(2,Math.max(3,4)))" , ctx.mapFunction("max","2","3","4"));
        assertEquals("(2 + 3 + 4)" , ctx.mapFunction("sum","2","3","4"));
        assertEquals("(2 * 3 * 4)" , ctx.mapFunction("product","2","3","4"));
        assertEquals("((2 + 3 + 4) / 3)" , ctx.mapFunction("avg","2","3","4"));
        assertEquals("(3)" , ctx.mapFunction("median","1","2","3","4","5"));
        assertEquals("( 0.5 * 3 + 0.5 * 4 )" , ctx.mapFunction("median","1","2","3","4","5","6"));

        assertEquals("(Math.log10(2))" , ctx.mapFunction("log10","2"));
        assertEquals("(Math.log(2))" , ctx.mapFunction("ln","2"));
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.