How to reuse model

jngaijngai Member Posts: 7 Contributor II
edited November 2018 in Help
I would like to invoke my model quickly due to time constraint of application.

that is, trained and stored a model, then use different set of data, run the model  and check its result.

I separate my work into 2 application, first one is training, and store a model.

second one, is read an excel file, apply model and get its result.


It seems that 'read excel' and 'aml' both read data and  stored internally the excel data, it does not read the excel file when it is invoked, how to make it read the new content of excel file on disk when invoked?


Jim

Answers

  • jngaijngai Member Posts: 7 Contributor II
    Anyone has clue how to make the 'read excel' or similar process to read current
    content from disk when it is invoked, not use content when the application is designed?

    Thanks
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    the Read operators do NOT cache anything. Instead the files are directly loaded from disk. I assume that you entered the wrong path to an old file or use a relative path, pointing to an old version.

    Greetings,
      Sebastian
  • jngaijngai Member Posts: 7 Contributor II
    Thanks for the reply, I did some more experiments, found 'read csv' did not cache data , but  'aml' did .

    steps that may be repeated by anyone :

    read csv
    ---------
    a1. define read csv
    a2. change data file by notepad on 1 obvious value, and save it to disk
    a3. run and view data
    a4. data reflected newly changed value, it indicates that the csv file being read when the 'run' button is pressed.


    aml
    b1. define aml by 'start data loading wizard', at the last steps, it ask where to store, I think the problem is here.
    b2. complete the aml definition
    b3. change data file by notepad on1 obvious data like before, and save it to disk
    b4. run and view data
    b5. data reflects old data, it means aml uses cached data in step b1.

    aml additional test
    ================
    a) I have tried the update button on attached  screen (attribute editor of aml), data not refreshed, I think it is expected because it reflects updated attributes definition not data itself

    b) using 'file==> load data ' also does not work because it seems for adding additional column definition.

    http://i211.photobucket.com/albums/bb67/whatchee/test.jpg

    I think aml stores more than enough information at step b1 that causes this behaviour.

    But ' read csv ' does not support decimal number very well at this moment,  Either wait for new version, multiplying/rounding to integer are alternatives at this moment.  Any other alternatives?


    Note to  beginners like me, using readcsv need 'set role' to define 'id' and 'label' , so probably you need 2 consecutive  'set role'.


    Thanks

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    if you use the wizard of the aml write, it will convert your csv file into aml format. That means, that there is one aml file, containing meta data of attributes, values, types and roles and one dat file containing the real data.
    If you take a look at the file parameters in this operator, you will see, that there isn't entered the path on the original csv file. So if you want to change that data, you will have to change at least the dat file.

    Greetings,
      Sebastian
Sign In or Register to comment.