correlation

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: BSD-3-Clause, MIT Imports: 7 Imported by: 0

Documentation

Overview

Package correlation calculates the correlation between matrices or vectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kendall

func Kendall(dataX, dataY []float64) float64

Kendall performs correlation using the Kendall statistic. Modified from https://github.com/scipy/scipy/blob/v1.4.1/scipy/stats/stats.py#L3974-L4169

func Pearson

func Pearson(x, y []float64) float64

Pearson performs correlation using the Pearson statistic.

func Spearman

func Spearman(dataX, dataY []float64) float64

Spearman performs correlation using the Pearson statistic. For tied ranks, the average method is used. Modified from https://github.com/scipy/scipy/blob/v0.14.0/scipy/stats/stats.py#L2608

Types

type Data

type Data struct {
	Columns                   []string
	Dimension                 string // Either "column" or "row" (default).
	IgnoreSourceTargetMatches bool
	Matrix                    [][]float64
	Method                    string
	Rows                      []string
}

Data correlation settings.

func (*Data) Correlate

func (data *Data) Correlate() [][]float64

Correlate calculates the correlation between the columns or rows.

Jump to

Keyboard shortcuts

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