options

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2022 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package options contains implementation of types and constants related to the regression options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvergenceType added in v0.2.0

type ConvergenceType int

ConvergenceType identifies a convergence type.

const (
	Iterative ConvergenceType = iota + 1
	Automatic
)

type GradientDescentVariant

type GradientDescentVariant int

GradientDescentVariant identifies a gradient descent variant.

const (
	Batch GradientDescentVariant = iota + 1
	Stochastic
)

type Options

type Options struct {
	LearningRate           float64
	GradientDescentVariant GradientDescentVariant
	ConvergenceType        ConvergenceType
	ConvergenceIndicator   float64
}

Options contains training options for a regression with gradient descent.

func WithAutomaticConvergence added in v0.2.0

func WithAutomaticConvergence(lr float64, gdv GradientDescentVariant, t float64) Options

WithAutomaticConvergence returns new training options with an automatic convergence indicator.

func WithIterativeConvergence added in v0.2.0

func WithIterativeConvergence(lr float64, gdv GradientDescentVariant, i uint) Options

WithIterativeConvergence returns new training options with an iterative convergence indicator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL