Documentation ¶
Index ¶
- func LoadForCmd(cmd *cobra.Command, opts *Options)
- func New(opts ...ModelOption) (model.Model, error)
- func NewForOptions(opts Options) (model.Model, error)
- type ModelOption
- func BatchSize(v int) ModelOption
- func Dim(v int) ModelOption
- func DocInMemory() ModelOption
- func Goroutines(v int) ModelOption
- func Initlr(v float64) ModelOption
- func Iter(v int) ModelOption
- func LogBatch(v int) ModelOption
- func MaxCount(v int) ModelOption
- func MinCount(v int) ModelOption
- func MinLR(v float64) ModelOption
- func NegativeSampleSize(v int) ModelOption
- func Relation(typ RelationType) ModelOption
- func Smooth(v float64) ModelOption
- func SubsampleThreshold(v float64) ModelOption
- func ToLower() ModelOption
- func UpdateLRBatch(v int) ModelOption
- func Verbose() ModelOption
- func Window(v int) ModelOption
- type Options
- type RelationType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadForCmd ¶
Types ¶
type ModelOption ¶
type ModelOption func(*Options)
func BatchSize ¶
func BatchSize(v int) ModelOption
func Dim ¶
func Dim(v int) ModelOption
func DocInMemory ¶
func DocInMemory() ModelOption
func Goroutines ¶
func Goroutines(v int) ModelOption
func Initlr ¶
func Initlr(v float64) ModelOption
func Iter ¶
func Iter(v int) ModelOption
func LogBatch ¶
func LogBatch(v int) ModelOption
func MaxCount ¶
func MaxCount(v int) ModelOption
func MinCount ¶
func MinCount(v int) ModelOption
func MinLR ¶
func MinLR(v float64) ModelOption
func NegativeSampleSize ¶
func NegativeSampleSize(v int) ModelOption
func Relation ¶
func Relation(typ RelationType) ModelOption
func Smooth ¶
func Smooth(v float64) ModelOption
func SubsampleThreshold ¶
func SubsampleThreshold(v float64) ModelOption
func ToLower ¶
func ToLower() ModelOption
func UpdateLRBatch ¶
func UpdateLRBatch(v int) ModelOption
func Verbose ¶
func Verbose() ModelOption
func Window ¶
func Window(v int) ModelOption
type Options ¶
type Options struct { BatchSize int Dim int DocInMemory bool Goroutines int Initlr float64 Iter int LogBatch int MaxCount int MinCount int MinLR float64 NegativeSampleSize int RelationType RelationType Smooth float64 SubsampleThreshold float64 ToLower bool UpdateLRBatch int Verbose bool Window int }
func DefaultOptions ¶
func DefaultOptions() Options
type RelationType ¶
type RelationType = string
const ( PPMI RelationType = "ppmi" PMI RelationType = "pmi" Collocation RelationType = "co" LogCollocation RelationType = "logco" )
Click to show internal directories.
Click to hide internal directories.