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 SequenceIterator<T> |
iterator |
protected static org.slf4j.Logger |
log |
protected SequenceLearningAlgorithm<T> |
sequenceLearningAlgorithm |
batchSize, layerSize, learningRate, learningRateDecayWords, lookupTable, minLearningRate, minWordFrequency, negative, numEpochs, numIterations, resetModel, sampling, stopWords, trainElementsVectors, trainSequenceVectors, UNK, useAdeGrad, vocab, vpTree, 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
|
protected void |
trainSequence(Sequence<T> sequence,
AtomicLong nextRandom,
double alpha) |
accuracy, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, hasWord, indexOf, lookupTable, setLookupTable, setVocab, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accuracy, getWordVector, getWordVectorMatrix, getWordVectorMatrixNormalized, hasWord, indexOf, lookupTable, similarity, similarWordsInVocabTo, vocab, wordsNearest, wordsNearest, wordsNearest, wordsNearestSum, wordsNearestSum, wordsNearestSum
protected 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
public void buildVocab()
public void fit()
protected void trainSequence(@NonNull Sequence<T> sequence, AtomicLong nextRandom, double alpha)
Copyright © 2016. All Rights Reserved.