Skip to content

Commit

Permalink
Remove plotting code from process_data
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaxter authored Dec 19, 2023
1 parent 8f05a82 commit 2065bf9
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions sourcecode/scoring/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2065bf9

Please sign in to comment.