Documentation ¶
Overview ¶
Package goscore is a go scoring API for PMML files
Index ¶
- Variables
- func ArctanActivationFunction(Z float64) float64
- func CosineActivationFunction(Z float64) float64
- func ElliottActivationFunction(Z float64) float64
- func ExponentialActivationFunction(Z float64) float64
- func GaussActivationFunction(Z float64) float64
- func IdentityActivationFunction(b float64) float64
- func LogisticActivationFunction(b float64) float64
- func ReciprocalActivationFunction(Z float64) float64
- func RectifierActivationFunction(Z float64) float64
- func SineActivationFunction(Z float64) float64
- func SoftmaxNormalizationMethod(input ...float64) []float64
- func SquareActivationFunction(Z float64) float64
- func TanhActivationFunction(b float64) float64
- type ActivationFunction
- type Contribution
- type DerivedField
- type FieldRef
- type MiningField
- type NeuralInputs
- type NeuralLayer
- type NeuralNetWorkStructure
- type NeuralNetwork
- type NeuralOutput
- type NeuralOutputs
- type Neuron
- type Node
- type NormDiscrete
- type NormalizationMethod
- type OutputField
- type Outputs
- type PMMLNN
- type SimplePredicate
- type SimpleSetPredicate
Constants ¶
This section is empty.
Variables ¶
View Source
var ActivationFunctionNotImplemented = errors.New("Activation Function Not Implemented Yet")
View Source
var ActivationFunctions map[string]ActivationFunction
View Source
var NormalizationMethodNotImplemented = errors.New("Normalization Method Not Implemented Yet")
View Source
var NormalizationMethods map[string]NormalizationMethod
Functions ¶
func GaussActivationFunction ¶
func SineActivationFunction ¶
func TanhActivationFunction ¶
Types ¶
type ActivationFunction ¶
func NewThresHoldFunction ¶
func NewThresHoldFunction(a float64) ActivationFunction
type Contribution ¶
type DerivedField ¶
type DerivedField struct { DataType string `xml:"dataType,attr"` FieldRef FieldRef NormDiscrete NormDiscrete }
func (*DerivedField) GetInputName ¶
func (d *DerivedField) GetInputName() string
type MiningField ¶
type MiningField struct {
Name string `xml:"name,attr"`
}
type NeuralInputs ¶
type NeuralInputs struct {
Input []Neuron `xml:"NeuralInput"`
}
type NeuralLayer ¶
type NeuralNetWorkStructure ¶
type NeuralNetWorkStructure struct { }
type NeuralNetwork ¶
type NeuralNetwork struct { XMLName xml.Name //Struct NeuralNetWorkStructure `xml:"PMML>NeuralNetwork"` InputLayer NeuralInputs `xml:"NeuralInputs"` NeuralOutputs NeuralOutputs `xml:"NeuralOutputs"` OutputLayer Outputs `xml:"Output"` Fields []MiningField `xml:"MiningSchema>MiningField"` Layers []NeuralLayer `xml:"NeuralLayer"` ActivationFunction string `xml:"activationFunction,attr"` NormalizationMethod string `xml:"normalizationMethod,attr"` Threshold float64 `xml:"threshold,attr"` }
func NewNeuralNetwork ¶
func NewNeuralNetwork(source []byte) (*NeuralNetwork, error)
func NewNeuralNetworkFromReader ¶
func NewNeuralNetworkFromReader(source io.Reader) (*NeuralNetwork, error)
type NeuralOutput ¶
type NeuralOutput struct { OutputNeuron string `xml:"outputNeuron,attr"` DerivedField DerivedField `xml:"DerivedField"` }
type NeuralOutputs ¶
type NeuralOutputs struct {
NeuralOutput []NeuralOutput `xml:"NeuralOutput"`
}
type Neuron ¶
type Neuron struct { Id string `xml:"id,attr"` DerivedFieldType DerivedField `xml:"DerivedField"` Bias float64 `xml:"bias,attr"` Contribution []Contribution `xml:"Con"` }
type Node ¶
type Node struct { XMLName xml.Name Attrs []xml.Attr `xml:",any,attr"` Content []byte `xml:",innerxml"` Nodes []Node `xml:",any"` True truePredicate `xml:"True"` DummyMiningSchema dummyMiningSchema `xml:"MiningSchema"` SimplePredicate SimplePredicate `xml:"SimplePredicate"` SimpleSetPredicate SimpleSetPredicate `xml:"SimpleSetPredicate"` }
Node - PMML tree node
type NormDiscrete ¶
type NormDiscrete struct {
Value string `xml:"value,attr"`
}
type NormalizationMethod ¶
type OutputField ¶
type Outputs ¶
type Outputs struct {
OutputField []OutputField `xml:"OutputField"`
}
type PMMLNN ¶
type PMMLNN struct {
NeuralNetwork NeuralNetwork `xml:"NeuralNetwork"`
}
type SimplePredicate ¶
type SimplePredicate struct { Field string `xml:"field,attr"` Operator string `xml:"operator,attr"` Value string `xml:"value,attr"` }
SimplePredicate - PMML simple predicate
func (SimplePredicate) True ¶
func (p SimplePredicate) True(features map[string]interface{}) bool
True - Evaluates to true if features input is true for SimplePredicate
type SimpleSetPredicate ¶
type SimpleSetPredicate struct { Field string `xml:"field,attr"` Operator string `xml:"booleanOperator,attr"` Values string `xml:"Array"` }
SimpleSetPredicate - PMML simple set predicate
func (SimpleSetPredicate) True ¶
func (p SimpleSetPredicate) True(features map[string]interface{}) bool
True - Evaluates to true if features input is true for SimpleSetPredicate
Source Files ¶
Click to show internal directories.
Click to hide internal directories.