Tabnine Logo
Feature.getField
Code IndexAdd Tabnine to your IDE (free)

How to use
getField
method
in
org.jpmml.converter.Feature

Best Java code snippets using org.jpmml.converter.Feature.getField (Showing top 3 results out of 315)

origin: org.jpmml/jpmml-h2o

  static
  public Feature encodeFeature(Feature feature, Object replacementValue, MissingValueTreatmentMethod missingValueTreatmentMethod){
    ModelEncoder encoder = (ModelEncoder)feature.getEncoder();

    Field<?> field = feature.getField();

    if(field instanceof DataField){
      MissingValueDecorator missingValueDecorator = new MissingValueDecorator()
        .setMissingValueReplacement(ValueUtil.formatValue(replacementValue))
        .setMissingValueTreatment(missingValueTreatmentMethod);

      encoder.addDecorator(feature.getName(), missingValueDecorator);

      return feature;
    } else

    {
      throw new IllegalArgumentException();
    }
  }
}
origin: jpmml/jpmml-sparkml

  @Override
  public List<Feature> encodeFeatures(SparkMLEncoder encoder){
    RegexTokenizer transformer = getTransformer();

    if(!transformer.getGaps()){
      throw new IllegalArgumentException("Expected splitter mode, got token matching mode");
    } // End if

    if(transformer.getMinTokenLength() != 1){
      throw new IllegalArgumentException("Expected 1 as minimum token length, got " + transformer.getMinTokenLength() + " as minimum token length");
    }

    Feature feature = encoder.getOnlyFeature(transformer.getInputCol());

    Field<?> field = feature.getField();

    if(transformer.getToLowercase()){
      Apply apply = PMMLUtil.createApply("lowercase", feature.ref());

      field = encoder.createDerivedField(FeatureUtil.createName("lowercase", feature), OpType.CATEGORICAL, DataType.STRING, apply);
    }

    return Collections.singletonList(new DocumentFeature(encoder, field, transformer.getPattern()));
  }
}
origin: jpmml/jpmml-sklearn

static
public Feature encodeFeature(Feature feature, Object missingValue, Object replacementValue, MissingValueTreatmentMethod missingValueTreatmentMethod, SkLearnEncoder encoder){
  Field<?> field = feature.getField();
org.jpmml.converterFeaturegetField

Popular methods of Feature

  • toContinuousFeature
  • getName
  • ref
  • getDataType
  • getEncoder
  • equals
  • hashCode
  • toStringHelper

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JList (javax.swing)
  • JTextField (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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