diff --git a/CHANGES.txt b/CHANGES.txt index 66570409c..ae96037d1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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. diff --git a/pyod/models/copod.py b/pyod/models/copod.py index feaef421b..eabf86e11 100644 --- a/pyod/models/copod.py +++ b/pyod/models/copod.py @@ -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. @@ -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)