You would have to debug. Similarity is not the only issue. For example
if you select so little test data that none can be chosen, you get the
same result.

(For our purposes here there is only one NaN, and it is one returned
on purpose to mean no answer, rather than an accident of dividing by
zero.)

On Sat, Apr 14, 2012 at 1:26 AM, Dawid Weiss
<[email protected]> wrote:
> Completing Sean's answer, there are many types of NaNs (multiple
> different binary representations) -- check out the wikipedia page
> about it:
>
> http://en.wikipedia.org/wiki/NaN
>
> Typically you'll only care about whether a number is a NaN or not (not
> the kind of NaN).
>
> Dawid
>
> On Fri, Apr 13, 2012 at 11:51 PM, Sean Owen <[email protected]> wrote:
>> NaN means "not a number". It is kind of like "null". This means no
>> answer could be computed, and usually that is because your data is too
>> sparse. For the kind of recommender you are running, you don't want
>> such sparse data, and it sounds like you are making the data sparse by
>> removing a lot of ratings.
>>
>> On Thu, Apr 12, 2012 at 10:29 PM,  <[email protected]> wrote:
>>>  I have used the UserBasedRecommender to recommend and used the 
>>> AverageAbsoluteDifferenceRecommenderEvaluator as evaluator, when the 
>>> ratings.txt contains more ratings, the evaluator can return some desired 
>>> results, but when i made some requirement about the ratings.txt, for 
>>> example, i filtered out those items that receive more than 4 ratings, the 
>>> evaluator always return NaN. What does NaN mean? It is caused by the 
>>> similarity metric? I have try to pre calculate users' similarity, but it 
>>> returns NaN too.
>>> what is the problem?
>>

Reply via email to