Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "gopkg.in/sensorbee/sensorbee.v0/data" ) func main() { v := data.Map{ "labelA": data.Float(2.5), "labelB": data.Float(0.7), "labelC": data.Float(-1.2), } s, _ := Softmax(v) fmt.Printf("labelA: %0.5f\n", toFloat(s["labelA"])) fmt.Printf("labelB: %0.5f\n", toFloat(s["labelB"])) fmt.Printf("labelC: %0.5f\n", toFloat(s["labelC"])) } func toFloat(d data.Value) float64 { ret, _ := data.AsFloat(d) return ret }
Output: labelA: 0.84032 labelB: 0.13890 labelC: 0.02078
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.