Dear All, thanks for the answer, Gokhan. As far as I understood the entire file is read every time I call refresh(). So, if I have extremely big file, and let's say I added a few lines, it would cost much time. Am I right?
Can the other questions be answered (i. e. number 1)? Thanks, Darius 2013/9/1 Gokhan Capan <[email protected]> > Hi Darius, > > FileDataModel works on a ratings file (not directory), and if you modify > this file, you may call its refresh method for the model to reload the > ratings file. > > It would check if minReloadIntervalMS milliseconds passed to reload, > though. If you don't pass that argument, it defaults to 1 minute. > > Best, > Gokhan > > > On Thu, Aug 29, 2013 at 7:23 PM, Darius Miliauskas < > [email protected]> wrote: > > > Dear All, > > > > I guess my question would be already discussed. I found a short > explanation > > in stackoverflow ( > > > > > http://stackoverflow.com/questions/7638400/mahouts-datamodel-with-genericdatamodel > > ) > > but I would like to get more details. > > > > 1. Let's say I uploaded data from the file to DataModel. Is it the only > way > > to put all data to mahout, isn't it? I did not find any other examples > > (without the usage of DataModel). > > > > 2. What's the meaning of refresh in the concept of DataModel? Is it just > > add a new piece of data to the existing DataModel or it creates a new > > DataModel from the old piece and a new piece? > > > > Can you give a simple code example how to apply the method of refresh? > > > > For example, my tries were the following: > > > > DataModel model = new FileDataModel(ratingsFile); > > <...> > > Recommender cachingRecommender = new CachingRecommender(); > > cachingRecommender.refresh(); > > > > or > > > > model.refresh(); > > > > But where I put the parameters? > > > > 3. Can I merge a new file with a piece of new data to the old DataModel? > > > > model.refresh(newFile); or smt how to do it. > > > > > > Thanks, > > > > Darius > > >
