Changeset 128:5e724235253b

Show
Ignore:
Timestamp:
06/21/07 08:51:50 (15 months ago)
Author:
Tarek Ziad?? <tarek@…>
Message:

added db level

Location:
neighbors
Files:
4 added
3 modified

Legend:

Unmodified
Added
Removed
  • neighbors/__init__.py

    r126 r128  
     1from neighbours import compute 
     2 
     3if __name__ == '__main__': 
     4    compute() 
     5 
  • neighbors/nearest.py

    r126 r128  
    1 # http://aima.cs.berkeley.edu/python/learning.html 
     1 
     2# original code, http://aima.cs.berkeley.edu/python/learning.html 
     3# a bit arranged 
    24 
    35class DataSet(object): 
  • neighbors/neartag.py

    r126 r128  
    11import nearest 
    2  
    32 
    43class NearestByTag(object): 
     
    2322 
    2423        if current is None: 
    25             raise Exception('user not found') 
     24            raise Exception('user %s not found' % name) 
    2625 
    2726        for user in self.db.examples: