Click or drag to resize
sqx

SQXMinMaxNormalizeTable Method

Function [table] MinMaxNormalizeTable([float] Value, [Vector] MinMax, [float] TargetMin, [float] TargetMax)
(Transformation)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
public static IEnumerator MinMaxNormalizeTable(
	SqlDouble Value,
	Vector MinMax,
	SqlDouble TargetMin,
	SqlDouble TargetMax
)

Parameters

Value
Type: System.Data.SqlTypesSqlDouble
[float]
MinMax
Type: sqxVector
[Vector]
TargetMin
Type: System.Data.SqlTypesSqlDouble
[float]
TargetMax
Type: System.Data.SqlTypesSqlDouble
[float]

Return Value

Type: IEnumerator
[table]
Remarks
Min Max Normalize table function.

Attributes

IsDeterministic = true, IsPrecise = true, DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None, TableDefinition = "Value float"
Examples
SQL
;with sample_data as (select ID, sqx.StdLogistic_PPF(Value) X from sqx.UTable(10,1))
select s.*, mmnt.Value
from (select sqx.MINMAX(X) MM from sample_data) mmt
cross apply sample_data s
cross apply sqx.MinMaxNormalizeTable(s.X, mmt.MM, -1, 1) mmnt
/*
ID          X                      Value
----------- ---------------------- ----------------------
3           -0.132149260168477     -0.180452849728448
6           -0.27050712306059      -0.235736248569624
9           -2.18323140467725      -1
2           -2.0831641583916       -0.960016312974843
5           0.652257007595407      0.132970931528737
8           2.82217223519669       1
1           -1.10572583121812      -0.569463063927344
4           1.21739119295469       0.358780566882548
7           -0.601136324875706     -0.367845155504228
10          0.586037964640089      0.106511909352061*/
See Also