stats

package
v0.0.0-...-fc896f4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DATE_CUTOFF = 48 * time.Hour

Variables

This section is empty.

Functions

func AggregateStats

func AggregateStats() error
func AverageLink(mat *Matrix2D, i, j, k, ni, nj int) float64
func CompleteLink(mat *Matrix2D, i, j, k int) float64

func GetPriceInChaos

func GetPriceInChaos(j *db.DBJewel, rates map[string]float64) (int, bool)

func HCluster

func HCluster(data []float64) [][]float64

Performs hierarchical clustering using average linkage https://beginningwithml.wordpress.com/2019/04/17/11-3-hierarchical-clustering/

func SingleLink(mat *Matrix2D, i, j, k int) float64
func WardMethodLink(mat *Matrix2D, i, j, k, ni, nj, nk int) float64

Types

type Boxplot

type Boxplot = [5]float64

type DendrogramStrata

type DendrogramStrata struct {
	Clusters []IndexCluster `json:"clusters"`
	Height   float64        `json:"height"`
}

type IndexCluster

type IndexCluster []int

type Matrix2D

type Matrix2D struct {
	Data []float64
	Rows int
	Cols int
}

func NewMatrix2D

func NewMatrix2D(m, n int) *Matrix2D

func (*Matrix2D) AddRowAndCol

func (m *Matrix2D) AddRowAndCol() *Matrix2D

Adds a row to the front of the matrix

func (*Matrix2D) Get

func (m *Matrix2D) Get(i int) float64

func (*Matrix2D) Get2D

func (m *Matrix2D) Get2D(x, y int) float64

func (*Matrix2D) Print

func (m *Matrix2D) Print()

func (*Matrix2D) RemoveCols

func (m *Matrix2D) RemoveCols(ns []int) *Matrix2D

func (*Matrix2D) RemoveRows

func (m *Matrix2D) RemoveRows(ns []int) *Matrix2D

func (*Matrix2D) Set

func (m *Matrix2D) Set(i int, v float64)

func (*Matrix2D) Set2D

func (m *Matrix2D) Set2D(x, y int, v float64)

func (*Matrix2D) Size

func (m *Matrix2D) Size() int

Jump to

Keyboard shortcuts

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