MCPcopy Create free account
hub / github.com/PacktPublishing/Go-Machine-Learning-Projects / convertCategorical

Function convertCategorical

Chapter02/main.go:119–154  ·  view source on GitHub ↗

convertCategorical is a basic function that encodes a categorical variable as a slice of floats. There are no smarts involved at the moment. The encoder takes the first value of the map as the default value, encoding it as a []float{0,0,0,...}

(a string, index map[string][]int, varName string)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

convertFunction · 0.85

Calls 1

tryNumCatFunction · 0.85

Tested by

no test coverage detected