<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict(self, X):
 """ Assign classes to test data. Parameters X : array Test data, of dimension N times d (rows are examples, columns are data dimensions) Returns ------- y_predicted : array A vector of length N containing assigned classes. If no inlier classes were specified during training, then 0 denotes an inlier and 1 denotes an outlier. If multiple inlier classes were specified, then each element of y_predicted is either on of those inlier classes, or an outlier class (denoted by the maximum inlier class ID plus 1). """

        predictions_proba = self.predict_proba(X)
        predictions = []
        allclasses = copy.copy(self.classes)
        allclasses.append('anomaly')
        for i in range(X.shape[0]):
            predictions.append(allclasses[predictions_proba[i, :].argmax()])
        return predictions