Tabnine Logo
ContinuousFeature.getName
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • getSystemService (Context)
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Sublime Text for Python
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