Tabnine Logo
NumericVectorFeature.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.oculusinfo.ml.feature.numeric.NumericVectorFeature
constructor

Best Java code snippets using com.oculusinfo.ml.feature.numeric.NumericVectorFeature.<init> (Showing top 2 results out of 315)

origin: unchartedsoftware/ensemble-clustering

  public NumericVectorFeature fieldToNumericVectorFeature(String name) {
    Field field = fields.get(name);
    
    if (field == null) return null;
    
    NumericVectorFeature feature = null;
    
    try {
      feature = new NumericVectorFeature(field.name);
    
      String val = field.value.substring(1, field.value.length()-1);  // strip off enclosing [ ]
    
      if (val.isEmpty()) return null;
      
      String[] entries = val.split(";");
    
      double[] vector = new double[entries.length];
    
      for (int i=0; i < entries.length; i++) {
        if (entries[i].isEmpty()) continue;
        vector[i] = Double.parseDouble(entries[i]);
      }
      feature.setValue(vector);
    }
    catch (Exception e) {
      e.printStackTrace();
    }    
    return feature;
  }
}
origin: unchartedsoftware/ensemble-clustering

@Override
public NumericVectorFeature getCentroid() {
  // create the centroid geospatial feature set
  NumericVectorFeature mean = new NumericVectorFeature(name);
  
  mean.setValue(meanVector);
  mean.setWeight(weight);
      
  return mean;
}
com.oculusinfo.ml.feature.numericNumericVectorFeature<init>

Popular methods of NumericVectorFeature

  • setValue
  • getName
  • getValue
  • getWeight
  • setWeight
  • vectorToString

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JOptionPane (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 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