def fgrad_X(self, X):
grad = np.zeros(X.shape)<EOL>for i_seq, i_fea in enumerate(self.warping_indices):<EOL><INDENT>a, b = self.params[i_seq][<NUM_LIT:0>], self.params[i_seq][<NUM_LIT:1>]<EOL>grad[:, i_fea] = a * b * np.power(self.X_normalized[:, i_fea], a-<NUM_LIT:1>) *np.power(<NUM_LIT:1> - np.power(self.X_normalized[:, i_fea], a), b-<NUM_LIT:1>) * self.scaling[i_fea]<EOL><DEDENT>return grad<EOL>
Compute the gradient of warping function with respect to X

        Parameters
        ----------
        X : array_like, shape = (n_samples, n_features)
            The location to compute gradient

        Returns
        -------
        grad : array_like, shape = (n_samples, n_features)
            The gradient for every location at X

        Math
        ----
        grad = a * b * x ^(a-1) * (1 - x^a)^(b-1)