## org.apache.mahout.vectorizer.encoders
Class ContinuousValueEncoder

    java.lang.Object
      org.apache.mahout.vectorizer.encoders.FeatureVectorEncoder
          org.apache.mahout.vectorizer.encoders.CachingValueEncoder
              org.apache.mahout.vectorizer.encoders.ContinuousValueEncoder

Direct Known Subclasses:
  CachingContinuousValueEncoder

    public class ContinuousValueEncoder

extends CachingValueEncoder

Continuous values are stored in fixed randomized location in the feature vector.

Field Summary

Fields inherited from class org.apache.mahout.vectorizer.encoders.FeatureVectorEncoder
`CONTINUOUS_VALUE_HASH_SEED, WORD_LIKE_VALUE_HASH_SEED`

Constructor Summary
`ContinuousValueEncoder(String name)`

Method Summary
`void` `addToVector(byte[] originalForm, double weight, Vector data)` Adds a value to a vector.
`String` `asString(String originalForm)` Converts a value into a form that would help a human understand the internals of how the value is being interpreted.
`protected int` `getSeed()`
`protected double` `getWeight(byte[] originalForm, double w)`

Methods inherited from class org.apache.mahout.vectorizer.encoders.CachingValueEncoder
`hashForProbe, setProbes`

Methods inherited from class org.apache.mahout.vectorizer.encoders.FeatureVectorEncoder
`addToVector, addToVector, addToVector, bytesForString, getName, getProbes, hash, hash, hash, hash, hash, hashesForProbe, isTraceEnabled, setTraceDictionary, trace, trace`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContinuousValueEncoder

    public ContinuousValueEncoder(String name)

Method Detail

### addToVector

    public void addToVector(byte[] originalForm,
                            double weight,
                            Vector data)

  Adds a value to a vector.

  Specified by:
    `addToVector` in class `FeatureVectorEncoder`
  Parameters:
    `originalForm` - The original form of the value as a string.
    `data` - The vector to which the value should be added.

### getWeight

    protected double getWeight(byte[] originalForm,
                               double w)

  Overrides:
    `getWeight` in class `FeatureVectorEncoder`

### asString

    public String asString(String originalForm)

  Converts a value into a form that would help a human understand the internals of how the value is being interpreted. For text-like things, this is likely to be a list of the terms found with associated weights (if any).

  Specified by:
    `asString` in class `FeatureVectorEncoder`
  Parameters:
    `originalForm` - The original form of the value as a string.
  Returns:
    A string that a human can read.

### getSeed

    protected int getSeed()

  Specified by:
    `getSeed` in class `CachingValueEncoder`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.