Tabnine Logo
ComplexNode
Code IndexAdd Tabnine to your IDE (free)

How to use
ComplexNode
in
org.dmg.pmml.tree

Best Java code snippets using org.dmg.pmml.tree.ComplexNode (Showing top 17 results out of 315)

origin: org.jpmml/pmml-model

/**
 * Create an instance of {@link ComplexNode }
 * 
 */
public ComplexNode createComplexNode() {
  return new ComplexNode();
}
origin: org.jpmml/pmml-model

public ComplexNode addNodes(org.dmg.pmml.tree.Node... nodes) {
  getNodes().addAll(Arrays.asList(nodes));
  return this;
}
origin: org.jpmml/pmml-model

public ComplexNode addScoreDistributions(ScoreDistribution... scoreDistributions) {
  getScoreDistributions().addAll(Arrays.asList(scoreDistributions));
  return this;
}
origin: jpmml/jpmml-model

ComplexNode value = new ComplexNode();
value.setId(node.getId());
value.setScore(node.getScore());
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
  (value.getExtensions()).addAll(node.getExtensions());
value.setPredicate(node.getPredicate());
value.setPartition(node.getPartition());
  (value.getScoreDistributions()).addAll(node.getScoreDistributions());
  (value.getNodes()).addAll(node.getNodes());
value.setEmbeddedModel(node.getEmbeddedModel());
origin: jpmml/jpmml-r

  static
  public ComplexNode toComplexNode(Node node){
    ComplexNode result = new ComplexNode()
      .setId(node.getId())
      .setScore(node.getScore())
      .setRecordCount(node.getRecordCount())
      .setDefaultChild(node.getDefaultChild())
      .setPredicate(node.getPredicate());

    if(node.hasNodes()){
      (result.getNodes()).addAll(node.getNodes());
    } // End if

    if(node.hasScoreDistributions()){
      (result.getScoreDistributions()).addAll(node.getScoreDistributions());
    }

    return result;
  }
}
origin: jpmml/jpmml-sklearn

Node rightChild = encodeNode(rightPredicate, predicateManager, scoreDistributionManager, rightIndex, leftChildren, rightChildren, features, thresholds, values, miningFunction, schema);
Node result = new ComplexNode()
  .setId(id)
  .setPredicate(predicate)
  .addNodes(leftChild, rightChild);
  result = new ComplexNode()
    .setId(id)
    .setScore(score)
    .setRecordCount(totalRecordCount)
    .setPredicate(predicate);
  double value = values[index];
  result = new ComplexNode()
    .setId(id)
    .setScore(value)
    .setPredicate(predicate);
} else
origin: jpmml/jpmml-model

@Override
public Node unmarshal(ComplexNode value){
  if(value.getRecordCount() != null){
    return value;
  } // End if
  if(value.hasExtensions() || (value.getPartition() != null) || value.hasScoreDistributions() || (value.getEmbeddedModel() != null)){
    return value;
  }
  Node node;
  if(value.hasNodes()){
    node = new BranchNode()
      .setId(value.getId())
      .setDefaultChild(value.getDefaultChild());
    (node.getNodes()).addAll(value.getNodes());
  } else
  {
    node = new LeafNode()
      .setId(value.getId());
  }
  node
    .setScore(value.getScore())
    .setPredicate(value.getPredicate());
  return node;
}
origin: jpmml/jpmml-model

@Override
public VisitorAction accept(Visitor visitor) {
  VisitorAction status = visitor.visit(this);
  if (status == VisitorAction.CONTINUE) {
    visitor.pushParent(this);
    if ((status == VisitorAction.CONTINUE)&&hasExtensions()) {
      status = PMMLObject.traverse(visitor, getExtensions());
    }
    if (status == VisitorAction.CONTINUE) {
      status = PMMLObject.traverse(visitor, getPredicate(), getPartition());
    }
    if ((status == VisitorAction.CONTINUE)&&hasScoreDistributions()) {
      status = PMMLObject.traverse(visitor, getScoreDistributions());
    }
    if ((status == VisitorAction.CONTINUE)&&hasNodes()) {
      status = PMMLObject.traverse(visitor, getNodes());
    }
    if (status == VisitorAction.CONTINUE) {
      status = PMMLObject.traverse(visitor, getEmbeddedModel());
    }
    visitor.popParent();
  }
  if (status == VisitorAction.TERMINATE) {
    return VisitorAction.TERMINATE;
  }
  return VisitorAction.CONTINUE;
}
origin: jpmml/jpmml-model

