List<TreeSpec> models = new LinkedList<TreeSpec>();
for( Segment segment : model.getSegmentation().getSegments() )
{
if( !segment.getPredicate().getClass().equals( True.class ) )
throw new PatternException( "segment predicates currently not supported, got: " + segment.getPredicate() );
Model segmentModel = segment.getModel();
if( segmentModel instanceof TreeModel )
models.add( new TreeSpec( modelSchema, createTree( (TreeModel) segmentModel, modelSchema ) ) );
else
throw new PatternException( "ensemble model currently not supported, got: " + segmentModel );
}
EnsembleSpec<TreeSpec> miningSpec = new EnsembleSpec<TreeSpec>( modelSchema, models );
LOG.debug( "creating: {}, input: {}, output: {}", new Object[]{miningSpec, modelSchema.getInputFields(),