scalers

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package scalers holds the interface for scaling depths to standardized scores.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColCentered

type ColCentered struct {
	Centerer func([]float64) float64
	// contains filtered or unexported fields
}

func (*ColCentered) Scale

func (cc *ColCentered) Scale(a *mat.Dense)

func (*ColCentered) UnScale

func (cc *ColCentered) UnScale(a *mat.Dense)

type Log2

type Log2 struct {
	CC *ColCentered
}

Log2 implements Scaler interface to perform log2 transformation on depths.

func (*Log2) Scale

func (l *Log2) Scale(a *mat.Dense)

Scale converts from depths to log2s

func (*Log2) UnScale

func (l *Log2) UnScale(a *mat.Dense)

UnScale converts from log2s to depths

type RowCentered

type RowCentered struct {
	Centerer func([]float64) float64
	// contains filtered or unexported fields
}

func (*RowCentered) Scale

func (rc *RowCentered) Scale(a *mat.Dense)

func (*RowCentered) UnScale

func (rc *RowCentered) UnScale(a *mat.Dense)

type Scaler

type Scaler interface {
	// Scale Converts from AdjustedDepth to a scaled value
	Scale(*mat.Dense)
	UnScale(*mat.Dense)
}

Scaler allows transformation and back of the depths. As an example, see the `ZScore` struct. Usually, these will be 0-centered

type ZScore

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

ZScore implements the Scaler interface for StdScore (z-score)

func (*ZScore) Scale

func (z *ZScore) Scale(a *mat.Dense)

Scale converts from depths to z-scores.

func (*ZScore) UnScale

func (z *ZScore) UnScale(a *mat.Dense)

UnScale converts back to depths.

Jump to

Keyboard shortcuts

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