Anomaly detection using LoOP: Local Outlier Probabilities, a local density based outlier detection method providing an outlier score in the range of [0,1].
Using data = pd.DataFrame(np.random.rand(100, 5)) as the input to LocalOutlierProbability works as expected, however, passing the raw ndarray np.random.rand(100, 5) throws an error:
self.points_vector = self.data.reshape(self.data.shape[1:]) ValueError: cannot reshape array of size 500 into shape (5,)
Using
data = pd.DataFrame(np.random.rand(100, 5))
as the input toLocalOutlierProbability
works as expected, however, passing the raw ndarraynp.random.rand(100, 5)
throws an error:self.points_vector = self.data.reshape(self.data.shape[1:]) ValueError: cannot reshape array of size 500 into shape (5,)