Package cascading.pattern.model.tree

Examples of cascading.pattern.model.tree.Tree


  private Pipe handleTreeModel( Pipe tail, TreeModel model )
    {
    ModelSchema modelSchema = createModelSchema( model );

    Tree tree = createTree( model, modelSchema );

    TreeSpec treeSpec = new TreeSpec( modelSchema, tree );

    return create( tail, modelSchema, new TreeFunction( treeSpec ) );
    }
View Full Code Here


  {
  public static Tree createTree( TreeModel model, ModelSchema modelSchema )
    {
    Node parent = model.getNode();

    Tree tree = new Tree( parent.getId() );

    buildTree( modelSchema, tree, parent );

    return tree;
    }
View Full Code Here

    ensembleSpec.setSelectionStrategy( new MajorityVote() );

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "2", "4", new LessOrEqualThanPredicate( "var2", 0.5d ), "1" );
    tree.addPredicate( "2", "5", new GreaterThanPredicate( "var2", 0.5d ), "0" );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "3", "6", new LessOrEqualThanPredicate( "var1", 0.5d ), "0" );
    tree.addPredicate( "3", "7", new GreaterThanPredicate( "var1", 0.5d ), "1" );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var1", 0.5d ), "1" );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var1", 0.5d ), "0" );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var0", 0.5d ), "1" );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var0", 0.5d ), "0" );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }
View Full Code Here

    ensembleSpec.setSelectionStrategy( new Average() );

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "2", "4", new LessOrEqualThanPredicate( "var2", 0.5d ), 1 );
    tree.addPredicate( "2", "5", new GreaterThanPredicate( "var2", 0.5d ), 0 );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "3", "6", new LessOrEqualThanPredicate( "var1", 0.5d ), 0 );
    tree.addPredicate( "3", "7", new GreaterThanPredicate( "var1", 0.5d ), 1 );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var1", 0.5d ), 1 );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var1", 0.5d ), 0 );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }

    {
    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var0", 0.5d ), 1 );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var0", 0.5d ), 0 );

    treeSpec.setTree( tree );

    ensembleSpec.addModelSpec( treeSpec );
    }
View Full Code Here

    ModelSchema modelSchema = new ModelSchema( expectedFields, predictedFields );

    TreeSpec treeSpec = new TreeSpec( modelSchema );

    Tree tree = new Tree( "1" );

    tree.addPredicate( "1", "2", new LessOrEqualThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "2", "4", new LessOrEqualThanPredicate( "var2", 0.5d ), "1" );
    tree.addPredicate( "2", "5", new GreaterThanPredicate( "var2", 0.5d ), "0" );
    tree.addPredicate( "1", "3", new GreaterThanPredicate( "var0", 0.5d ) );
    tree.addPredicate( "3", "6", new LessOrEqualThanPredicate( "var1", 0.5d ), "0" );
    tree.addPredicate( "3", "7", new GreaterThanPredicate( "var1", 0.5d ), "1" );

    treeSpec.setTree( tree );

    TreeFunction treeFunction = new TreeFunction( treeSpec );
View Full Code Here

TOP

Related Classes of cascading.pattern.model.tree.Tree

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.