From 3298521685fbddeba42f8220ea3face1deb5f0aa Mon Sep 17 00:00:00 2001 From: Derek Miller Date: Fri, 6 Aug 2021 17:57:36 -0400 Subject: [PATCH] small fix --- summarizer/cluster_features.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/summarizer/cluster_features.py b/summarizer/cluster_features.py index ae4d766..c91173e 100644 --- a/summarizer/cluster_features.py +++ b/summarizer/cluster_features.py @@ -121,7 +121,7 @@ def calculate_optimal_cluster(self, k_max: int): delta_2.append(delta_1[i] - delta_1[i - 1] if i > 1 else 0.0) for j in range(len(inertias)): - strength = 0 if j <= 1 or j == leinertias) - 1 else delta_2[j + 1] - delta_1[j + 1] + strength = 0 if j <= 1 or j == len(inertias) - 1 else delta_2[j + 1] - delta_1[j + 1] if strength > max_strength: max_strength = strength