Tabnine Logo
LocalTransformations.getDerivedFields
Code IndexAdd Tabnine to your IDE (free)

How to use
getDerivedFields
method
in
org.dmg.pmml.LocalTransformations

Best Java code snippets using org.dmg.pmml.LocalTransformations.getDerivedFields (Showing top 20 results out of 315)

origin: jpmml/jpmml-model

public LocalTransformations addDerivedFields(DerivedField... derivedFields) {
  getDerivedFields().addAll(Arrays.asList(derivedFields));
  return this;
}
origin: org.jpmml/pmml-model

public LocalTransformations addDerivedFields(DerivedField... derivedFields) {
  getDerivedFields().addAll(Arrays.asList(derivedFields));
  return this;
}
origin: ShifuML/shifu

public static Map<FieldName, DerivedField> getDerivedFieldMap(LocalTransformations localTransformations) {
  Map<FieldName, DerivedField> derivedFieldMap = new HashMap<FieldName, DerivedField>();
  for(DerivedField derivedField: localTransformations.getDerivedFields()) {
    derivedFieldMap.put(derivedField.getName(), derivedField);
  }
  return derivedFieldMap;
}
origin: jpmml/jpmml-evaluator

  @Override
  public Map<FieldName, DerivedField> load(LocalTransformations localTransformations){
    return IndexableUtil.buildMap(localTransformations.getDerivedFields());
  }
});
origin: ShifuML/shifu

public static Map<FieldName, DerivedField> getDerivedFieldMap(LocalTransformations localTransformations) {
  Map<FieldName, DerivedField> derivedFieldMap = new HashMap<FieldName, DerivedField>();
  for(DerivedField derivedField: localTransformations.getDerivedFields()) {
    derivedFieldMap.put(derivedField.getName(), derivedField);
  }
  return derivedFieldMap;
}
origin: jpmml/jpmml-model

private void processLocalTransformations(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    List<DerivedField> derivedFields = localTransformations.getDerivedFields();
    Set<DerivedField> activeDerivedFields = getActiveDerivedFields(new HashSet<>(derivedFields));
    derivedFields.retainAll(activeDerivedFields);
  }
}
origin: org.jpmml/pmml-model

private void processLocalTransformations(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    List<DerivedField> derivedFields = localTransformations.getDerivedFields();
    Set<DerivedField> activeDerivedFields = getActiveDerivedFields(new HashSet<>(derivedFields));
    derivedFields.retainAll(activeDerivedFields);
  }
}
origin: org.jpmml/pmml-model

@Override
public VisitorAction visit(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    this.localDerivedFields.addAll(localTransformations.getDerivedFields());
  }
  return super.visit(localTransformations);
}
origin: jpmml/jpmml-model

@Override
public VisitorAction visit(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    this.localDerivedFields.addAll(localTransformations.getDerivedFields());
  }
  return super.visit(localTransformations);
}
origin: org.jpmml/pmml-model

@Override
public VisitorAction visit(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    suppress(localTransformations.getDerivedFields());
  }
  return super.visit(localTransformations);
}
origin: jpmml/jpmml-model

@Override
public VisitorAction visit(LocalTransformations localTransformations){
  if(localTransformations.hasDerivedFields()){
    suppress(localTransformations.getDerivedFields());
  }
  return super.visit(localTransformations);
}
origin: jpmml/jpmml-model

@Override
public VisitorAction visit(Model model){
  LocalTransformations localTransformations = model.getLocalTransformations();
  if(localTransformations != null && localTransformations.hasDerivedFields()){
    declare(model, localTransformations.getDerivedFields());
  }
  return super.visit(model);
}
origin: org.jpmml/pmml-model

@Override
public VisitorAction visit(Model model){
  LocalTransformations localTransformations = model.getLocalTransformations();
  if(localTransformations != null && localTransformations.hasDerivedFields()){
    declare(model, localTransformations.getDerivedFields());
  }
  return super.visit(model);
}
origin: ShifuML/shifu

