View definition

(*CategoricalAttribute).GetSysValFromString

Defined in github.com/sjwhitworth/golearn/base/categorical.go

Description

GetSysValFromString returns the system representation of rawVal as an index into the Values slice. If rawVal is not inside the Values slice, it is appended.

IMPORTANT: If no system representation yet exists, this functions adds it. If you need to determine whether rawVal exists: use GetSysVal and check for a zero-length return value.

Example: if the CategoricalAttribute contains the values ["iris-setosa", "iris-virginica"] and "iris-versicolor" is provided as the argument, the Values slide becomes ["iris-setosa", "iris-virginica", "iris-versicolor"] and 2.00 is returned as the system representation.

GetSysValFromString is referenced in 2 repositories

github.com/sjwhitworth/golearn github.com/kse/golearn