Documentation ¶
Index ¶
- type Word2VecBuilder
- func (wb *Word2VecBuilder) Build() (model.Model, error)
- func (wb *Word2VecBuilder) SetBatchSize(batchSize int) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetDimension(dimension int) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetInitLearningRate(initlr float64) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetMaxDepth(maxDepth int) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetModel(model string) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetNegativeSampleSize(size int) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetOptimizer(optimizer string) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetSubSampleThreshold(threshold float64) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetTheta(theta float64) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetToLower(toLower bool) *Word2VecBuilder
- func (wb *Word2VecBuilder) SetWindow(window int) *Word2VecBuilder
- func (wb *Word2VecBuilder) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Word2VecBuilder ¶
type Word2VecBuilder struct {
// contains filtered or unexported fields
}
Word2VecBuilder manages the members to build the Model interface. TODO: Validate the fields on Build called.
func NewWord2VecBuilder ¶
func NewWord2VecBuilder() *Word2VecBuilder
NewWord2VecBuilder creates *Word2VecBuilder.
func NewWord2VecBuilderViper ¶
func NewWord2VecBuilderViper() *Word2VecBuilder
NewWord2VecBuilderViper creates *Word2VecBuilder using viper.
func (*Word2VecBuilder) Build ¶
func (wb *Word2VecBuilder) Build() (model.Model, error)
Build creates model.Model interface.
func (*Word2VecBuilder) SetBatchSize ¶
func (wb *Word2VecBuilder) SetBatchSize(batchSize int) *Word2VecBuilder
SetBatchSize sets the batch size to update learning rate.
func (*Word2VecBuilder) SetDimension ¶
func (wb *Word2VecBuilder) SetDimension(dimension int) *Word2VecBuilder
SetDimension sets the dimension of word vector.
func (*Word2VecBuilder) SetInitLearningRate ¶
func (wb *Word2VecBuilder) SetInitLearningRate(initlr float64) *Word2VecBuilder
SetInitLearningRate sets the initial learning rate.
func (*Word2VecBuilder) SetMaxDepth ¶
func (wb *Word2VecBuilder) SetMaxDepth(maxDepth int) *Word2VecBuilder
SetMaxDepth sets the number of times to track huffman tree.
func (*Word2VecBuilder) SetModel ¶
func (wb *Word2VecBuilder) SetModel(model string) *Word2VecBuilder
SetModel sets the model of Word2Vec. One of: cbow|skip-gram
func (*Word2VecBuilder) SetNegativeSampleSize ¶
func (wb *Word2VecBuilder) SetNegativeSampleSize(size int) *Word2VecBuilder
SetNegativeSampleSize sets the number of the samples as negative.
func (*Word2VecBuilder) SetOptimizer ¶
func (wb *Word2VecBuilder) SetOptimizer(optimizer string) *Word2VecBuilder
SetOptimizer sets the optimizer of Word2Vec. One of: hs|ns
func (*Word2VecBuilder) SetSubSampleThreshold ¶
func (wb *Word2VecBuilder) SetSubSampleThreshold(threshold float64) *Word2VecBuilder
SetSubSampleThreshold sets the threshold for subsampling.
func (*Word2VecBuilder) SetTheta ¶
func (wb *Word2VecBuilder) SetTheta(theta float64) *Word2VecBuilder
SetTheta sets the lower limit of learning rate (lr >= initlr * theta).
func (*Word2VecBuilder) SetToLower ¶
func (wb *Word2VecBuilder) SetToLower(toLower bool) *Word2VecBuilder
SetToLower sets whether the words on corpus convert to lowercase or not.
func (*Word2VecBuilder) SetWindow ¶
func (wb *Word2VecBuilder) SetWindow(window int) *Word2VecBuilder
SetWindow sets the context window size.
func (*Word2VecBuilder) String ¶
func (wb *Word2VecBuilder) String() string