private LocalTransformations getLocalTranformations(NeuralNetwork model) {
  // delete target
  List<DerivedField> derivedFields = model.getLocalTransformations().getDerivedFields();
  // add bias
  DerivedField field = new DerivedField(OpType.CONTINUOUS, DataType.DOUBLE).withName(new FieldName(
      PluginConstants.biasValue));
  field.withExpression(new Constant(String.valueOf(PluginConstants.bias)));
  derivedFields.add(field);
  return new LocalTransformations().withDerivedFields(derivedFields);
}
origin: org.jpmml/pmml-model

private void expandDerivedFields(Model model, Set<Field<?>> fields){
  FieldDependencyResolver fieldDependencyResolver = getFieldDependencyResolver();
  fieldDependencyResolver.expand(fields, fieldDependencyResolver.getGlobalDerivedFields());
  LocalTransformations localTransformations = model.getLocalTransformations();
  if(localTransformations != null && localTransformations.hasDerivedFields()){
    fieldDependencyResolver.expand(fields, new HashSet<>(localTransformations.getDerivedFields()));
  }
}
origin: jpmml/jpmml-model

private void expandDerivedFields(Model model, Set<Field<?>> fields){
  FieldDependencyResolver fieldDependencyResolver = getFieldDependencyResolver();
  fieldDependencyResolver.expand(fields, fieldDependencyResolver.getGlobalDerivedFields());
  LocalTransformations localTransformations = model.getLocalTransformations();
  if(localTransformations != null && localTransformations.hasDerivedFields()){
    fieldDependencyResolver.expand(fields, new HashSet<>(localTransformations.getDerivedFields()));
  }
}
origin: jpmml/jpmml-model

  @Override
  public VisitorAction visit(MiningModel miningModel){
    LocalTransformations localTransformations = miningModel.getLocalTransformations();
    String id;
    try {
      Segment segment = (Segment)getParent();
      id = segment.getId();
    } catch(ClassCastException cce){
      id = null;
    } // End try
    if(id == null){
      checkFields(FieldNameUtil.create("x12"), localTransformations.getDerivedFields());
    } else
    if("first".equals(id)){
      checkFields(FieldNameUtil.create("x123", "x1234", "x12345"), localTransformations.getDerivedFields());
    } else
    if("second".equals(id)){
      assertNull(localTransformations);
    } else
    {
      throw new AssertionError();
    }
    return super.visit(miningModel);
  }
};
origin: jpmml/jpmml-model

@Override
public VisitorAction visit(RegressionModel regressionModel){
  LocalTransformations localTransformations = regressionModel.getLocalTransformations();
  Segment segment = (Segment)getParent();
  String id = segment.getId();
  if("first".equals(id)){
    assertNull(localTransformations);
  } else
  if("second".equals(id)){
    checkFields(FieldNameUtil.create("x2_squared"), localTransformations.getDerivedFields());
  } else
  if("third".equals(id)){
    assertNull(localTransformations);
  } else
  if("sum".equals(id)){
    assertNull(localTransformations);
  } else
  {
    throw new AssertionError();
  }
  return super.visit(regressionModel);
}
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 = org.dmg.pmml.PMMLObject.traverse(visitor, getExtensions());
    }
    if ((status == VisitorAction.CONTINUE)&&hasDerivedFields()) {
      status = org.dmg.pmml.PMMLObject.traverse(visitor, getDerivedFields());
    }
    visitor.popParent();
  }
  if (status == VisitorAction.TERMINATE) {
    return VisitorAction.TERMINATE;
  }
  return VisitorAction.CONTINUE;
}
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 = org.dmg.pmml.PMMLObject.traverse(visitor, getExtensions());
    }
    if ((status == VisitorAction.CONTINUE)&&hasDerivedFields()) {
      status = org.dmg.pmml.PMMLObject.traverse(visitor, getDerivedFields());
    }
    visitor.popParent();
  }
  if (status == VisitorAction.TERMINATE) {
    return VisitorAction.TERMINATE;
  }
  return VisitorAction.CONTINUE;
}
org.dmg.pmmlLocalTransformationsgetDerivedFields

Popular methods of LocalTransformations

  • <init>
  • hasDerivedFields
  • getExtensions
  • hasExtensions
  • withDerivedFields

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Reference (javax.naming)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top PhpStorm plugins
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