Codota Logo
ContinuousFeature.getName
Code IndexAdd Codota to your IDE (free)

How to use
getName
method
in
org.jpmml.converter.ContinuousFeature

Best Java code snippets using org.jpmml.converter.ContinuousFeature.getName (Showing top 5 results out of 315)

  • Common ways to obtain ContinuousFeature
private void myMethod () {
ContinuousFeature c =
  • Codota IconFeature feature;feature.toContinuousFeature()
  • Smart code suggestions by Codota
}
origin: jpmml/jpmml-sklearn

Discretize discretize = new Discretize(continuousFeature.getName());
origin: jpmml/jpmml-sparkml

@Override
public List<Feature> encodeFeatures(SparkMLEncoder encoder){
  Bucketizer transformer = getTransformer();
  Feature feature = encoder.getOnlyFeature(transformer.getInputCol());
  ContinuousFeature continuousFeature = feature.toContinuousFeature();
  Discretize discretize = new Discretize(continuousFeature.getName());
  List<String> categories = new ArrayList<>();
  double[] splits = transformer.getSplits();
  for(int i = 0; i < (splits.length - 1); i++){
    String category = String.valueOf(i);
    categories.add(category);
    Interval interval = new Interval((i < (splits.length - 2)) ? Interval.Closure.CLOSED_OPEN : Interval.Closure.CLOSED_CLOSED)
      .setLeftMargin(formatMargin(splits[i]))
      .setRightMargin(formatMargin(splits[i + 1]));
    DiscretizeBin discretizeBin = new DiscretizeBin(category, interval);
    discretize.addDiscretizeBins(discretizeBin);
  }
  DerivedField derivedField = encoder.createDerivedField(formatName(transformer), OpType.CATEGORICAL, DataType.INTEGER, discretize);
  return Collections.singletonList(new CategoricalFeature(encoder, derivedField, categories));
}
origin: jpmml/jpmml-sparkml

Field<?> field = encoder.toCategorical(continuousFeature.getName(), categories);
origin: jpmml/jpmml-sklearn

FieldName name = continuousFeature.getName();
origin: jpmml/jpmml-sklearn

@Override
public NaiveBayesModel encodeModel(Schema schema){
  int[] shape = getThetaShape();
  int numberOfClasses = shape[0];
  int numberOfFeatures = shape[1];
  List<? extends Number> theta = getTheta();
  List<? extends Number> sigma = getSigma();
  CategoricalLabel categoricalLabel = (CategoricalLabel)schema.getLabel();
  BayesInputs bayesInputs = new BayesInputs();
  for(int i = 0; i < numberOfFeatures; i++){
    Feature feature = schema.getFeature(i);
    List<? extends Number> means = CMatrixUtil.getColumn(theta, numberOfClasses, numberOfFeatures, i);
    List<? extends Number> variances = CMatrixUtil.getColumn(sigma, numberOfClasses, numberOfFeatures, i);
    ContinuousFeature continuousFeature = feature.toContinuousFeature();
    BayesInput bayesInput = new BayesInput(continuousFeature.getName())
      .setTargetValueStats(encodeTargetValueStats(categoricalLabel.getValues(), means, variances));
    bayesInputs.addBayesInputs(bayesInput);
  }
  List<Integer> classCount = getClassCount();
  BayesOutput bayesOutput = new BayesOutput(categoricalLabel.getName(), null)
    .setTargetValueCounts(encodeTargetValueCounts(categoricalLabel.getValues(), classCount));
  NaiveBayesModel naiveBayesModel = new NaiveBayesModel(0d, MiningFunction.CLASSIFICATION, ModelUtil.createMiningSchema(categoricalLabel), bayesInputs, bayesOutput)
    .setOutput(ModelUtil.createProbabilityOutput(DataType.DOUBLE, categoricalLabel));
  return naiveBayesModel;
}
org.jpmml.converterContinuousFeaturegetName

Popular methods of ContinuousFeature

  • <init>
  • ref
  • getDataType
  • toContinuousFeature

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now