diff --git a/requirements.txt b/requirements.txt index fe4e78e..13f4a0f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -# viktor==13.4.0 -plotly==5.9.0 -pandas==1.4.4 +viktor==14.0.0 +plotly==5.14.1 +pandas==1.5.3 diff --git a/source/self_organizing_maps.py b/source/self_organizing_maps.py index 827bdd9..a961902 100644 --- a/source/self_organizing_maps.py +++ b/source/self_organizing_maps.py @@ -3,7 +3,7 @@ import numpy as np import pandas as pd -from viktor.core import UserException +from viktor.core import UserError from .helpers import path_distance @@ -94,7 +94,7 @@ def _get_neighborhood(center: int, radix: float, domain: np.ndarray) -> np.ndarr return np.exp(-(distances * distances) / (2 * (radix * radix))) -def _get_route(cities: pd.DataFrame, network: np.ndarray) -> pd.Int64Index: +def _get_route(cities: pd.DataFrame, network: np.ndarray): """Get the route generated by the algorithm. Args: @@ -163,8 +163,8 @@ def self_organizing_maps( # Check if any parameter has completely decayed. if n < 1: - raise UserException("Radius has completely decayed, finishing execution at {} iterations".format(i)) + raise UserError("Radius has completely decayed, finishing execution at {} iterations".format(i)) if learning_rate < 0.001: - raise UserException("Learning rate has completely decayed, finishing execution at {} iterations".format(i)) + raise UserError("Learning rate has completely decayed, finishing execution at {} iterations".format(i)) return routes, np.arange(0, iterations + 1, 1).tolist(), distances diff --git a/viktor.config.toml b/viktor.config.toml index 567b50a..21e5116 100644 --- a/viktor.config.toml +++ b/viktor.config.toml @@ -1,2 +1,2 @@ -python_version='3.9' -app_type = 'simple' +python_version='3.10' +app_type = 'editor'