Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derivative issue #6

Open
im-Kitsch opened this issue Mar 5, 2023 · 0 comments
Open

Derivative issue #6

im-Kitsch opened this issue Mar 5, 2023 · 0 comments

Comments

@im-Kitsch
Copy link

Hi,

thanks for the greate work. I checked your code, for function BayesianInteractionPrimitive. basis_inverse_transform, if we require derivate and scaling the observation, the derivate should not be unscaled as same as observation. Observation is: obsscale+mu, while derivative only need obsscale. I guess this is a bug. Is it right?

Thanks

def basis_inverse_transform(self, x, weights, deriv = False):
trajectory = np.zeros((self.basis_model.num_observed_dof, x.shape[0]), dtype = intprim.constants.DTYPE)
for idx in range(x.shape[0]):
trajectory[:, idx] = self.basis_model.apply_coefficients(x[idx], weights, deriv)
if(self.scaling_groups is not None):
for group, scaler in zip(self.scaling_groups, self.scalers):
trajectory[group, :] = scaler.inverse_transform(trajectory[group, :].reshape(-1, 1)).reshape(trajectory[group, :].shape)
return trajectory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant