Skip to content

Commit

Permalink
fix typo in internal variable name. Dot not affect anything
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonrljr committed Nov 19, 2023
1 parent 57aefe1 commit f5937ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sysidentpy/metaheuristics/bpsogsa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Binary Hybrid Particle Swarm Optimization and Gravitational Search Algorithm"""

# Authors:
# Wilson Rocha Lacerda Junior <wilsonrljr@outlook.com>
# License: BSD 3 clause
Expand Down Expand Up @@ -77,7 +78,6 @@ def __init__(
p_zeros=0.5,
p_ones=0.5,
):

self.dimension = dimension
self.n_agents = n_agents
self.maxiter = maxiter
Expand Down Expand Up @@ -251,7 +251,7 @@ def calculate_acceleration(
for i in range(self.n_agents):
for j in range(k_best_agents):
if maximum_value_index[j] != i:
euclidian_distance = np.linalg.norm(
euclidean_distance = np.linalg.norm(
population[:, i] - population[:, maximum_value_index[j]],
self._norm,
)
Expand All @@ -262,7 +262,7 @@ def calculate_acceleration(
] * (
population[:, maximum_value_index[j]] - population[:, i]
) / (
euclidian_distance**self._power + np.finfo(np.float64).eps
euclidean_distance**self._power + np.finfo(np.float64).eps
)

acceleration = gravitational_force * gravitational_constant
Expand Down

0 comments on commit f5937ea

Please sign in to comment.