Skip to content

Commit

Permalink
improve copod plot
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 committed Jul 4, 2021
1 parent 4b2ab15 commit eb3a920
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ v<0.8.9>, <06/10/2021> -- Add PyTorch AutoEncoder
v<0.8.9>, <06/11/2021> -- Fix LMDD parameter (#307)
v<0.9.0>, <06/20/2021> -- Add clone test for models.
v<0.9.0>, <07/03/2021> -- ROD hot fix (#316).
v<0.9.0>, <07/04/2021> -- Improve COPOD plot with colunms parameter.



Expand Down
8 changes: 6 additions & 2 deletions pyod/models/copod.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def explain_outlier(self, ind, columns=None, cutoffs=None,
ind : int
The index of the data point one wishes to obtain
a dimensional outlier graph for.
columns : list
Specify a list of features/dimensions for plotting.
cutoffs : list of floats in (0., 1), optional (default=[0.95, 0.99])
The significance cutoff bands of the dimensional outlier graph.
Expand Down Expand Up @@ -272,6 +275,7 @@ def explain_outlier(self, ind, columns=None, cutoffs=None,
index=ind + 1, label=label))
plt.legend()
plt.show()
return self.O.loc[ind, columns], self.O.loc[:, columns].quantile(q=cutoffs[0],
axis=0), self.O.loc[:, columns].quantile(
return self.O.loc[ind, columns], self.O.loc[:, columns].quantile(
q=cutoffs[0],
axis=0), self.O.loc[:, columns].quantile(
q=cutoffs[1], axis=0)

0 comments on commit eb3a920

Please sign in to comment.