[
{
"test_name": "standard_scaler_basic",
"params": {
"with_mean": true,
"with_std": true
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
-0.07900099052361063,
-1.0040818944872574,
0.14094902465247988,
1.4162073152020493,
-1.1437797854276284,
-1.143755866869043,
1.4980585689708315,
0.31540362848217807
],
[
0.16642039633536398,
1.4389912753483456,
0.17403631439701278,
0.1711290405878886,
1.061008116070027,
-1.6490764258713655,
-1.4122223096437763,
0.04971359277650411
],
[
-0.6661530142880577,
0.7578790606609169,
-0.5536889823650436,
-1.0948102403563824,
1.9933995175346166,
0.17840241175498253,
0.4931351407608647,
-1.1081638937018972
],
[
-0.5091146158642935,
0.25246896424850573,
-1.214106403736412,
0.5601860153481851,
-0.5744942466966619,
-0.2154442154403307,
-0.5757353660328179,
2.2762398681738247
]
]
},
"tolerance": 1e-10
},
{
"test_name": "standard_scaler_no_mean",
"params": {
"with_mean": false,
"with_std": true
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
0.723647825611359,
-0.2014330783522877,
0.9435978407874495,
2.2188561313370188,
-0.34113096929265874,
-0.34110705073407344,
2.300707385105801,
1.1180524446171476
],
[
-0.5903350859971646,
0.6822357930158172,
-0.5827191679355158,
-0.58562644174464,
0.3042526337374986,
-2.405831908203894,
-2.168977791976305,
-0.7070418895560245
],
[
-1.0868264786295423,
0.33720559631943237,
-0.9743624467065282,
-1.515483704697867,
1.572726053193132,
-0.24227105258650206,
0.07246167641938007,
-1.5288373580433816
],
[
-0.6326714209229497,
0.1289121591898495,
-1.3376632087950682,
0.436629210289529,
-0.698051051755318,
-0.3390010204989869,
-0.6992921710914741,
2.1526830631151688
]
]
},
"tolerance": 1e-10
},
{
"test_name": "minmax_scaler_basic",
"params": {
"sample_range": [
0,
1
]
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
0.40304464242910315,
0.052879045649323955,
0.48630106680869867,
0.9690173118909768,
0.0,
9.053755520460616e-06,
1.0,
0.5523363726930441
],
[
0.5879070661208796,
1.0,
0.5903733067601767,
0.5894318527214665,
0.8775988106967265,
0.0,
0.07669978094522922,
0.5501142406874335
],
[
0.1425122819712465,
0.6016459143161192,
0.1787727148598901,
0.004305458755779812,
1.0,
0.41481218820025945,
0.5162876982174499,
0.0
],
[
0.20198333716794303,
0.42018047887904064,
0.0,
0.5083428063753519,
0.18325177710511104,
0.2861212356874614,
0.18289619079949307,
1.0
]
]
},
"tolerance": 1e-10
},
{
"test_name": "maxabs_scaler_basic",
"params": {},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
0.31453275209879894,
-0.08755267169406879,
0.4101337905446228,
0.96442344024335,
-0.14827221032151003,
-0.14826181414564685,
1.0,
0.48596029719169714
],
[
-0.24537669651155603,
0.28357583532307096,
-0.24221108962286253,
-0.2434195172770184,
0.12646462651858437,
-1.0,
-0.9015500146041309,
-0.29388665398651065
],
[
-0.6910462737124119,
0.21440834888873253,
-0.6195372962304935,
-0.9636031027914589,
1.0,
-0.15404529739595468,
0.04607393402828161,
-0.9720938716182373
],
[
-0.2938990099208588,
0.05988441187589382,
-0.6213934748291848,
0.2028302344041666,
-0.32427023918010556,
-0.1574783702754716,
-0.3248467844957732,
1.0
]
]
},
"tolerance": 1e-10
},
{
"test_name": "robust_scaler_basic",
"params": {
"quantile_range": [
25,
75
]
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
-0.06748568627942157,
-0.6351575695297461,
0.06748568627942157,
0.8500424035622941,
-0.7208825742254816,
-0.7208678967057766,
0.9002700703255362,
0.17453899704756365
],
[
-0.0033087250258056,
1.7851411508568817,
0.007394559118691606,
0.0033087250258056,
1.2539299268334543,
-2.55477766077529,
-2.221906838603023,
-0.1673265190691493
],
[
-0.3590694325384275,
0.7095115347810158,
-0.2746774261117146,
-0.6807299915514486,
1.6366350653351747,
0.2746774261117147,
0.5108500586840846,
-0.6907504539133724
],
[
-0.1623918967674231,
0.6798789071194954,
-0.9420751979971809,
1.0201975468163376,
-0.2346982800154085,
0.1623918967674231,
-0.23607089177895116,
2.9180615447751923
]
]
},
"tolerance": 1e-10
},
{
"test_name": "discretizer_uniform",
"params": {
"n_bins": 4,
"strategy": "uniform"
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
1,
0,
1,
3,
0,
0,
3,
2
],
[
2,
3,
2,
2,
3,
0,
0,
2
],
[
0,
2,
0,
0,
3,
1,
2,
0
],
[
0,
1,
0,
2,
0,
1,
0,
3
]
]
},
"tolerance": 1e-10
},
{
"test_name": "discretizer_quantile",
"params": {
"n_bins": 3,
"strategy": "quantile"
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
1,
0,
1,
2,
0,
0,
2,
2
],
[
1,
2,
2,
1,
2,
0,
0,
0
],
[
0,
2,
1,
0,
2,
1,
2,
0
],
[
1,
2,
0,
2,
0,
1,
0,
2
]
]
},
"tolerance": 1e-10
},
{
"test_name": "discretizer_normal",
"params": {
"n_bins": 4,
"strategy": "normal"
},
"input": {
"X": [
[
0.4967141530112327,
-0.13826430117118466,
0.6476885381006925,
1.5230298564080254,
-0.23415337472333597,
-0.23413695694918055,
1.5792128155073915,
0.7674347291529088
],
[
-0.4694743859349521,
0.5425600435859647,
-0.46341769281246226,
-0.46572975357025687,
0.24196227156603412,
-1.913280244657798,
-1.7249178325130328,
-0.5622875292409727
],
[
-1.0128311203344238,
0.3142473325952739,
-0.9080240755212109,
-1.4123037013352915,
1.465648768921554,
-0.22577630048653566,
0.06752820468792384,
-1.4247481862134568
],
[
-0.5443827245251827,
0.11092258970986608,
-1.1509935774223028,
0.37569801834567196,
-0.600638689918805,
-0.2916937497932768,
-0.6017066122293969,
1.8522781845089378
]
]
},
"expected": {
"output": [
[
2,
1,
2,
3,
1,
1,
3,
3
],
[
1,
2,
1,
1,
2,
0,
0,
1
],
[
0,
2,
0,
0,
3,
1,
2,
0
],
[
1,
2,
0,
2,
1,
1,
1,
3
]
]
},
"tolerance": 1e-10
}
]