public class SequenceVectors<T extends SequenceElement> extends WordVectorsImpl<T> implements WordVectors
| Modifier and Type | Class and Description |
|---|---|
protected class |
SequenceVectors.AsyncSequencer
This class is used to fetch data from iterator in background thread, and convert it to List
|
static class |
SequenceVectors.Builder<T extends SequenceElement> |
| Modifier and Type | Field and Description |
|---|---|
protected VectorsConfiguration |
configuration |
protected ElementsLearningAlgorithm<T> |
elementsLearningAlgorithm |
protected Set<VectorsListener<T>> |
eventListeners |
protected WordVectors |
existingModel |
protected SequenceIterator<T> |
iterator |
protected static org.slf4j.Logger |
log |
protected com.google.common.util.concurrent.AtomicDouble |
scoreElements |
protected com.google.common.util.concurrent.AtomicDouble |
scoreSequences |
protected SequenceLearningAlgorithm<T> |
sequenceLearningAlgorithm |
protected T |
unknownElement |
batchSize, DEFAULT_UNK, layerSize, learningRate, learningRateDecayWords, lookupTable, minLearningRate, minWordFrequency, modelUtils, negative, numEpochs, numIterations, resetModel, sampling, seed, stopWords, trainElementsVectors, trainSequenceVectors, useAdeGrad, useUnknown, variableWindows, vocab, window, workers| Constructor and Description |
|---|
SequenceVectors() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildVocab()
Builds vocabulary from provided SequenceIterator instance
|
void |
fit()
Starts training over
|
double |
getElementsScore() |
double |
getSequencesScore() |
protected void |
trainSequence(Sequence<T> sequence,
AtomicLong nextRandom,
double alpha) |
accuracy, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, setLookupTable, setModelUtils, setVocab, similarity, similarWordsInVocabTo, update, update, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSumclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccuracy, getUNK, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, getWordVectors, getWordVectorsMean, hasWord, indexOf, lookupTable, setModelUtils, setUNK, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSumprotected transient SequenceIterator<T extends SequenceElement> iterator
protected transient ElementsLearningAlgorithm<T extends SequenceElement> elementsLearningAlgorithm
protected transient SequenceLearningAlgorithm<T extends SequenceElement> sequenceLearningAlgorithm
protected VectorsConfiguration configuration
protected static final org.slf4j.Logger log
protected transient WordVectors existingModel
protected transient T extends SequenceElement unknownElement
protected transient com.google.common.util.concurrent.AtomicDouble scoreElements
protected transient com.google.common.util.concurrent.AtomicDouble scoreSequences
protected transient Set<VectorsListener<T extends SequenceElement>> eventListeners
public double getElementsScore()
public double getSequencesScore()
public void buildVocab()
public void fit()
protected void trainSequence(@NonNull
Sequence<T> sequence,
AtomicLong nextRandom,
double alpha)
Copyright © 2016. All Rights Reserved.