![]() | SQXMinMaxNormalizeTable Method |
Namespace: sqx
public static IEnumerator MinMaxNormalizeTable( SqlDouble Value, Vector MinMax, SqlDouble TargetMin, SqlDouble TargetMax )
;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*/