|
5 | 5 |
|
6 | 6 | from . import constants as c, note_status_history
|
7 | 7 |
|
8 |
| -from matplotlib import pyplot as plt |
9 | 8 | import numpy as np
|
10 | 9 | import pandas as pd
|
11 | 10 |
|
@@ -395,49 +394,6 @@ def filter_raters(ratings):
|
395 | 394 | return ratings
|
396 | 395 |
|
397 | 396 |
|
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 |
| - |
441 | 397 | def write_tsv_local(df: pd.DataFrame, path: str) -> None:
|
442 | 398 | """Write DF as a TSV stored to local disk.
|
443 | 399 |
|
|
0 commit comments