public static class SparkSequenceVectors.Builder<T extends SequenceElement>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected VectorsConfiguration |
configuration |
protected SparkModelExporter<T> |
modelExporter |
protected org.nd4j.parameterserver.distributed.conf.VoidConfiguration |
peersConfiguration |
protected org.apache.spark.storage.StorageLevel |
storageLevel |
protected int |
workers |
Constructor and Description |
---|
Builder()
Deprecated.
|
Builder(org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration) |
Builder(org.nd4j.parameterserver.distributed.conf.VoidConfiguration psConfiguration,
VectorsConfiguration w2vConfiguration) |
protected VectorsConfiguration configuration
protected SparkModelExporter<T extends SequenceElement> modelExporter
protected org.nd4j.parameterserver.distributed.conf.VoidConfiguration peersConfiguration
protected int workers
protected org.apache.spark.storage.StorageLevel storageLevel
@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 w2vConfiguration)
public SparkSequenceVectors.Builder<T> setStorageLevel(org.apache.spark.storage.StorageLevel level)
level
- public SparkSequenceVectors.Builder<T> minWordFrequency(int num)
num
- public SparkSequenceVectors.Builder<T> workers(int num)
num
- public SparkSequenceVectors.Builder<T> setLearningRate(double lr)
lr
- public SparkSequenceVectors.Builder<T> setParameterServerConfiguration(@NonNull org.nd4j.parameterserver.distributed.conf.VoidConfiguration configuration)
configuration
- public SparkSequenceVectors.Builder<T> setModelExporter(@NonNull SparkModelExporter<T> modelExporter)
modelExporter
- public SparkSequenceVectors.Builder<T> epochs(int num)
num
- public SparkSequenceVectors.Builder<T> iterations(int num)
num
- public SparkSequenceVectors.Builder<T> subsampling(double rate)
rate
- public SparkSequenceVectors.Builder<T> useHierarchicSoftmax(boolean reallyUse)
reallyUse
- public SparkSequenceVectors.Builder<T> negativeSampling(long samples)
samples
- public SparkSequenceVectors.Builder<T> setElementsLearningAlgorithm(@NonNull SparkElementsLearningAlgorithm ela)
ela
- public SparkSequenceVectors.Builder<T> setSequenceLearningAlgorithm(@NonNull SparkSequenceLearningAlgorithm sla)
sla
- public SparkSequenceVectors.Builder<T> layerSize(int layerSize)
public SparkSequenceVectors<T> build()