galaktaglare

package module
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

README

GalaktaGlare

GalaktaGlare is a powerful, fast, broad, easy and innovative framework for Go that brings intuitive machine/deep learning with a variety of features.

Main features

  • Text Classification (Windows, Linux and macOS);

  • Data analysis (Windows, Linux and macOS);

  • Anomaly detection (Windows, Linux and macOS);

  • Image classification/recognition (Windows, Linux and macOS);

  • Voice command recognition (Windows and Linux);

  • TTS (Text To Speech) for Windows and Linux;

  • Natural Language Processing (NLP) for Windows, Linux and macOS;

  • Operations with Tensors (Windows, Linux and macOS);

  • Support for creating neural networks (Windows, Linux and macOS);

  • Decision Trees (Windows, Linux and macOS);

How to install

You can install using 'go get'. To do this, use the command:

go get -u github.com/simplyYan/GalaktaGlare

Documentation

The documentation is available on the Wiki of this repository.

License

GalaktaGlare is open-source and under the BSD-3-Clause license

Contribute

You can contribute to this project. Just open a pull-request and make your changes. Add, improve or correct features.

A project founded by Wesley Yan Soares Brehmer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backward added in v1.1.1

func Backward(result *Variable)

func ReLU added in v1.1.1

func ReLU(x float64) float64

func Sigmoid added in v1.1.1

func Sigmoid(x float64) float64

Types

type ActivationFunc added in v1.1.1

type ActivationFunc func(float64) float64

type BatchNormalization added in v1.1.1

type BatchNormalization struct {
	Gamma    float64
	Beta     float64
	Mean     []float64
	Variance []float64
	Epsilon  float64
	Input    []float64
	Output   []float64
}

func NewBatchNormalization added in v1.1.1

func NewBatchNormalization(gamma, beta, epsilon float64) *BatchNormalization

func (*BatchNormalization) Forward added in v1.1.1

func (bn *BatchNormalization) Forward(input []float64) []float64

type DataAnalysis

type DataAnalysis struct{}

func (*DataAnalysis) Mean

func (da *DataAnalysis) Mean(data []float64) float64

func (*DataAnalysis) Median

func (da *DataAnalysis) Median(data []float64) float64

func (*DataAnalysis) Mode

func (da *DataAnalysis) Mode(data []float64) []float64

type DecisionTree added in v1.1.2

type DecisionTree struct {
	Root *TreeNode
}

func (*DecisionTree) Predict added in v1.1.2

func (dt *DecisionTree) Predict(features []float64) string

func (*DecisionTree) Train added in v1.1.2

func (dt *DecisionTree) Train(data []Example, maxDepth, minSamplesSplit int)

type DenseLayer added in v1.1.1

type DenseLayer struct {
	InputSize            int
	OutputSize           int
	Weights              [][]float64
	Biases               []float64
	Activation           ActivationFunc
	Inputs               []float64
	WeightDecayL1        float64
	WeightDecayL2        float64
	DropoutRate          float64
	DropoutMask          []float64
	LearningRateSchedule LearningRateSchedule
	BatchNorm            *BatchNormalization
}

func NewDenseLayer added in v1.1.1

func NewDenseLayer(inputSize, outputSize int, activation ActivationFunc, weightDecayL1, weightDecayL2, dropoutRate float64, lrSchedule LearningRateSchedule) *DenseLayer

func (*DenseLayer) Backpropagate added in v1.1.1

func (l *DenseLayer) Backpropagate(output, target []float64, learningRate float64) []float64

func (*DenseLayer) Forward added in v1.1.1

func (l *DenseLayer) Forward(input []float64) []float64

func (*DenseLayer) GetAdjustedLearningRate added in v1.1.1

func (l *DenseLayer) GetAdjustedLearningRate(epoch int) float64

type Example added in v1.1.2

type Example struct {
	Features []float64
	Label    string
}

type GalaktaGlare

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

func New

func New() *GalaktaGlare

func (*GalaktaGlare) AnomalyDetector

