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

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

Best Java code snippets using gov.sandia.cognition.learning.data.DefaultWeightedValueDiscriminant.create (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 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 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 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 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 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 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 DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final Collection<InputType> input)
{
  // compute the product of the class conditionals
  double maxPosterior = -1.0;
  CategoryType maxCategory = null;
  for (CategoryType category : this.getCategories())
  {
    // Actually, this is only proportionate to the posterior
    // We would need to divide by the unconditional probability
    // of the inputs to compute the accordinng-to-Hoyle posterior.
    double posterior =
      this.computeConjuctiveProbability(input, category);
    if (maxPosterior < posterior)
    {
      maxPosterior = posterior;
      maxCategory = category;
    }
  }
  return DefaultWeightedValueDiscriminant.create(maxCategory, maxPosterior);
}
origin: algorithmfoundry/Foundry

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final Collection<InputType> input)
{
  // compute the product of the class conditionals
  double maxPosterior = -1.0;
  CategoryType maxCategory = null;
  for (CategoryType category : this.getCategories())
  {
    // Actually, this is only proportionate to the posterior
    // We would need to divide by the unconditional probability
    // of the inputs to compute the accordinng-to-Hoyle posterior.
    double posterior =
      this.computeConjuctiveProbability(input, category);
    if (maxPosterior < posterior)
    {
      maxPosterior = posterior;
      maxCategory = category;
    }
  }
  return DefaultWeightedValueDiscriminant.create(maxCategory, maxPosterior);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final Collection<InputType> input)
{
  // compute the product of the class conditionals
  double maxPosterior = -1.0;
  CategoryType maxCategory = null;
  for (CategoryType category : this.getCategories())
  {
    // Actually, this is only proportionate to the posterior
    // We would need to divide by the unconditional probability
    // of the inputs to compute the accordinng-to-Hoyle posterior.
    double posterior =
      this.computeConjuctiveProbability(input, category);
    if (maxPosterior < posterior)
    {
      maxPosterior = posterior;
      maxCategory = category;
    }
  }
  return DefaultWeightedValueDiscriminant.create(maxCategory, maxPosterior);
}
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final InputType input)
{
  // Get the vote distribution.
  final DefaultDataDistribution<CategoryType> votes =
    this.evaluateAsVotes(input);
  // Get the maximum value of the votes.
  final CategoryType bestCategory = votes.getMaxValueKey();
  final double bestFraction = votes.getFraction(bestCategory);
  return DefaultWeightedValueDiscriminant.create(
    bestCategory, bestFraction);
}
origin: algorithmfoundry/Foundry

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final InputType input)
{
  // Get the vote distribution.
  final DefaultDataDistribution<CategoryType> votes =
    this.evaluateAsVotes(input);
  // Get the maximum value of the votes.
  final CategoryType bestCategory = votes.getMaxValueKey();
  final double bestFraction = votes.getFraction(bestCategory);
  return DefaultWeightedValueDiscriminant.create(
    bestCategory, bestFraction);
}
origin: algorithmfoundry/Foundry

@Override
public DefaultWeightedValueDiscriminant<CategoryType> evaluateWithDiscriminant(
  final InputType input)
{
  // Get the vote distribution.
  final DefaultDataDistribution<CategoryType> votes =
    this.evaluateAsVotes(input);
  // Get the maximum value of the votes.
  final CategoryType bestCategory = votes.getMaxValueKey();
  final double bestFraction = votes.getFraction(bestCategory);
  return DefaultWeightedValueDiscriminant.create(
    bestCategory, bestFraction);
}
origin: algorithmfoundry/Foundry

return DefaultWeightedValueDiscriminant.create(
  bestCategory, bestVotePercentage);
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

return DefaultWeightedValueDiscriminant.create(
  bestCategory, bestVotePercentage);
origin: algorithmfoundry/Foundry

  return DefaultWeightedValueDiscriminant.create(
    CollectionUtil.getFirst(this.categories), 1.0);
return DefaultWeightedValueDiscriminant.create(
  bestCategory, bestFraction);
origin: algorithmfoundry/Foundry

return DefaultWeightedValueDiscriminant.create(
  bestCategory, bestVotePercentage);
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

  return DefaultWeightedValueDiscriminant.create(
    CollectionUtil.getFirst(this.categories), 1.0);
return DefaultWeightedValueDiscriminant.create(
  bestCategory, bestFraction);
origin: algorithmfoundry/Foundry

return DefaultWeightedValueDiscriminant.create(
  maxCategory, logMaximumLikelihood);
origin: algorithmfoundry/Foundry

return DefaultWeightedValueDiscriminant.create(
  maxCategory, logMaximumLikelihood);
origin: gov.sandia.foundry/gov-sandia-cognition-learning-core

return DefaultWeightedValueDiscriminant.create(
  maxCategory, logMaximumLikelihood);
gov.sandia.cognition.learning.dataDefaultWeightedValueDiscriminantcreate

Javadoc

Convenience method for creating a new DefaultWeightedValueDiscriminant with a shallow copy of the given the given value and weight.

Popular methods of DefaultWeightedValueDiscriminant

  • getValue
  • getWeight
  • <init>
    Creates a DefaultWeightedValueDiscriminant with the given value and weight.
  • setValue
  • setWeight

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • putExtra (Intent)
  • 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
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Runner (org.openjdk.jmh.runner)
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