From 2065bf95ad4cacd86b616026d5dc46e2a06b03a7 Mon Sep 17 00:00:00 2001 From: Jay Baxter Date: Tue, 19 Dec 2023 10:13:24 -0800 Subject: [PATCH] Remove plotting code from process_data --- sourcecode/scoring/process_data.py | 44 ------------------------------ 1 file changed, 44 deletions(-) diff --git a/sourcecode/scoring/process_data.py b/sourcecode/scoring/process_data.py index a322b9ea..1207aec8 100644 --- a/sourcecode/scoring/process_data.py +++ b/sourcecode/scoring/process_data.py @@ -5,7 +5,6 @@ from . import constants as c, note_status_history -from matplotlib import pyplot as plt import numpy as np import pandas as pd @@ -395,49 +394,6 @@ def filter_raters(ratings): return ratings -def visualize_parameters(noteParams: pd.DataFrame, raterParams: pd.DataFrame) -> None: - """Plot/describe note and rater params. - - Args: - noteParams (pd.DataFrame) - raterParams (pd.DataFrame) - """ - print(noteParams.describe()) - - plt.figure() - noteParams[c.coreNoteInterceptKey].plot(kind="hist", bins=20) - - plt.figure() - noteParams[c.coreNoteFactor1Key].plot(kind="hist", bins=20) - - plt.figure() - noteParams.plot(kind="scatter", x=c.coreNoteFactor1Key, y=c.coreNoteInterceptKey, alpha=0.05) - - print(raterParams.describe()) - - plt.figure() - raterParams[c.coreRaterInterceptKey].plot(kind="hist", bins=20) - - plt.figure() - raterParams[c.coreRaterFactor1Key].plot(kind="hist", bins=20) - - -def visualize_helpfulness(helpfulness_scores: pd.DataFrame) -> None: - """Plot user helpfulness scores. - - Args: - helpfulness_scores (pd.DataFrame) - """ - plt.figure() - helpfulness_scores[c.crhCrnhRatioDifferenceKey].plot(kind="hist", bins=20) - - plt.figure() - helpfulness_scores[c.meanNoteScoreKey].plot(kind="hist", bins=20) - - plt.figure() - helpfulness_scores[c.raterAgreeRatioKey].plot(kind="hist", bins=20) - - def write_tsv_local(df: pd.DataFrame, path: str) -> None: """Write DF as a TSV stored to local disk.