public static class SparkWord2Vec.Builder extends SparkSequenceVectors.Builder<VocabWord>
configuration, modelExporter, peersConfiguration, storageLevel, workers
Constructor and Description |
---|
Builder()
Deprecated.
|
Builder(org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration) |
Builder(org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration,
VectorsConfiguration configuration) |
@Deprecated public Builder()
public Builder(@NonNull org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration)
public Builder(@NonNull org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration, @NonNull VectorsConfiguration configuration)
public SparkWord2Vec.Builder setTokenizerFactory(@NonNull TokenizerFactory tokenizerFactory)
tokenizerFactory
- public SparkWord2Vec.Builder setLearningAlgorithm(@NonNull SparkElementsLearningAlgorithm ela)
ela
- public SparkWord2Vec.Builder setModelExporter(@NonNull SparkModelExporter<VocabWord> exporter)
setModelExporter
in class SparkSequenceVectors.Builder<VocabWord>
exporter
- public SparkWord2Vec.Builder workers(int numWorkers)
workers
in class SparkSequenceVectors.Builder<VocabWord>
numWorkers
- public SparkWord2Vec.Builder epochs(int numEpochs)
epochs
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder setStorageLevel(org.apache.spark.storage.StorageLevel level)
setStorageLevel
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder minWordFrequency(int num)
minWordFrequency
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder setLearningRate(double lr)
setLearningRate
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder setParameterServerConfiguration(@NonNull org.nd4j.parameterserver.distributed.conf.VoidConfiguration configuration)
setParameterServerConfiguration
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder iterations(int num)
iterations
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder subsampling(double rate)
subsampling
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder negativeSampling(long samples)
negativeSampling
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder setElementsLearningAlgorithm(@NonNull SparkElementsLearningAlgorithm ela)
setElementsLearningAlgorithm
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder setSequenceLearningAlgorithm(@NonNull SparkSequenceLearningAlgorithm sla)
setSequenceLearningAlgorithm
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder useHierarchicSoftmax(boolean reallyUse)
useHierarchicSoftmax
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec.Builder layerSize(int layerSize)
layerSize
in class SparkSequenceVectors.Builder<VocabWord>
public SparkWord2Vec build()
build
in class SparkSequenceVectors.Builder<VocabWord>