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

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BoxLayout (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 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