util

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategoryToDist added in v0.6.0

func CategoryToDist(cat string) relational.Degree

CategoryToDist converts the category used by ML-Relate to its relational distance. Errors on unrecognized categories.

func DemsAndParsAgree added in v0.8.0

func DemsAndParsAgree(dems demographics.CsvInput, pars parentage.CsvInput) string

func RelToLevel

func RelToLevel(x float64) relational.Degree

RelToLevel computes the relational distance given the relatedness score

Examples:

    relToLevel(0.5)   --> First
    relToLevel(0.25)  --> Second
    relToLevel(0.125) --> Third
	   ...
    relToLevel(<=0)   --> Unrelated

func RmHeader

func RmHeader(records [][]string) [][]string

RmHeader removes the header row of a table TODO: Make checks for header content before removal

func RmZeros

func RmZeros(vals []float64) []float64

RmZeros removes negatives as unrelated (i.e., 0)

func StringInSlice added in v0.5.0

func StringInSlice(str string, list []string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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