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

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top plugins for Android Studio
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