Skip to content

Commit

Permalink
y and y_hat 1D arrays -> y and y_hat 2D arrays (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
madvid committed Mar 15, 2022
1 parent c684898 commit 2ed32f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions module08/en.subject.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,8 @@ \section*{Examples}
import numpy as np
from sklearn.metrics import confusion_matrix

y_hat = np.array(['norminet', 'dog', 'norminet', 'norminet', 'dog', 'bird'])
y = np.array(['dog', 'dog', 'norminet', 'norminet', 'dog', 'norminet'])
y_hat = np.array([['norminet'], ['dog'], ['norminet'], ['norminet'], ['dog'], ['bird']])
y = np.array([['dog'], ['dog'], ['norminet'], ['norminet'], ['dog'], ['norminet']])

# Example 1:
## your implementation
Expand Down Expand Up @@ -1331,8 +1331,8 @@ \subsection{Instructions:}
\section{Examples:}
\begin{minted}[bgcolor=darcula-back,formatcom=\color{lightgrey},fontsize=\scriptsize]{python}
import numpy as np
y_hat = np.array(['norminet', 'dog', 'norminet', 'norminet', 'dog', 'bird'])
y_true = np.array(['dog', 'dog', 'norminet', 'norminet', 'dog', 'norminet'])
y_hat = np.array([['norminet'], ['dog'], ['norminet'], ['norminet'], ['dog'], ['bird']])
y_true = np.array([['dog'], ['dog'], ['norminet'], ['norminet'], ['dog'], ['norminet']])

# Example 1:
confusion_matrix_(y_true, y_hat, df_option=True)
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.0.4
v4.0.5

0 comments on commit 2ed32f5

Please sign in to comment.