aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-02-04 19:02:43 +0000
committerVasil Zlatanov <v@skozl.com>2019-02-04 19:02:43 +0000
commitd248ef0e0c9c9e7b924c3508f43e339687975627 (patch)
tree59ebeaf1c190b78e536ecbeb2fe2c66b9be9f080
parent1f4c2737c59abee6f6291c1cffc2befdad386e1b (diff)
downloade4-vision-d248ef0e0c9c9e7b924c3508f43e339687975627.tar.gz
e4-vision-d248ef0e0c9c9e7b924c3508f43e339687975627.tar.bz2
e4-vision-d248ef0e0c9c9e7b924c3508f43e339687975627.zip
Remove hardcoded leaf limit
-rwxr-xr-xevaluate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/evaluate.py b/evaluate.py
index 9e3a613..92c4107 100755
--- a/evaluate.py
+++ b/evaluate.py
@@ -7,7 +7,7 @@ CLUSTER_CNT = 256
KMEANS = False
if KMEANS:
- N_ESTIMATORS = 10
+ N_ESTIMATORS = 1000
else:
N_ESTIMATORS = 1
@@ -29,7 +29,7 @@ if (KMEANS):
print("Computing KMeans with", train_part.shape[0], "keywords")
kmeans = KMeans(n_clusters=CLUSTER_CNT, n_init=N_ESTIMATORS, random_state=0).fit(train_part)
else:
- trees = RandomTreesEmbedding(max_leaf_nodes=256, n_estimators=N_ESTIMATORS, random_state=0).fit(train_part)
+ trees = RandomTreesEmbedding(max_leaf_nodes=CLUSTER_CNT, n_estimators=N_ESTIMATORS, random_state=0).fit(train_part)
print("Generating histograms")