Documentation ¶
Overview ¶
Copyright © 2020 wego authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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 ToLower() ModelOption
- func Verbose() ModelOption
- func WithAlpha(v float64) ModelOption
- func WithBatchSize(v int) ModelOption
- func WithCountType(typ pairwise.CountType) ModelOption
- func WithDimension(v int) ModelOption
- func WithInitLearningRate(v float64) ModelOption
- func WithIteration(v int) ModelOption
- func WithMinCount(v int) ModelOption
- func WithSolver(typ SolverType) ModelOption
- func WithSubsampleThreshold(v float64) ModelOption
- func WithThreadSize(v int) ModelOption
- func WithWindow(v int) ModelOption
- func WithXmax(v int) ModelOption
- type Options
- type SolverType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadForCmd ¶
Types ¶
type ModelOption ¶
type ModelOption func(*Options)
func ToLower ¶
func ToLower() ModelOption
func Verbose ¶
func Verbose() ModelOption
func WithDimension ¶
func WithDimension(v int) ModelOption
func WithInitLearningRate ¶
func WithInitLearningRate(v float64) ModelOption
func WithIteration ¶
func WithIteration(v int) ModelOption
func WithSolver ¶
func WithSolver(typ SolverType) ModelOption
func WithSubsampleThreshold ¶
func WithSubsampleThreshold(v float64) ModelOption
func WithThreadSize ¶
func WithThreadSize(v int) ModelOption
func WithWindow ¶
func WithWindow(v int) ModelOption
func WithXmax ¶
func WithXmax(v int) ModelOption
type SolverType ¶
type SolverType string
const ( Stochastic SolverType = "sgd" AdaGrad SolverType = "adagrad" )
func (*SolverType) Set ¶
func (t *SolverType) Set(name string) error
func (*SolverType) String ¶
func (t *SolverType) String() string
func (*SolverType) Type ¶
func (t *SolverType) Type() string
Click to show internal directories.
Click to hide internal directories.