Skip to content

Commit 2065bf9

Browse files
authored
Remove plotting code from process_data
1 parent 8f05a82 commit 2065bf9

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

sourcecode/scoring/process_data.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from . import constants as c, note_status_history
77

8-
from matplotlib import pyplot as plt
98
import numpy as np
109
import pandas as pd
1110

@@ -395,49 +394,6 @@ def filter_raters(ratings):
395394
return ratings
396395

397396

398-
def visualize_parameters(noteParams: pd.DataFrame, raterParams: pd.DataFrame) -> None:
399-
"""Plot/describe note and rater params.
400-
401-
Args:
402-
noteParams (pd.DataFrame)
403-
raterParams (pd.DataFrame)
404-
"""
405-
print(noteParams.describe())
406-
407-
plt.figure()
408-
noteParams[c.coreNoteInterceptKey].plot(kind="hist", bins=20)
409-
410-
plt.figure()
411-
noteParams[c.coreNoteFactor1Key].plot(kind="hist", bins=20)
412-
413-
plt.figure()
414-
noteParams.plot(kind="scatter", x=c.coreNoteFactor1Key, y=c.coreNoteInterceptKey, alpha=0.05)
415-
416-
print(raterParams.describe())
417-
418-
plt.figure()
419-
raterParams[c.coreRaterInterceptKey].plot(kind="hist", bins=20)
420-
421-
plt.figure()
422-
raterParams[c.coreRaterFactor1Key].plot(kind="hist", bins=20)
423-
424-
425-
def visualize_helpfulness(helpfulness_scores: pd.DataFrame) -> None:
426-
"""Plot user helpfulness scores.
427-
428-
Args:
429-
helpfulness_scores (pd.DataFrame)
430-
"""
431-
plt.figure()
432-
helpfulness_scores[c.crhCrnhRatioDifferenceKey].plot(kind="hist", bins=20)
433-
434-
plt.figure()
435-
helpfulness_scores[c.meanNoteScoreKey].plot(kind="hist", bins=20)
436-
437-
plt.figure()
438-
helpfulness_scores[c.raterAgreeRatioKey].plot(kind="hist", bins=20)
439-
440-
441397
def write_tsv_local(df: pd.DataFrame, path: str) -> None:
442398
"""Write DF as a TSV stored to local disk.
443399

0 commit comments

Comments
 (0)