'Outlyingness of observations in X according to the fitted model.
Parameters
X : array-like, shape = (n_samples, n_features)
Returns
is_outliers : array, shape = (n_samples, ), dtype = bool
For each observation, tells whether or not it should be considered
as an outlier according to the fitted model.
threshold : float,
The values of the less outlying point\'s decision function.'

def predict(self, X):

    check_is_fitted(self, 'threshold_')
    X = check_array(X)
    is_inlier = (- np.ones(X.shape[0], dtype=int))
    if (self.contamination is not None):
        values = self.decision_function(X, raw_values=True)
        is_inlier[(values <= self.threshold_)] = 1
    else:
        raise NotImplementedError('You    must    provide    a    contamination    rate.')
    return is_inlier
