diff --git a/server/nightr/strategies/steam.py b/server/nightr/strategies/steam.py index 266b7c2..142d709 100644 --- a/server/nightr/strategies/steam.py +++ b/server/nightr/strategies/steam.py @@ -14,7 +14,7 @@ def dota2_players(context: Context) -> Prediction: # Find the historic data closest matching the current number of players. Lol yolo current_players = get_dota2_players() - with Path(__file__).parent.joinpath("dotaplayers 2019-04-06 13:43:33.074496.csv").open() as csv: + with Path(__file__).parent.joinpath("dotaplayers-2019-04-06-13-43-33.074496.csv").open() as csv: best_players, best_dt = min(csv, key=lambda l: abs(int(l.rstrip().split(", ")[0]) - current_players)).rstrip().split(", ") best_match_players = int(best_players) best_match_datetime = datetime.strptime(best_dt, "%Y-%m-%d %H:%M:%S.%f") diff --git a/server/nightr/strategies/svm_strat.py b/server/nightr/strategies/svm_strat.py index 2423258..993f4ce 100644 --- a/server/nightr/strategies/svm_strat.py +++ b/server/nightr/strategies/svm_strat.py @@ -48,6 +48,7 @@ def perform_svm_pred(context: Context) -> Prediction: An SVM trained on two data points, which is capable of guessing 0.5 no matter what. """ p = Prediction() + p.weight = 0.5 data = requests.get('https://portal.opendata.dk/api/3/action/datastore_search?resource_id=2a82a145-0195-4081-a13c-b0e587e9b89c') records = data.json()['result']['records']