3 Replies Latest reply on Apr 26, 2017 10:44 PM by Shinichiro Murakami

    Multivatirate Fit data on a month and apply that fit to another month

    HOANG DUNG VU

      Hi,

       

      I'm a newbie to Tableau, I have a very simple table like this

       

      "id","mon","x1","x2","x3","y"

      1,1,0.941145923521707,1.34757712407196,-1.97678539042925,0.533338547155734

      2,1,-2.1470419159845,-0.161069136778066,-0.529325260770382,-4.64812663816131

      3,1,1.24663470290956,1.20743143765247,0.189109480951889,-1.47562648422063

      4,1,0.120959681383271,-0.57743178646292,1.05886376665165,-6.29569960496403

      5,1,-0.388457060694663,-0.662412423685385,1.32833416107165,-6.75805212607665

      6,1,0.726169522529422,1.3930642390906,0.551167269148319,-4.79639476923479

      7,1,-2.19365631757113,0.690046567084131,-1.22103759789667,0.876609017363695

      8,1,2.19216964773452,-0.855480036019592,-0.940463959599582,-17.1924699135413

      9,1,0.946590802476874,-0.791491741093371,2.13332465636724,5.22365898979724

      10,1,-0.848324371967476,-0.223410555470229,0.745748518758329,-10.4296338101334

      11,2,-1.22482863312603,-0.112355305091373,-0.974931467304905,-7.53548859664071

      12,2,-0.180425469965219,0.0902145144552406,-0.166083646112699,-10.1064171734573

      13,2,-1.84496196027997,-0.805094941370512,-0.366453287506715,-5.06144325360792

      14,2,0.278276297590415,0.57976065658573,1.73034957951632,-9.09636387268647

      15,2,-2.16838046071875,-1.90569695874854,0.9436609292114,4.60118505085574

      16,2,-0.140882196252805,-0.225860967869965,0.934751760779391,-8.9400272382682

      17,2,0.997787596730784,-0.835128408086991,-0.798973586045375,-15.6767852967893

      18,2,0.809480568612559,1.44621840474098,0.606077879791599,-4.03523449677822

      19,2,-0.0445646765237623,-1.57402574613654,1.68100835642336,2.97678720794121

      20,2,-0.677062826533438,1.28748586175623,1.32249430395637,-17.0940950863155

       

      the first ten data belongs to 'mon'=1, the rest belongs to 'mon'=2. My boss asked me to use polynomial fitting on the first ten data ('mon'=1) and use that model for the last ten data ('mon'=2) to validate the accuracy of the model.

       

      The polynomial is second order. I have done the polynomial fitting which is used R script inside calculated field, but I don't know how to do as description, all I can do is fitting the data and apply to the same training data.

       

      Please help, thanks a lot.