Back to Projects
Gorillaz ML

Gorillaz ML

Machine learning library written in Go, implementing regression, classification, evaluation metrics, and model persistence from scratch. The project explores the internal structure of ML algorithms without relying on external dependencies.

Jul 2024 - Oct 2024 3 months

Tech Stack

GoMachine LearningAlgorithmsMultithreadingNo Dependencies

Features

Regression

Classification

Utilities


Installation

To use Gorillaz, install it using Go modules:

go get github.com/yourusername/gorillaz

Example

package main

import (
	"fmt"
	"github.com/yourusername/gorillaz"
)

func main() {
	X := [][]float64{{1, 2}, {3, 4}, {5, 6}}
	Y := [][]float64{{1}, {2}, {3}}

	model := gorillaz.LinearRegression{}
	err := model.FitOLS(X, Y)
	if err != nil {
		fmt.Println("Error training model:", err)
		return
	}

	predictions, err := model.Predict([][]float64{{7, 8}})
	if err != nil {
		fmt.Println("Error making predictions:", err)
		return
	}

	fmt.Println("Predictions:", predictions)
}
View All Projects