func (gg *GalaktaGlare) AnomalyDetector(data []float64, threshold float64) []int

func (*GalaktaGlare) ExtractEntities

func (gg *GalaktaGlare) ExtractEntities(text string, customStopwords map[string]bool) []string

func (*GalaktaGlare) ImageDB

func (gg *GalaktaGlare) ImageDB(folderPath string) error

func (*GalaktaGlare) ImageScan

func (gg *GalaktaGlare) ImageScan(imagePath string) (float64, error)

func (*GalaktaGlare) Speech

func (gg *GalaktaGlare) Speech(tomlConfig string) error

func (*GalaktaGlare) SpeechCfg

func (gg *GalaktaGlare) SpeechCfg() error

func (*GalaktaGlare) TextClassifier

func (gg *GalaktaGlare) TextClassifier(text, config string) (string, error)

type LearningRateSchedule added in v1.1.1

type LearningRateSchedule struct {
	InitialRate float64
	Decay       float64
}

type NeuralNetwork added in v1.1.1

type NeuralNetwork struct {
	Layers []*DenseLayer
}

func LoadModel added in v1.1.1

func LoadModel(filename string) (*NeuralNetwork, error)

func NewNeuralNetwork added in v1.1.1

func NewNeuralNetwork(layers ...*DenseLayer) *NeuralNetwork

func (*NeuralNetwork) Backpropagate added in v1.1.1

func (nn *NeuralNetwork) Backpropagate(output, target []float64, learningRate float64)

func (*NeuralNetwork) MultiplyMatrixVector added in v1.1.1

func (nn *NeuralNetwork) MultiplyMatrixVector(matrix [][]float64, vector []float64) []float64

func (*NeuralNetwork) MultiplyVectors added in v1.1.1

func (nn *NeuralNetwork) MultiplyVectors(v1 []float64, v2 []float64) []float64

func (*NeuralNetwork) Predict added in v1.1.1

func (nn *NeuralNetwork) Predict(input []float64) []float64

func (*NeuralNetwork) SaveModel added in v1.1.1

func (nn *NeuralNetwork) SaveModel(filename string) error

func (*NeuralNetwork) Train added in v1.1.1

func (nn *NeuralNetwork) Train(inputs, targets [][]float64, initialLearningRate float64, epochs int)

type SpeechConfig

type SpeechConfig struct {
	Lang string `toml:"lang"`
	Text string `toml:"text"`
	Reco string `toml:"reco"`
}

type Tensor added in v1.1.1

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

func NewTensor added in v1.1.1

func NewTensor(shape []int) *Tensor

func (*Tensor) Get added in v1.1.1

func (t *Tensor) Get(indices ...int) float64

func (*Tensor) Set added in v1.1.1

func (t *Tensor) Set(value float64, indices ...int)

type TrainingMonitor added in v1.1.1

type TrainingMonitor struct {
	Epochs        int
	DisplayPeriod int
}

func NewTrainingMonitor added in v1.1.1

func NewTrainingMonitor(epochs, displayPeriod int) *TrainingMonitor

func (*TrainingMonitor) MonitorTraining added in v1.1.1

func (tm *TrainingMonitor) MonitorTraining(nn *NeuralNetwork, inputs, targets [][]float64, initialLearningRate float64)

type TreeNode added in v1.1.2

type TreeNode struct {
	SplitFeature   int
	SplitValue     float64
	PredictedClass string
	Left           *TreeNode
	Right          *TreeNode
}

type Variable added in v1.1.1

type Variable struct {
	Value     float64
	Gradient  float64
	Children  []*Variable
	Operation string
}

func Add added in v1.1.1

func Add(a, b *Variable) *Variable

func Cos added in v1.1.1

func Cos(a *Variable) *Variable

func Mul added in v1.1.1

func Mul(a, b *Variable) *Variable

func NewVariable added in v1.1.1

func NewVariable(value float64, operation string) *Variable

func Sin added in v1.1.1

func Sin(a *Variable) *Variable

Jump to

Keyboard shortcuts

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