saga

package
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

-*- mode: go; -*- * * Copyright (C) 2019-2020 Philipp Benner * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

-*- mode: go; -*- * * Copyright (C) 2019-2020 Philipp Benner * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalStopping

func EvalStopping(xs, x1 DenseFloat64Vector, epsilon float64) (bool, float64, error)

func Run

func Run(f interface{}, n int, x Vector, args ...interface{}) (Vector, int64, error)

Types

type ConstGradientDense

type ConstGradientDense struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------------------------

type ConstGradientSparse

type ConstGradientSparse struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------------------------

type Epsilon

type Epsilon struct {
	Value float64
}

type Gamma

type Gamma struct {
	Value float64
}

type GradientDense

type GradientDense struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------------------------

type GradientJit

type GradientJit struct {
	G SparseConstFloat64Vector
	W float64
}

func (GradientJit) Add

func (obj GradientJit) Add(v DenseFloat64Vector)

func (*GradientJit) Set

func (obj *GradientJit) Set(w float64, g SparseConstFloat64Vector)

func (GradientJit) Update

func (obj GradientJit) Update(g2 GradientJit, v DenseFloat64Vector)

type GradientSparse

type GradientSparse struct {
	// contains filtered or unexported fields
}

--------------------------------------------------------------------------

type Hook

type Hook struct {
	Value func(ConstVector, ConstScalar, ConstScalar, int) bool
}

type InSitu

type InSitu struct {
	T1 DenseFloat64Vector
}

type JitUpdate

type JitUpdate struct {
	Value JitUpdateType
}

type JitUpdateL1

type JitUpdateL1 struct {
	Lambda float64
}

func (*JitUpdateL1) GetLambda

func (obj *JitUpdateL1) GetLambda() float64

func (*JitUpdateL1) SetLambda

func (obj *JitUpdateL1) SetLambda(lambda float64)

func (*JitUpdateL1) Update

func (obj *JitUpdateL1) Update(x, y float64, k, m int) float64

type JitUpdateType

type JitUpdateType interface {
	GetLambda() float64
	SetLambda(float64)
	Update(x, y float64, k, n int) float64
}

type L1Regularization

type L1Regularization struct {
	Value float64
}

type L2Regularization

type L2Regularization struct {
	Value float64
}

type MaxIterations

type MaxIterations struct {
	Value int
}

type Objective1Dense

type Objective1Dense func(int, DenseFloat64Vector) (float64, float64, DenseFloat64Vector, error)

-------------------------------------------------------------------------- --------------------------------------------------------------------------

type Objective1Sparse

type Objective1Sparse func(int, DenseFloat64Vector) (float64, float64, SparseConstFloat64Vector, error)

-------------------------------------------------------------------------- --------------------------------------------------------------------------

type Objective2Dense

type Objective2Dense func(int, DenseFloat64Vector) (float64, DenseFloat64Vector, error)

func WrapperDense

func WrapperDense(f func(int, Vector, MagicScalar) error) Objective2Dense

type Objective2Sparse

type Objective2Sparse func(int, DenseFloat64Vector) (float64, SparseConstFloat64Vector, error)

type ProximalOperator

type ProximalOperator struct {
	Value ProximalOperatorType
}

type ProximalOperatorL1

type ProximalOperatorL1 struct {
	Lambda float64
}

func (*ProximalOperatorL1) Eval

func (obj *ProximalOperatorL1) Eval(x DenseFloat64Vector, w DenseFloat64Vector)

func (*ProximalOperatorL1) GetLambda

func (obj *ProximalOperatorL1) GetLambda() float64

func (*ProximalOperatorL1) SetLambda

func (obj *ProximalOperatorL1) SetLambda(lambda float64)

type ProximalOperatorL2

type ProximalOperatorL2 struct {
	Lambda float64
}

func (*ProximalOperatorL2) Eval

func (obj *ProximalOperatorL2) Eval(x DenseFloat64Vector, w DenseFloat64Vector)

func (*ProximalOperatorL2) GetLambda

func (obj *ProximalOperatorL2) GetLambda() float64

func (*ProximalOperatorL2) SetLambda

func (obj *ProximalOperatorL2) SetLambda(lambda float64)

type ProximalOperatorTi

type ProximalOperatorTi struct {
	Lambda float64
}

func (*ProximalOperatorTi) Eval

func (obj *ProximalOperatorTi) Eval(x DenseFloat64Vector, w DenseFloat64Vector)

func (*ProximalOperatorTi) GetLambda

func (obj *ProximalOperatorTi) GetLambda() float64

func (*ProximalOperatorTi) SetLambda

func (obj *ProximalOperatorTi) SetLambda(lambda float64)

type ProximalOperatorType

type ProximalOperatorType interface {
	GetLambda() float64
	SetLambda(float64)
	Eval(x, w DenseFloat64Vector)
}

type Seed

type Seed struct {
	Value int64
}

type TikhonovRegularization

type TikhonovRegularization struct {
	Value float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL