public class ParagraphVectors extends Word2Vec
| Modifier and Type | Class and Description |
|---|---|
static class |
ParagraphVectors.Builder |
SequenceVectors.AsyncSequencer| Modifier and Type | Field and Description |
|---|---|
protected LabelAwareIterator |
labelAwareIterator |
protected LabelsSource |
labelsSource |
sentenceIter, tokenizerFactoryconfiguration, elementsLearningAlgorithm, eventListeners, existingModel, iterator, log, scoreElements, scoreSequences, sequenceLearningAlgorithm, unknownElementbatchSize, 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 |
|---|
ParagraphVectors() |
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(LabelledDocument document)
This method calculates inferred vector for given document, with default parameters for learning rate and iterations
|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(LabelledDocument document,
double learningRate,
double minLearningRate,
int iterations)
This method calculates inferred vector for given document
|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(List<VocabWord> document)
This method calculates inferred vector for given list of words, with default parameters for learning rate and iterations
|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(List<VocabWord> document,
double learningRate,
double minLearningRate,
int iterations)
This method calculates inferred vector for given document
|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(String text)
This method calculates inferred vector for given text, with default parameters for learning rate and iterations
|
org.nd4j.linalg.api.ndarray.INDArray |
inferVector(String text,
double learningRate,
double minLearningRate,
int iterations)
This method calculates inferred vector for given text
|
Collection<String> |
nearestLabels(Collection<VocabWord> document,
int topN)
This method returns top N labels nearest to specified set of vocab words
|
Collection<String> |
nearestLabels(org.nd4j.linalg.api.ndarray.INDArray labelVector,
int topN)
This method returns top N labels nearest to specified features vector
|
Collection<String> |
nearestLabels(LabelledDocument document,
int topN)
This method returns top N labels nearest to specified document
|
Collection<String> |
nearestLabels(String rawText,
int topN)
This method returns top N labels nearest to specified text
|
String |
predict(LabelledDocument document)
Deprecated.
|
String |
predict(List<VocabWord> document)
Deprecated.
|
String |
predict(String rawText)
Deprecated.
|
Collection<String> |
predictSeveral(LabelledDocument document,
int limit)
Deprecated.
|
Collection<String> |
predictSeveral(List<VocabWord> document,
int limit)
Deprecated.
|
Collection<String> |
predictSeveral(String rawText,
int limit)
Deprecated.
|
double |
similarityToLabel(LabelledDocument document,
String label)
This method returns similarity of the document to specific label, based on mean value
|
double |
similarityToLabel(List<VocabWord> document,
String label)
This method returns similarity of the document to specific label, based on mean value
|
double |
similarityToLabel(String rawText,
String label)
This method returns similarity of the document to specific label, based on mean value
|
setSentenceIter, setTokenizerFactorybuildVocab, fit, getElementsScore, getSequencesScore, trainSequenceaccuracy, 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 LabelsSource labelsSource
protected transient LabelAwareIterator labelAwareIterator
@Deprecated public String predict(String rawText)
rawText - @Deprecated public String predict(LabelledDocument document)
document - the documentpublic org.nd4j.linalg.api.ndarray.INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations)
text - public org.nd4j.linalg.api.ndarray.INDArray inferVector(LabelledDocument document, double learningRate, double minLearningRate, int iterations)
document - public org.nd4j.linalg.api.ndarray.INDArray inferVector(List<VocabWord> document, double learningRate, double minLearningRate, int iterations)
document - public org.nd4j.linalg.api.ndarray.INDArray inferVector(String text)
text - public org.nd4j.linalg.api.ndarray.INDArray inferVector(LabelledDocument document)
document - public org.nd4j.linalg.api.ndarray.INDArray inferVector(List<VocabWord> document)
document - @Deprecated public String predict(List<VocabWord> document)
document - the document@Deprecated public Collection<String> predictSeveral(@NonNull LabelledDocument document, int limit)
document - raw text of the document@Deprecated public Collection<String> predictSeveral(String rawText, int limit)
rawText - raw text of the document@Deprecated public Collection<String> predictSeveral(List<VocabWord> document, int limit)
document - the documentpublic Collection<String> nearestLabels(LabelledDocument document, int topN)
document - topN - public Collection<String> nearestLabels(String rawText, int topN)
rawText - topN - public Collection<String> nearestLabels(Collection<VocabWord> document, int topN)
document - topN - public Collection<String> nearestLabels(org.nd4j.linalg.api.ndarray.INDArray labelVector, int topN)
labelVector - topN - public double similarityToLabel(String rawText, String label)
rawText - label - public double similarityToLabel(LabelledDocument document, String label)
document - label - Copyright © 2016. All Rights Reserved.