text: -- This SQL code was generated by sklearn2sql (development version).
  -- Copyright 2018
  
  -- Model : CaretRegressor_svmRadial_pca
  -- Dataset : freidman3
  -- Database : teradata
  
  
  -- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
  
  
  
  -- Model deployment code
  
  WITH "ADS_sca_1_OUT" AS 
  (SELECT "ADS"."KEY" AS "KEY", (CAST("ADS"."Feature_0" AS DOUBLE PRECISION) - CAST(43.791281222074 AS DOUBLE PRECISION)) / CAST(26.1998878150635 AS DOUBLE PRECISION) AS "Feature_0", (CAST("ADS"."Feature_1" AS DOUBLE PRECISION) - CAST(945.96728330844 AS DOUBLE PRECISION)) / CAST(464.3666952541536 AS DOUBLE PRECISION) AS "Feature_1", (CAST("ADS"."Feature_2" AS DOUBLE PRECISION) - CAST(0.531000909997521 AS DOUBLE PRECISION)) / CAST(0.292017174945916 AS DOUBLE PRECISION) AS "Feature_2", (CAST("ADS"."Feature_3" AS DOUBLE PRECISION) - CAST(6.139967152050498 AS DOUBLE PRECISION)) / CAST(3.092304925382 AS DOUBLE PRECISION) AS "Feature_3" 
  FROM freidman3 AS "ADS"), 
  "ADS_pre_1_OUT" AS 
  (SELECT "ADS_sca_1_OUT"."KEY" AS "KEY", "ADS_sca_1_OUT"."Feature_0" * CAST(-0.61216507491007 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_1" * CAST(0.546478290332943 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_2" * CAST(-0.570867748564476 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_3" * CAST(-0.026933490380143 AS DOUBLE PRECISION) AS "PC1", "ADS_sca_1_OUT"."Feature_0" * CAST(0.488881338042008 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_1" * CAST(0.274519258456139 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_2" * CAST(-0.223844999535911 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_3" * CAST(-0.797199868435587 AS DOUBLE PRECISION) AS "PC2", "ADS_sca_1_OUT"."Feature_0" * CAST(-0.024686176636209 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_1" * CAST(0.709191857651851 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_2" * CAST(0.703881747208946 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_3" * CAST(0.031432271147406 AS DOUBLE PRECISION) AS "PC3", "ADS_sca_1_OUT"."Feature_0" * CAST(-0.620998833378688 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_1" * CAST(-0.350781362064452 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_2" * CAST(0.358544161544677 AS DOUBLE PRECISION) + "ADS_sca_1_OUT"."Feature_3" * CAST(-0.602294752752124 AS DOUBLE PRECISION) AS "PC4" 
  FROM "ADS_sca_1_OUT"), 
  kernel_input_with_scaling AS 
  (SELECT "ADS_pre_1_OUT"."KEY" AS "KEY", (CAST("ADS_pre_1_OUT"."PC1" AS DOUBLE PRECISION) - 7.259817746962938e-17) / 1.0912921970850795 AS "PC1", (CAST("ADS_pre_1_OUT"."PC2" AS DOUBLE PRECISION) - 4.6837533851373785e-17) / 1.0787025043586622 AS "PC2", (CAST("ADS_pre_1_OUT"."PC3" AS DOUBLE PRECISION) - -6.609296443471634e-17) / 0.9655534556992196 AS "PC3", (CAST("ADS_pre_1_OUT"."PC4" AS DOUBLE PRECISION) - -2.203098814490545e-17) / 0.8445050454904731 AS "PC4" 
  FROM "ADS_pre_1_OUT"), 
  dummy_cte AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "SV_data" AS 
  (SELECT "Values".sv_idx AS sv_idx, "Values".dual_coeff AS dual_coeff, "Values".sv_0 AS sv_0, "Values".sv_1 AS sv_1, "Values".sv_2 AS sv_2, "Values".sv_3 AS sv_3 
  FROM (SELECT 0 AS sv_idx, CAST(0.047573776426247 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.48927620036541 AS DOUBLE PRECISION) AS sv_0, CAST(1.268900311645968 AS DOUBLE PRECISION) AS sv_1, CAST(1.157822639479234 AS DOUBLE PRECISION) AS sv_2, CAST(-0.171163921046017 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 1 AS sv_idx, CAST(0.151428890031042 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.340278505901912 AS DOUBLE PRECISION) AS sv_0, CAST(-0.27108620680108 AS DOUBLE PRECISION) AS sv_1, CAST(1.074114891053797 AS DOUBLE PRECISION) AS sv_2, CAST(-0.338173299180128 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 2 AS sv_idx, CAST(-1.0 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.540283026200402 AS DOUBLE PRECISION) AS sv_0, CAST(0.44879578312494 AS DOUBLE PRECISION) AS sv_1, CAST(-1.866860113869498 AS DOUBLE PRECISION) AS sv_2, CAST(0.091642067751442 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 3 AS sv_idx, CAST(0.06478371222139 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.646625661255775 AS DOUBLE PRECISION) AS sv_0, CAST(-1.015525733325012 AS DOUBLE PRECISION) AS sv_1, CAST(0.491291399842438 AS DOUBLE PRECISION) AS sv_2, CAST(-0.826945032946098 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 4 AS sv_idx, CAST(0.143506190976583 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.074938364070447 AS DOUBLE PRECISION) AS sv_0, CAST(0.994724832999105 AS DOUBLE PRECISION) AS sv_1, CAST(0.567377097139208 AS DOUBLE PRECISION) AS sv_2, CAST(-0.751671364103854 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 5 AS sv_idx, CAST(0.036172545745941 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.66694807581897 AS DOUBLE PRECISION) AS sv_0, CAST(-0.779884133973007 AS DOUBLE PRECISION) AS sv_1, CAST(0.614773291681763 AS DOUBLE PRECISION) AS sv_2, CAST(-1.317823613575685 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 6 AS sv_idx, CAST(0.143678613715269 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.204127961722417 AS DOUBLE PRECISION) AS sv_0, CAST(-0.321805616861728 AS DOUBLE PRECISION) AS sv_1, CAST(0.874160148996633 AS DOUBLE PRECISION) AS sv_2, CAST(0.01387601886812 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 7 AS sv_idx, CAST(-0.940980850928981 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.932760184626313 AS DOUBLE PRECISION) AS sv_0, CAST(0.323621586792168 AS DOUBLE PRECISION) AS sv_1, CAST(-1.025648702999311 AS DOUBLE PRECISION) AS sv_2, CAST(1.963573875249249 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 8 AS sv_idx, CAST(0.144948995458177 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.152374952622798 AS DOUBLE PRECISION) AS sv_0, CAST(-0.754645929519459 AS DOUBLE PRECISION) AS sv_1, CAST(1.853426910541869 AS DOUBLE PRECISION) AS sv_2, CAST(-1.116829869146634 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 9 AS sv_idx, CAST(0.194805632711672 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.577111036135452 AS DOUBLE PRECISION) AS sv_0, CAST(0.548458845531396 AS DOUBLE PRECISION) AS sv_1, CAST(1.316079280199782 AS DOUBLE PRECISION) AS sv_2, CAST(1.303948679044128 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 10 AS sv_idx, CAST(-1.0 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.068356252097908 AS DOUBLE PRECISION) AS sv_0, CAST(0.906589630066836 AS DOUBLE PRECISION) AS sv_1, CAST(-1.949770018391347 AS DOUBLE PRECISION) AS sv_2, CAST(0.416170807764555 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 11 AS sv_idx, CAST(0.063839322078296 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.43366852349356 AS DOUBLE PRECISION) AS sv_0, CAST(-1.344855537357494 AS DOUBLE PRECISION) AS sv_1, CAST(-0.921134338755299 AS DOUBLE PRECISION) AS sv_2, CAST(0.667634558153594 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 12 AS sv_idx, CAST(0.618616070095999 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.287400922899803 AS DOUBLE PRECISION) AS sv_0, CAST(0.755050404690312 AS DOUBLE PRECISION) AS sv_1, CAST(-0.725913503380335 AS DOUBLE PRECISION) AS sv_2, CAST(-0.385256276841051 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 13 AS sv_idx, CAST(-0.871129106594262 AS DOUBLE PRECISION) AS dual_coeff, CAST(-2.426680482621092 AS DOUBLE PRECISION) AS sv_0, CAST(1.420580083424204 AS DOUBLE PRECISION) AS sv_1, CAST(-0.618318228363361 AS DOUBLE PRECISION) AS sv_2, CAST(0.459410587788732 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 14 AS sv_idx, CAST(0.359458444588318 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.592568162991361 AS DOUBLE PRECISION) AS sv_0, CAST(-0.548446193616789 AS DOUBLE PRECISION) AS sv_1, CAST(1.112573468618059 AS DOUBLE PRECISION) AS sv_2, CAST(1.372205964637406 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 15 AS sv_idx, CAST(-1.0 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.115049348553124 AS DOUBLE PRECISION) AS sv_0, CAST(-0.541788363836155 AS DOUBLE PRECISION) AS sv_1, CAST(-1.941763685449151 AS DOUBLE PRECISION) AS sv_2, CAST(-1.701579213947659 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 16 AS sv_idx, CAST(-1.0 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.259029730177117 AS DOUBLE PRECISION) AS sv_0, CAST(0.249987980249881 AS DOUBLE PRECISION) AS sv_1, CAST(-0.937383950957653 AS DOUBLE PRECISION) AS sv_2, CAST(-0.958744758432644 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 17 AS sv_idx, CAST(0.029639584301083 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.476399782218199 AS DOUBLE PRECISION) AS sv_0, CAST(-1.522153893961584 AS DOUBLE PRECISION) AS sv_1, CAST(0.178199543221062 AS DOUBLE PRECISION) AS sv_2, CAST(-0.112780395009793 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 18 AS sv_idx, CAST(0.154062571249072 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.069820539285263 AS DOUBLE PRECISION) AS sv_0, CAST(-0.076990258322835 AS DOUBLE PRECISION) AS sv_1, CAST(-1.039648234204846 AS DOUBLE PRECISION) AS sv_2, CAST(-1.42083819964164 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 19 AS sv_idx, CAST(-1.0 AS DOUBLE PRECISION) AS dual_coeff, CAST(2.434890583381738 AS DOUBLE PRECISION) AS sv_0, CAST(0.918886428630407 AS DOUBLE PRECISION) AS sv_1, CAST(-0.073672190118027 AS DOUBLE PRECISION) AS sv_2, CAST(-0.031899165727171 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 20 AS sv_idx, CAST(-0.337221319990104 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.817116628721103 AS DOUBLE PRECISION) AS sv_0, CAST(1.327247197449793 AS DOUBLE PRECISION) AS sv_1, CAST(-1.091094231911272 AS DOUBLE PRECISION) AS sv_2, CAST(-0.753119712424412 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 21 AS sv_idx, CAST(0.480604280594041 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.677668490618574 AS DOUBLE PRECISION) AS sv_0, CAST(0.648644096829984 AS DOUBLE PRECISION) AS sv_1, CAST(-0.152179307731122 AS DOUBLE PRECISION) AS sv_2, CAST(1.304841720465672 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 22 AS sv_idx, CAST(0.334257912530476 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.348416133019098 AS DOUBLE PRECISION) AS sv_0, CAST(0.361982514674524 AS DOUBLE PRECISION) AS sv_1, CAST(0.201774012721763 AS DOUBLE PRECISION) AS sv_2, CAST(2.328153635410188 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 23 AS sv_idx, CAST(0.442188436009224 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.331393207113772 AS DOUBLE PRECISION) AS sv_0, CAST(-1.832432687869641 AS DOUBLE PRECISION) AS sv_1, CAST(0.615337245382805 AS DOUBLE PRECISION) AS sv_2, CAST(1.730019845417768 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 24 AS sv_idx, CAST(0.0371743472988 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.173733054294301 AS DOUBLE PRECISION) AS sv_0, CAST(0.226549246209989 AS DOUBLE PRECISION) AS sv_1, CAST(1.295415493250578 AS DOUBLE PRECISION) AS sv_2, CAST(-0.420724537451233 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 25 AS sv_idx, CAST(0.202276486872236 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.09601148303744 AS DOUBLE PRECISION) AS sv_0, CAST(1.431202291762192 AS DOUBLE PRECISION) AS sv_1, CAST(0.96678543041097 AS DOUBLE PRECISION) AS sv_2, CAST(0.050432320591731 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 26 AS sv_idx, CAST(0.358126131466508 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.162338142224765 AS DOUBLE PRECISION) AS sv_0, CAST(-0.294682675867176 AS DOUBLE PRECISION) AS sv_1, CAST(1.573052352473792 AS DOUBLE PRECISION) AS sv_2, CAST(0.622183971402443 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 27 AS sv_idx, CAST(0.203961480446383 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.012727817313916 AS DOUBLE PRECISION) AS sv_0, CAST(0.823029642682223 AS DOUBLE PRECISION) AS sv_1, CAST(1.210148370053678 AS DOUBLE PRECISION) AS sv_2, CAST(0.107520593726899 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 28 AS sv_idx, CAST(0.464460729564871 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.251179473867571 AS DOUBLE PRECISION) AS sv_0, CAST(-0.080369621553877 AS DOUBLE PRECISION) AS sv_1, CAST(-0.379814681544899 AS DOUBLE PRECISION) AS sv_2, CAST(1.603438583664343 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 29 AS sv_idx, CAST(-0.812597280185887 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.416638229815836 AS DOUBLE PRECISION) AS sv_0, CAST(2.378813663050534 AS DOUBLE PRECISION) AS sv_1, CAST(-0.902583443484049 AS DOUBLE PRECISION) AS sv_2, CAST(-0.868927903554924 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 30 AS sv_idx, CAST(0.244214046954891 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.360451778921936 AS DOUBLE PRECISION) AS sv_0, CAST(0.586221312027854 AS DOUBLE PRECISION) AS sv_1, CAST(0.831934771301745 AS DOUBLE PRECISION) AS sv_2, CAST(-1.804175260856322 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 31 AS sv_idx, CAST(0.421496557052089 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.16828540326041 AS DOUBLE PRECISION) AS sv_0, CAST(-1.251890435049662 AS DOUBLE PRECISION) AS sv_1, CAST(2.01972465450432 AS DOUBLE PRECISION) AS sv_2, CAST(-0.803902115491066 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 32 AS sv_idx, CAST(0.012130591385045 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.492529643921448 AS DOUBLE PRECISION) AS sv_0, CAST(-1.210166630146362 AS DOUBLE PRECISION) AS sv_1, CAST(-0.131939636269856 AS DOUBLE PRECISION) AS sv_2, CAST(-0.228314120081808 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 33 AS sv_idx, CAST(-0.467028858374093 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.666131918172801 AS DOUBLE PRECISION) AS sv_0, CAST(-0.175562918978386 AS DOUBLE PRECISION) AS sv_1, CAST(-1.409864455953601 AS DOUBLE PRECISION) AS sv_2, CAST(0.327896865520444 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 34 AS sv_idx, CAST(-0.780498533552314 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.742643774360315 AS DOUBLE PRECISION) AS sv_0, CAST(1.04190008122669 AS DOUBLE PRECISION) AS sv_1, CAST(-1.018589954381352 AS DOUBLE PRECISION) AS sv_2, CAST(-0.148192363477344 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 35 AS sv_idx, CAST(0.048038084881542 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.059534085189803 AS DOUBLE PRECISION) AS sv_0, CAST(1.123394024227273 AS DOUBLE PRECISION) AS sv_1, CAST(0.974687538925059 AS DOUBLE PRECISION) AS sv_2, CAST(1.028866328088248 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 36 AS sv_idx, CAST(0.231122088732231 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.102960215973118 AS DOUBLE PRECISION) AS sv_0, CAST(0.201738284490917 AS DOUBLE PRECISION) AS sv_1, CAST(-0.166630270495198 AS DOUBLE PRECISION) AS sv_2, CAST(-0.241125719814913 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 37 AS sv_idx, CAST(0.069938148198431 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.415778628787309 AS DOUBLE PRECISION) AS sv_0, CAST(-0.297252521227721 AS DOUBLE PRECISION) AS sv_1, CAST(0.705444532590725 AS DOUBLE PRECISION) AS sv_2, CAST(-1.068393398222483 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 38 AS sv_idx, CAST(0.20302587536718 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.896222610902679 AS DOUBLE PRECISION) AS sv_0, CAST(-0.535894674829799 AS DOUBLE PRECISION) AS sv_1, CAST(1.428616934806692 AS DOUBLE PRECISION) AS sv_2, CAST(-0.610395378457768 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 39 AS sv_idx, CAST(-0.389099252751579 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.461126300493145 AS DOUBLE PRECISION) AS sv_0, CAST(-0.14442792433757 AS DOUBLE PRECISION) AS sv_1, CAST(-1.14580582576062 AS DOUBLE PRECISION) AS sv_2, CAST(-2.013310236056188 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 40 AS sv_idx, CAST(0.604878102616716 AS DOUBLE PRECISION) AS dual_coeff, CAST(2.339879525546283 AS DOUBLE PRECISION) AS sv_0, CAST(1.171452181953924 AS DOUBLE PRECISION) AS sv_1, CAST(-0.123022956522745 AS DOUBLE PRECISION) AS sv_2, CAST(0.522460603120985 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 41 AS sv_idx, CAST(-0.29218601875457 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.428880765927476 AS DOUBLE PRECISION) AS sv_0, CAST(0.0456161637512 AS DOUBLE PRECISION) AS sv_1, CAST(-1.318563291258743 AS DOUBLE PRECISION) AS sv_2, CAST(-1.178086498658062 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 42 AS sv_idx, CAST(0.027465647100642 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.010821727891756 AS DOUBLE PRECISION) AS sv_0, CAST(1.202229722587569 AS DOUBLE PRECISION) AS sv_1, CAST(0.814406063740888 AS DOUBLE PRECISION) AS sv_2, CAST(-0.100236206322807 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 43 AS sv_idx, CAST(0.023760856309843 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.541029829639377 AS DOUBLE PRECISION) AS sv_0, CAST(0.648433123053582 AS DOUBLE PRECISION) AS sv_1, CAST(0.457995499229043 AS DOUBLE PRECISION) AS sv_2, CAST(1.19774672572405 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 44 AS sv_idx, CAST(0.347829760220655 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.383590179557796 AS DOUBLE PRECISION) AS sv_0, CAST(0.015369047283188 AS DOUBLE PRECISION) AS sv_1, CAST(-0.554060383932402 AS DOUBLE PRECISION) AS sv_2, CAST(-0.397401442169144 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 45 AS sv_idx, CAST(0.200570306453678 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.990921411400796 AS DOUBLE PRECISION) AS sv_0, CAST(0.138392404665929 AS DOUBLE PRECISION) AS sv_1, CAST(-0.310287050385801 AS DOUBLE PRECISION) AS sv_2, CAST(-0.496192099264584 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 46 AS sv_idx, CAST(0.464588104462077 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.523479313866697 AS DOUBLE PRECISION) AS sv_0, CAST(-1.31127825416534 AS DOUBLE PRECISION) AS sv_1, CAST(-0.357937774963381 AS DOUBLE PRECISION) AS sv_2, CAST(-0.679249333260838 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 47 AS sv_idx, CAST(-0.606256043867804 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.907257256344417 AS DOUBLE PRECISION) AS sv_0, CAST(-0.135181624280861 AS DOUBLE PRECISION) AS sv_1, CAST(-0.589779344048884 AS DOUBLE PRECISION) AS sv_2, CAST(-0.059698850339137 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 48 AS sv_idx, CAST(-0.621860150409826 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.297841608471808 AS DOUBLE PRECISION) AS sv_0, CAST(0.862426073513789 AS DOUBLE PRECISION) AS sv_1, CAST(-1.920313850499366 AS DOUBLE PRECISION) AS sv_2, CAST(0.735835459037705 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 49 AS sv_idx, CAST(0.396082307305484 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.238556060299813 AS DOUBLE PRECISION) AS sv_0, CAST(-1.7291728538884 AS DOUBLE PRECISION) AS sv_1, CAST(-1.090551969971692 AS DOUBLE PRECISION) AS sv_2, CAST(1.183262174086974 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 50 AS sv_idx, CAST(0.353122905984662 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.334017493148451 AS DOUBLE PRECISION) AS sv_0, CAST(-1.922936922197044 AS DOUBLE PRECISION) AS sv_1, CAST(-1.691797004288704 AS DOUBLE PRECISION) AS sv_2, CAST(0.795531787603288 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 51 AS sv_idx, CAST(0.116473671818456 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.059708524788567 AS DOUBLE PRECISION) AS sv_0, CAST(-0.825572842117991 AS DOUBLE PRECISION) AS sv_1, CAST(0.677535632650091 AS DOUBLE PRECISION) AS sv_2, CAST(-1.388201840914162 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 52 AS sv_idx, CAST(-0.807655164455248 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.035747635430745 AS DOUBLE PRECISION) AS sv_0, CAST(-1.273204984798746 AS DOUBLE PRECISION) AS sv_1, CAST(-1.660747280609714 AS DOUBLE PRECISION) AS sv_2, CAST(-0.502402774350689 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 53 AS sv_idx, CAST(0.068426031476145 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.669781517832542 AS DOUBLE PRECISION) AS sv_0, CAST(-1.11883803114507 AS DOUBLE PRECISION) AS sv_1, CAST(0.444274179935551 AS DOUBLE PRECISION) AS sv_2, CAST(0.491905555088375 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 54 AS sv_idx, CAST(0.285688530394275 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.17593765299669 AS DOUBLE PRECISION) AS sv_0, CAST(-1.495178267070498 AS DOUBLE PRECISION) AS sv_1, CAST(0.05656455139048 AS DOUBLE PRECISION) AS sv_2, CAST(-0.028194856888364 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 55 AS sv_idx, CAST(0.292948261887387 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.097068460259093 AS DOUBLE PRECISION) AS sv_0, CAST(0.048107555293906 AS DOUBLE PRECISION) AS sv_1, CAST(1.488393485194116 AS DOUBLE PRECISION) AS sv_2, CAST(-1.969704264543873 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 56 AS sv_idx, CAST(0.324095279443651 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.391273475501568 AS DOUBLE PRECISION) AS sv_0, CAST(1.499457880393438 AS DOUBLE PRECISION) AS sv_1, CAST(1.153497086511323 AS DOUBLE PRECISION) AS sv_2, CAST(0.735515919954537 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 57 AS sv_idx, CAST(0.397055054992784 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.147626889968244 AS DOUBLE PRECISION) AS sv_0, CAST(1.325101285359325 AS DOUBLE PRECISION) AS sv_1, CAST(-0.907227586442982 AS DOUBLE PRECISION) AS sv_2, CAST(0.868871674346195 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 58 AS sv_idx, CAST(0.166940122282705 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.63840724272281 AS DOUBLE PRECISION) AS sv_0, CAST(-0.923211806959433 AS DOUBLE PRECISION) AS sv_1, CAST(0.089149011145331 AS DOUBLE PRECISION) AS sv_2, CAST(0.683753506851133 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 59 AS sv_idx, CAST(0.342907332905112 AS DOUBLE PRECISION) AS dual_coeff, CAST(0.030749329841721 AS DOUBLE PRECISION) AS sv_0, CAST(-1.937663320039244 AS DOUBLE PRECISION) AS sv_1, CAST(0.870708452030062 AS DOUBLE PRECISION) AS sv_2, CAST(1.031788759046616 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 60 AS sv_idx, CAST(0.383714888954048 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.032119620854327 AS DOUBLE PRECISION) AS sv_0, CAST(0.294797013077446 AS DOUBLE PRECISION) AS sv_1, CAST(-1.290367054210298 AS DOUBLE PRECISION) AS sv_2, CAST(2.145075451087018 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 61 AS sv_idx, CAST(0.327976054997487 AS DOUBLE PRECISION) AS dual_coeff, CAST(-1.171639821886214 AS DOUBLE PRECISION) AS sv_0, CAST(0.544215934792695 AS DOUBLE PRECISION) AS sv_1, CAST(1.684051478875226 AS DOUBLE PRECISION) AS sv_2, CAST(-0.60662787900618 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 62 AS sv_idx, CAST(0.214765249558302 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.2827034851547 AS DOUBLE PRECISION) AS sv_0, CAST(-1.513767487098024 AS DOUBLE PRECISION) AS sv_1, CAST(-0.153494027002635 AS DOUBLE PRECISION) AS sv_2, CAST(-0.514715010904637 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 63 AS sv_idx, CAST(0.18576342797338 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.035340633848275 AS DOUBLE PRECISION) AS sv_0, CAST(0.877845248546266 AS DOUBLE PRECISION) AS sv_1, CAST(0.662658700475368 AS DOUBLE PRECISION) AS sv_2, CAST(1.620581137118308 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 64 AS sv_idx, CAST(0.114624769015825 AS DOUBLE PRECISION) AS dual_coeff, CAST(-0.492370596479986 AS DOUBLE PRECISION) AS sv_0, CAST(0.339720806855092 AS DOUBLE PRECISION) AS sv_1, CAST(1.12408429591038 AS DOUBLE PRECISION) AS sv_2, CAST(1.637525131892074 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte UNION ALL SELECT 65 AS sv_idx, CAST(0.381306366758315 AS DOUBLE PRECISION) AS dual_coeff, CAST(1.223274254702361 AS DOUBLE PRECISION) AS sv_0, CAST(-0.344722454891636 AS DOUBLE PRECISION) AS sv_1, CAST(-1.172421880524526 AS DOUBLE PRECISION) AS sv_2, CAST(0.023500443750259 AS DOUBLE PRECISION) AS sv_3 
  FROM dummy_cte) AS "Values"), 
  kernel_dp AS 
  (SELECT t."KEY" AS "KEY", t.dot_product AS dot_product 
  FROM (SELECT full_join_data_sv."KEY" AS "KEY", sum(CAST(full_join_data_sv.dot_prod1 AS DOUBLE PRECISION)) + CAST(-0.01454166381486 AS DOUBLE PRECISION) AS dot_product 
  FROM (SELECT kernel_input_with_scaling."KEY" AS "KEY", "SV_data".dual_coeff * exp(least(CAST(100.0 AS DOUBLE PRECISION), greatest(-CAST(100.0 AS DOUBLE PRECISION), CAST(-1.0 AS DOUBLE PRECISION) * (power(kernel_input_with_scaling."PC1" - "SV_data".sv_0, 2) + power(kernel_input_with_scaling."PC2" - "SV_data".sv_1, 2) + power(kernel_input_with_scaling."PC3" - "SV_data".sv_2, 2) + power(kernel_input_with_scaling."PC4" - "SV_data".sv_3, 2))))) AS dot_prod1 
  FROM kernel_input_with_scaling, "SV_data") AS full_join_data_sv GROUP BY full_join_data_sv."KEY") AS t)
   SELECT kernel_dp."KEY" AS "KEY", CAST(1.361234203025919 AS DOUBLE PRECISION) + CAST(0.274041235889213 AS DOUBLE PRECISION) * kernel_dp.dot_product AS "Estimator" 
  FROM kernel_dp