3 Replies Latest reply: May 30, 2012 8:19 AM by Mark Kelly-Oracle RSS

    Error in save table ?

    920802
      Hi,

      1. I built regression model in workflow.
      As input data I used:
      amout [number] year [number] month[number]
      125 575,64     | 1 998     | 1
      122 325,21     | 1 998     | 2
      61 649,5     | 1 998     | 3
      17 404,26     | 1 998     | 4
      61 649,5     | 1 998     | 5
      ...
      230 453,02     | 2 000     | 12


      2. I successfuly built model (no case id, target=amount).

      Next I apply data (zeros for 2001-01 to 2002-06 to force prediction in ODM):
      amout [number] year [number] month[number]
      125 575,64     | 1 998     | 1
      ...
      0     | 2 001     | 1
      ...
      0     | 2 002     | 6

      3. As a result I received forecast (shown on apply node by view data):
      amout month year GLM prediction SVM prediction
      125 575,64     | 1     | 1 998     | 90 648,0756     | 94 171,2833
      ...
      230 453,02     | 12     | 2 000     | 148 027,3676     | 110 595,2216
      0     | 1     | 2 001     | 193 985,8756     | 109 810,8838
      0     | 2     | 2 001     | 189 807,8295     | 109 810,8838
      0     | 3     | 2 001     | 185 629,7833     | 109 810,8838
      ...

      As you can see I received forecast for +1 month from SVM and for full period from GLM.

      4. Then I connected apply node to output table and processed. In output table there were stored results (also shown in view data on output table):

      GLM_pred SVM_pred amout month year
      94 171,2833     | 94 171,2833     | 125 575,64     | 1     | 1 998
      ...
      110 595,2216     | 110 595,2216     | 230 453,02     | 12     | 2 000
      109 810,8838     | 109 810,8838     | 0     | 1     | 2 001
      109 810,8838     | 109 810,8838     | 0     | 2     | 2 001
      109 810,8838     109 810,8838     | 0     | 3     | 2 001
      ...


      5. SQL check:
      I checked in SQL and values presented in view data for output table are the same as result of sql query (select * from table).
      I also launched apply node in SQL (code from deploy) and results are the same as in view mode in workflow, it means there are predictions for +1..+18 months.

      6. Question:
      Why output table didn't save result presented in apply node ? It seems that instead of GLM results there were saved in both columns results from SVM.....
      Any ideas ??

      Edited by: 917799 on 2012-05-23 03:51
        • 1. Re: Error in save table ?
          920802
          Hi,

          I made additional experiment and connected my apply node with additional:

          (apply node) -> transform -> filter column -> output table 2;

          On transform and filter I don't perform any operations.
          View data on transform and filter column shows values the same as apply node (forecast for GLM for 18 months).
          Output_table_2 both: in view data and by SQL query shows the same as output table 1, it means the same values for GLM like for SVM (no GLM results saved).

          It means something wrong is with saving data to output table.

          Edited by: 917799 on 2012-05-23 02:00

          Edited by: 917799 on 2012-05-23 02:09

          Edited by: 917799 on 2012-05-23 02:10
          • 2. Re: Error in save table ?
            920802
            Hi,

            As appendix to previous posts - If I set output node to view data is presented properly in this view.

            Then I connected second output set as table to first output (set as view).
            In this second table output data are not proper - no GLM data, but SVM saved twice.

            Edited by: 917799 on 2012-05-24 02:28
            • 3. Re: Error in save table ?
              Mark Kelly-Oracle
              Hi,
              If you connect and node that generates a data flow, such as the Apply node, to the Create Table node, then the Create Table node will generate a table containing all the columns passed in to it.
              Bring up the editor for the Create Table node to insure that it has all the columns listed that you want.
              Thanks, Mark