Spaces:
Configuration error
Configuration error
LMartinezEXEX
commited on
Commit
·
164b173
1
Parent(s):
0fbc7e6
Minor fix in Ann class where it didnt had metrics_available in self to retrieve.
Browse files- modules/module_ann.py +3 -2
modules/module_ann.py
CHANGED
@@ -39,6 +39,8 @@ class Ann:
|
|
39 |
self.tree = None
|
40 |
|
41 |
self.tt = TicToc()
|
|
|
|
|
42 |
|
43 |
def init(self,
|
44 |
n_trees: int=10,
|
@@ -46,8 +48,7 @@ class Ann:
|
|
46 |
n_jobs: int=-1 # n_jobs=-1 Run over all CPU availables
|
47 |
) -> None:
|
48 |
|
49 |
-
availables_metrics
|
50 |
-
assert(metric in self.availables_metrics), f"Error: The value of the parameter 'metric' can only be {availables_metrics}!"
|
51 |
|
52 |
print("\tInit tree...")
|
53 |
self.tt.start()
|
|
|
39 |
self.tree = None
|
40 |
|
41 |
self.tt = TicToc()
|
42 |
+
self.availables_metrics = ['angular','euclidean','manhattan','hamming','dot']
|
43 |
+
|
44 |
|
45 |
def init(self,
|
46 |
n_trees: int=10,
|
|
|
48 |
n_jobs: int=-1 # n_jobs=-1 Run over all CPU availables
|
49 |
) -> None:
|
50 |
|
51 |
+
assert(metric in self.availables_metrics), f"Error: The value of the parameter 'metric' can only be {self.availables_metrics}!"
|
|
|
52 |
|
53 |
print("\tInit tree...")
|
54 |
self.tt.start()
|