Documentation
¶
Index ¶
- Constants
- func FakeData(numPoints int, numClasses int, numFeatures int, maxDistanceToCenter float64, ...) ([][]float64, []int)
- func FakeDataDefault() ([][]float64, []int)
- func FloatEquals(a float64, b float64) bool
- func FloatToBool(val float64) bool
- func InterfaceSlice(slice interface{}) []interface{}
- func IsNumeric(obj interface{}) bool
- func LogSumExp(values []float64) float64
- func Max(values []float64) (int, float64)
- func MaxInt(a int, b int) int
- func MinInt(a int, b int) int
- func NumericValue(value interface{}) float64
- func RandomString(length int) string
- func RangeSlice(size int) []int
- func SelectIndexesFloat(data []float64, indexes []int) []float64
- func SelectIndexesFloat2D(data [][]float64, indexes []int) [][]float64
- func SelectIndexesInt(data []int, indexes []int) []int
- func ShuffleIntSlice(slice []int)
- func ShuffleSlice(slice []interface{})
- func Sigmoid(val float64) float64
- func Sign(val float64) int
- func TempFilePath(extension string, prefix string, suffix string) string
Constants ¶
View Source
const ( DEFAULT_FAKE_DATA_NUM_POINTS = 200 DEFAULT_FAKE_DATA_NUM_CLASSES = 2 DEFAULT_FAKE_DATA_NUM_FEATURES = 2 DEFAULT_FAKE_DATA_MAX_DISTANCE_TO_CENTER = 30.0 DEFAULT_FAKE_DATA_RANGE_MIN = -100.0 DEFAULT_FAKE_DATA_RANGE_MAX = 100.0 )
View Source
const ( RANDOM_NAME_LENGTH = 64 RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" )
View Source
const EPSILON = 0.00000001
Variables ¶
This section is empty.
Functions ¶
func FakeData ¶
func FakeData(numPoints int, numClasses int, numFeatures int, maxDistanceToCenter float64, rangeMin []float64, rangeMax []float64, seed int64) ([][]float64, []int)
Pass zero/negative or nil to any param to default (except seed).
func FakeDataDefault ¶
func FloatEquals ¶
func FloatToBool ¶
func InterfaceSlice ¶
func InterfaceSlice(slice interface{}) []interface{}
func LogSumExp ¶
The logSumExp trick to prevent over/under-flow.. The elements of the array need to be exp'd, summed, and then log of the sum needs to be taken.
func NumericValue ¶
func NumericValue(value interface{}) float64
func RandomString ¶
func SelectIndexesFloat ¶
Pull out indexes that match the given indexes.
func SelectIndexesFloat2D ¶
func SelectIndexesInt ¶
func ShuffleIntSlice ¶
func ShuffleIntSlice(slice []int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.