Click or drag to resize
sqx

SOFTMAXSUM Structure

Aggregate [Vector] SOFTMAXSUM([float] Value)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
[SerializableAttribute]
public struct SOFTMAXSUM : IBinarySerialize
Remarks
Softmax sum aggregate function.

Attributes

Format.UserDefined, IsInvariantToDuplicates = false, IsInvariantToNulls = true, IsInvariantToOrder = true, IsNullIfEmpty = true, MaxByteSize = -1
Examples
SQL
WITH sample_data AS (SELECT ID, sqx.StdLogistic_PPF(Value) X FROM sqx.UTable(10,0))
SELECT s.ID, s.X, smt.Value SoftMax
FROM (SELECT sqx.SOFTMAXSUM(X) SMS FROM sample_data) z
CROSS APPLY sample_data s
CROSS APPLY sqx.SoftMaxVectorTable(s.X, z.SMS) smt
ORDER BY SoftMax DESC
/*
ID          X                      SoftMax
----------- ---------------------- ----------------------
9           3.77374757886116       0.644303181328472
7           2.2660623752708        0.14266285513209
2           1.49833060333671       0.066204763613294
3           1.19717970842517       0.048989281209141
1           0.975645175877213      0.0392545354649331
6           0.236637281974855      0.0187474753789918
4           0.233702665152165      0.0186925393698555
8           -0.232327912759579     0.0117293459475373
10          -0.975908112373395     0.0055762343591337
5           -1.34900460699184      0.00383978819655122*/
See Also