You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Tamas Jambor <ja...@gmail.com> on 2010/08/15 20:09:54 UTC

FileDataModel

Hi,

One more possible bug, in FileDataModel, there is nothing to make sure 
that the superclass - AbstractDataModel gets the value for maxPreference 
and minPreference.

Tamas

Re: FileDataModel

Posted by Sean Owen <sr...@gmail.com>.
Ah yeah I see the problem now. I'll fix that.

On Sun, Aug 15, 2010 at 5:00 PM, Tamas Jambor <ja...@gmail.com> wrote:
> DataModel model = new FileDataModel(new File("./data/test.txt"));
> //just to make sure it loads the model
> model.getNumItems();
> System.out.println(model.getMaxPreference());
>
> this prints out a NaN

Re: FileDataModel

Posted by Tamas Jambor <ja...@gmail.com>.
DataModel model = new FileDataModel(new File("./data/test.txt"));
//just to make sure it loads the model
model.getNumItems();
System.out.println(model.getMaxPreference());

this prints out a NaN

because you have maxPreference/minPreference calculated when it creates 
the inner DataModel (a variable called delegate), but it is not in the 
wrapper class FileDataModel.

On 15/08/2010 21:54, Sean Owen wrote:
> What do you mean by this? I'm not clear yet.
>
> On Sun, Aug 15, 2010 at 1:09 PM, Tamas Jambor<ja...@gmail.com>  wrote:
>    
>> Hi,
>>
>> One more possible bug, in FileDataModel, there is nothing to make sure that
>> the superclass - AbstractDataModel gets the value for maxPreference and
>> minPreference.
>>
>> Tamas
>>
>>      


Re: FileDataModel

Posted by Sean Owen <sr...@gmail.com>.
What do you mean by this? I'm not clear yet.

On Sun, Aug 15, 2010 at 1:09 PM, Tamas Jambor <ja...@gmail.com> wrote:
> Hi,
>
> One more possible bug, in FileDataModel, there is nothing to make sure that
> the superclass - AbstractDataModel gets the value for maxPreference and
> minPreference.
>
> Tamas
>