def transform(self, X):
X = as_features(X)<EOL>return np.vstack([np.mean(bag, axis=<NUM_LIT:0>) for bag in X])<EOL>
Transform a list of bag features into a matrix of its mean features.

Parameters
----------
X : :class:`skl_groups.features.Features` or list of bag feature arrays
    Data to transform.

Returns
-------
X_new : array, shape ``[len(X), X.dim]``
    X transformed into its means.