ztable

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 0 Imported by: 1

README

ZTable

This repository provides access to a static z-table (standard normal table) through a few lookup functions. The static data is loaded into memory at instantiation using NewTable(). You can access the data through three functions:

  • GetFuzzy(p float64) []*ZScore
  • GetScore(p float64) float64
  • GetProbability(s float64) float64

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZScore

type ZScore struct {
	Score       float64
	Probability float64
}

ZScore ...

type ZTable

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

ZTable ...

func NewTable

func NewTable() *ZTable

NewTable creates a new ZTable containing ZScore entries from a static data file (data.csv)

func (*ZTable) GetFuzzy

func (z *ZTable) GetFuzzy(p float64) []*ZScore

GetFuzzy returns the neighboring zscore values given a defined probability (p) as a percentage in dot notation

func (*ZTable) GetProbability

func (z *ZTable) GetProbability(s float64) float64

GetProbability ...

func (*ZTable) GetScore

func (z *ZTable) GetScore(p float64) float64

GetScore ...

func (*ZTable) Len

func (z *ZTable) Len() int

Len returns the size of the ZScore collection

Jump to

Keyboard shortcuts

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