Node node2a = new ComplexNode()
  .setId("2a")
  .addExtensions(new Extension())
  .setPredicate(new False());
origin: jpmml/jpmml-sklearn

Node root = new ComplexNode()
  .setPredicate(new True())
  .setScore(ValueUtil.formatValue(classes.get(index)));
origin: jpmml/jpmml-r

List<? extends Feature> features = schema.getFeatures();
Node result = new ComplexNode()
  .setId(String.valueOf(id.asScalar()))
  .setPredicate(predicate);
origin: org.jpmml/pmml-model

ComplexNode value = new ComplexNode();
value.setId(node.getId());
value.setScore(node.getScore());
value.setRecordCount(node.getRecordCount());
value.setDefaultChild(node.getDefaultChild());
  (value.getExtensions()).addAll(node.getExtensions());
value.setPredicate(node.getPredicate());
value.setPartition(node.getPartition());
  (value.getScoreDistributions()).addAll(node.getScoreDistributions());
  (value.getNodes()).addAll(node.getNodes());
value.setEmbeddedModel(node.getEmbeddedModel());
origin: org.jpmml/pmml-model

@Override
public Node unmarshal(ComplexNode value){
  if(value.getRecordCount() != null){
    return value;
  } // End if
  if(value.hasExtensions() || (value.getPartition() != null) || value.hasScoreDistributions() || (value.getEmbeddedModel() != null)){
    return value;
  }
  Node node;
  if(value.hasNodes()){
    node = new BranchNode()
      .setId(value.getId())
      .setDefaultChild(value.getDefaultChild());
    (node.getNodes()).addAll(value.getNodes());
  } else
  {
    node = new LeafNode()
      .setId(value.getId());
  }
  node
    .setScore(value.getScore())
    .setPredicate(value.getPredicate());
  return node;
}
origin: org.jpmml/pmml-model

@Override
public VisitorAction accept(Visitor visitor) {
  VisitorAction status = visitor.visit(this);
  if (status == VisitorAction.CONTINUE) {
    visitor.pushParent(this);
    if ((status == VisitorAction.CONTINUE)&&hasExtensions()) {
      status = PMMLObject.traverse(visitor, getExtensions());
    }
    if (status == VisitorAction.CONTINUE) {
      status = PMMLObject.traverse(visitor, getPredicate(), getPartition());
    }
    if ((status == VisitorAction.CONTINUE)&&hasScoreDistributions()) {
      status = PMMLObject.traverse(visitor, getScoreDistributions());
    }
    if ((status == VisitorAction.CONTINUE)&&hasNodes()) {
      status = PMMLObject.traverse(visitor, getNodes());
    }
    if (status == VisitorAction.CONTINUE) {
      status = PMMLObject.traverse(visitor, getEmbeddedModel());
    }
    visitor.popParent();
  }
  if (status == VisitorAction.TERMINATE) {
    return VisitorAction.TERMINATE;
  }
  return VisitorAction.CONTINUE;
}
origin: jpmml/jpmml-model

/**
 * Create an instance of {@link ComplexNode }
 * 
 */
public ComplexNode createComplexNode() {
  return new ComplexNode();
}
origin: jpmml/jpmml-model

public ComplexNode addScoreDistributions(ScoreDistribution... scoreDistributions) {
  getScoreDistributions().addAll(Arrays.asList(scoreDistributions));
  return this;
}
origin: jpmml/jpmml-model

public ComplexNode addNodes(org.dmg.pmml.tree.Node... nodes) {
  getNodes().addAll(Arrays.asList(nodes));
  return this;
}
org.dmg.pmml.treeComplexNode

Most used methods

  • <init>
  • setId
  • setPredicate
  • setRecordCount
  • setScore
  • getNodes
  • getScoreDistributions
  • setDefaultChild
  • addExtensions
  • addNodes
  • getDefaultChild
  • getEmbeddedModel
  • getDefaultChild,
  • getEmbeddedModel,
  • getExtensions,
  • getId,
  • getPartition,
  • getPredicate,
  • getRecordCount,
  • getScore,
  • hasExtensions,
  • hasNodes

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (Timer)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now