Codota Logo
DefaultWeightedValueDiscriminant
Code IndexAdd Codota to your IDE (free)

How to use
DefaultWeightedValueDiscriminant
in
gov.sandia.cognition.learning.data

Best Java code snippets using gov.sandia.cognition.learning.data.DefaultWeightedValueDiscriminant (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public ValueType getFirst()
{
  return this.getValue();
}
origin: openimaj/openimaj

  @Override
  protected <ANNOTATION> List<ScoredAnnotation<ANNOTATION>>
      getAnnotations(VectorNaiveBayesCategorizer<ANNOTATION, PDF> categorizer, Vector vec)
  {
    final List<ScoredAnnotation<ANNOTATION>> results = new ArrayList<ScoredAnnotation<ANNOTATION>>();
    final DefaultWeightedValueDiscriminant<ANNOTATION> r = categorizer.evaluateWithDiscriminant(vec);
    results.add(new ScoredAnnotation<ANNOTATION>(r.getValue(), (float) Math.exp(r.getWeight())));
    return results;
  }
};
origin: algorithmfoundry/Foundry

/**
 * Convenience method for creating a new
 * {@code DefaultWeightedValueDiscriminant} with the given value and weight.
 *
 * @param   <ValueType>
 *      The type of value to discriminate between.
 * @param   value
 *      The value for the pair.
 * @param   weight
 *      The weight that is to be used as the discriminant.
 * @return
 *      A new discriminant object.
 */
public static <ValueType> DefaultWeightedValueDiscriminant<ValueType> create(
  final ValueType value,
  final double weight)
{
  return new DefaultWeightedValueDiscriminant<ValueType>(value, weight);
}
origin: algorithmfoundry/Foundry

  new DefaultWeightedValueDiscriminant<CategoryType>();
result.setValue(minCat);
result.setWeight(minDelta);
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public ValueDiscriminantPair<Boolean, Double> evaluateWithDiscriminant(
  final InputType input)
{
  // Evaluate the input as a double whose sign is the category.
  final double value = this.evaluateAsDouble(input);
  final boolean category = value >= 0.0;
  // The discriminant needs to be larger for a better match, even in
  // the case of the false category, which requires doing an absolute
  // value to the sign.
  final double discriminant = category ? value : -value;
  return DefaultWeightedValueDiscriminant.create(category, discriminant);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public Double getDiscriminant()
{
  return this.getWeight();
}
origin: algorithmfoundry/Foundry

  new DefaultWeightedValueDiscriminant<CategoryType>();
result.setValue(minCat);
result.setWeight(minDelta);
origin: algorithmfoundry/Foundry

@Override
public ValueDiscriminantPair<Boolean, Double> evaluateWithDiscriminant(
  final InputType input)
{
  // Evaluate the input as a double whose sign is the category.
  final double value = this.evaluateAsDouble(input);
  final boolean category = value >= 0.0;
  // The discriminant needs to be larger for a better match, even in
  // the case of the false category, which requires doing an absolute
  // value to the sign.
  final double discriminant = category ? value : -value;
  return DefaultWeightedValueDiscriminant.create(category, discriminant);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public Double getSecond()
{
  return this.getWeight();
}
origin: algorithmfoundry/Foundry

  new DefaultWeightedValueDiscriminant<CategoryType>();
result.setValue(minCat);
result.setWeight(minDelta);
origin: algorithmfoundry/Foundry

@Override
public ValueType getFirst()
{
  return this.getValue();
}
origin: algorithmfoundry/Foundry

@Override
public ValueDiscriminantPair<Boolean, Double> evaluateWithDiscriminant(
  final InputType input)
{
  // Evaluate the input as a double whose sign is the category.
  final double value = this.evaluateAsDouble(input);
  final boolean category = value >= 0.0;
  // The discriminant needs to be larger for a better match, even in
  // the case of the false category, which requires doing an absolute
  // value to the sign.
  final double discriminant = category ? value : -value;
  return DefaultWeightedValueDiscriminant.create(category, discriminant);
}
origin: algorithmfoundry/Foundry

@Override
public Double getSecond()
{
  return this.getWeight();
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

/**
 * Convenience method for creating a new
 * {@code DefaultWeightedValueDiscriminant} with the given value and weight.
 *
 * @param   <ValueType>
 *      The type of value to discriminate between.
 * @param   value
 *      The value for the pair.
 * @param   weight
 *      The weight that is to be used as the discriminant.
 * @return
 *      A new discriminant object.
 */
public static <ValueType> DefaultWeightedValueDiscriminant<ValueType> create(
  final ValueType value,
  final double weight)
{
  return new DefaultWeightedValueDiscriminant<ValueType>(value, weight);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

  new DefaultWeightedValueDiscriminant<CategoryType>();
result.setValue(minCat);
result.setWeight(minDelta);
origin: algorithmfoundry/Foundry

@Override
public ValueType getFirst()
{
  return this.getValue();
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final ObservationType input)
{
  CategoryType maxCategory = null;
  double maxPosterior = Double.NEGATIVE_INFINITY;
  for( CategoryType category : this.getCategories() )
  {
    double posterior = this.computePosterior(input, category);
    if( maxPosterior < posterior )
    {
      maxPosterior = posterior;
      maxCategory = category;
    }
  }
  return DefaultWeightedValueDiscriminant.create(maxCategory, maxPosterior);
}
origin: algorithmfoundry/Foundry

@Override
public Double getDiscriminant()
{
  return this.getWeight();
}
origin: algorithmfoundry/Foundry

/**
 * Convenience method for creating a new
 * {@code DefaultWeightedValueDiscriminant} with the given value and weight.
 *
 * @param   <ValueType>
 *      The type of value to discriminate between.
 * @param   value
 *      The value for the pair.
 * @param   weight
 *      The weight that is to be used as the discriminant.
 * @return
 *      A new discriminant object.
 */
public static <ValueType> DefaultWeightedValueDiscriminant<ValueType> create(
  final ValueType value,
  final double weight)
{
  return new DefaultWeightedValueDiscriminant<ValueType>(value, weight);
}
origin: algorithmfoundry/Foundry

  new DefaultWeightedValueDiscriminant<CategoryType>();
result.setValue(minCat);
result.setWeight(minDelta);
gov.sandia.cognition.learning.dataDefaultWeightedValueDiscriminant

Javadoc

An implementation of ValueDiscriminantPair that stores a double as the discriminant. It extends DefaultWeightedValue and thus also is a WeightedValue. This may be the most generally used implementation of the ValueDiscriminantPair since it covers the common case where the discriminant is a real value.

Most used methods

  • getValue
  • getWeight
  • <init>
    Creates a DefaultWeightedValueDiscriminant with the given value and weight.
  • create
    Convenience method for creating a new DefaultWeightedValueDiscriminant with the given value and weig
  • setValue
  • setWeight

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
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