Skip to content

Derivative issue #6

@im-Kitsch

Description

@im-Kitsch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions