@Deprecated public class Word2VecPerformerVoid extends Object implements org.apache.spark.api.java.function.VoidFunction<Pair<List<VocabWord>,AtomicLong>>
| Modifier and Type | Field and Description |
|---|---|
static String |
ADAGRAD
Deprecated.
|
static String |
ALPHA
Deprecated.
|
static String |
ITERATIONS
Deprecated.
|
static String |
MIN_ALPHA
Deprecated.
|
static String |
NAME_SPACE
Deprecated.
|
static String |
NEGATIVE
Deprecated.
|
static String |
NUM_WORDS
Deprecated.
|
static String |
TABLE
Deprecated.
|
static String |
VECTOR_LENGTH
Deprecated.
|
static String |
WINDOW
Deprecated.
|
| Constructor and Description |
|---|
Word2VecPerformerVoid(org.apache.spark.SparkConf sc,
org.apache.spark.broadcast.Broadcast<AtomicLong> wordCount,
InMemoryLookupTable weights)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
call(Pair<List<VocabWord>,AtomicLong> pair)
Deprecated.
|
double |
getAlpha()
Deprecated.
|
double[] |
getExpTable()
Deprecated.
|
int |
getIterations()
Deprecated.
|
int |
getLastChecked()
Deprecated.
|
static org.slf4j.Logger |
getLog()
Deprecated.
|
static double |
getMAX_EXP()
Deprecated.
|
double |
getMinAlpha()
Deprecated.
|
double |
getNegative()
Deprecated.
|
AtomicLong |
getNextRandom()
Deprecated.
|
int |
getNumWords()
Deprecated.
|
org.nd4j.linalg.api.ndarray.INDArray |
getTable()
Deprecated.
|
int |
getTotalWords()
Deprecated.
|
int |
getVectorLength()
Deprecated.
|
InMemoryLookupTable |
getWeights()
Deprecated.
|
int |
getWindow()
Deprecated.
|
org.apache.spark.broadcast.Broadcast<AtomicLong> |
getWordCount()
Deprecated.
|
boolean |
isUseAdaGrad()
Deprecated.
|
void |
iterateSample(VocabWord w1,
VocabWord w2,
double alpha)
Deprecated.
Iterate on the given 2 vocab words
|
void |
setAlpha(double alpha)
Deprecated.
|
void |
setExpTable(double[] expTable)
Deprecated.
|
void |
setIterations(int iterations)
Deprecated.
|
void |
setLastChecked(int lastChecked)
Deprecated.
|
static void |
setMAX_EXP(double MAX_EXP)
Deprecated.
|
void |
setMinAlpha(double minAlpha)
Deprecated.
|
void |
setNegative(double negative)
Deprecated.
|
void |
setNextRandom(AtomicLong nextRandom)
Deprecated.
|
void |
setNumWords(int numWords)
Deprecated.
|
void |
setTable(org.nd4j.linalg.api.ndarray.INDArray table)
Deprecated.
|
void |
setTotalWords(int totalWords)
Deprecated.
|
void |
setup(org.apache.spark.SparkConf conf)
Deprecated.
|
void |
setUseAdaGrad(boolean useAdaGrad)
Deprecated.
|
void |
setVectorLength(int vectorLength)
Deprecated.
|
void |
setWeights(InMemoryLookupTable weights)
Deprecated.
|
void |
setWindow(int window)
Deprecated.
|
void |
setWordCount(org.apache.spark.broadcast.Broadcast<AtomicLong> wordCount)
Deprecated.
|
void |
skipGram(int i,
List<VocabWord> sentence,
int b,
double alpha)
Deprecated.
Train via skip gram
|
void |
trainSentence(List<VocabWord> sentence,
double alpha)
Deprecated.
Train on a list of vocab words
|
public static final String NAME_SPACE
public static final String VECTOR_LENGTH
public static final String ADAGRAD
public static final String NEGATIVE
public static final String NUM_WORDS
public static final String TABLE
public static final String WINDOW
public static final String ALPHA
public static final String MIN_ALPHA
public static final String ITERATIONS
public Word2VecPerformerVoid(org.apache.spark.SparkConf sc,
org.apache.spark.broadcast.Broadcast<AtomicLong> wordCount,
InMemoryLookupTable weights)
public void setup(org.apache.spark.SparkConf conf)
public int getVectorLength()
public void setVectorLength(int vectorLength)
public double[] getExpTable()
public void setExpTable(double[] expTable)
public InMemoryLookupTable getWeights()
public void setWeights(InMemoryLookupTable weights)
public org.apache.spark.broadcast.Broadcast<AtomicLong> getWordCount()
public void setWordCount(org.apache.spark.broadcast.Broadcast<AtomicLong> wordCount)
public int getLastChecked()
public void setLastChecked(int lastChecked)
public static org.slf4j.Logger getLog()
public int getIterations()
public void setIterations(int iterations)
public int getTotalWords()
public void setTotalWords(int totalWords)
public double getMinAlpha()
public void setMinAlpha(double minAlpha)
public double getAlpha()
public void setAlpha(double alpha)
public AtomicLong getNextRandom()
public void setNextRandom(AtomicLong nextRandom)
public int getWindow()
public void setWindow(int window)
public org.nd4j.linalg.api.ndarray.INDArray getTable()
public void setTable(org.nd4j.linalg.api.ndarray.INDArray table)
public int getNumWords()
public void setNumWords(int numWords)
public double getNegative()
public void setNegative(double negative)
public boolean isUseAdaGrad()
public void setUseAdaGrad(boolean useAdaGrad)
public static double getMAX_EXP()
public static void setMAX_EXP(double MAX_EXP)
public void trainSentence(List<VocabWord> sentence, double alpha)
sentence - the list of vocab words to train onpublic void skipGram(int i,
List<VocabWord> sentence,
int b,
double alpha)
i - sentence - public void iterateSample(VocabWord w1, VocabWord w2, double alpha)
w1 - the first word to iterate onw2 - the second word to iterate onpublic void call(Pair<List<VocabWord>,AtomicLong> pair) throws Exception
call in interface org.apache.spark.api.java.function.VoidFunction<Pair<List<VocabWord>,AtomicLong>>ExceptionCopyright © 2016. All Rights Reserved.