Skip to content

Commit

Permalink
Update for auto doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishalcrow committed Sep 19, 2024
1 parent 11f3821 commit 062038c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/tutorials/curation/plot_1_automated_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import warnings
warnings.filterwarnings("ignore")
from pathlib import Path
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -97,7 +96,6 @@
# human_labels = sorting_analyzer.sorting.get_property('quality')

from sklearn.metrics import confusion_matrix, balanced_accuracy_score
import seaborn as sns

label_conversion = model_info['label_conversion']
predictions = [ labels[a][0] for a in range(10) ]
Expand All @@ -107,7 +105,9 @@
# Calculate balanced accuracy for the confusion matrix
balanced_accuracy = balanced_accuracy_score(human_labels, predictions)

sns.heatmap(conf_matrix, annot=True, fmt='d', cmap='viridis')
plt.imshow(conf_matrix)
for (index, value) in np.ndenumerate(conf_matrix):
plt.annotate( str(value), xy=index, color="white", fontsize="15")
plt.xlabel('Predicted Label')
plt.ylabel('Human Label')
plt.xticks(ticks = [0.5, 1.5], labels = list(label_conversion.values()))
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ docs = [
"numba", # For many postprocessing functions
"xarray", # For use of SortingAnalyzer zarr format
"networkx",
"skops", # For auotmated curation
"sklearn", # For auotmated curation
# Download data
"pooch>=1.8.2",
"datalad>=1.0.2",
Expand Down

0 comments on commit 062038c

Please sign in to comment.