spateo-release icon indicating copy to clipboard operation
spateo-release copied to clipboard

missing dict in morphofield_gp

Open Secretloong opened this issue 5 months ago • 1 comments

when run morphofield_gp, I found there is no norm_dict and kernel_dict in morpho_class.py

File ~/miniconda3/envs/spateo/lib/python3.9/site-packages/spateo/tdr/morphometrics/morphofield/gaussian_process.py:102, in _gp_velocity(X, vf_dict)
    100 def _gp_velocity(X: np.ndarray, vf_dict: dict) -> np.ndarray:
    101     # pre_scale = vf_dict["pre_norm_scale"]
--> 102     norm_x = (X - vf_dict["norm_dict"]["mean_transformed"]) / vf_dict["norm_dict"]["scale_transformed"]
    103     if vf_dict["kernel_dict"]["dist"] == "cdist":
    104         quary_kernel = _con_K(norm_x, vf_dict["inducing_variables"], vf_dict["beta"])

KeyError: 'norm_dict'
File ~/miniconda3/envs/spateo_updated/lib/python3.9/site-packages/spateo/tdr/morphometrics/morphofield/gaussian_process.py:103, in _gp_velocity(X, vf_dict)
    100 def _gp_velocity(X: np.ndarray, vf_dict: dict) -> np.ndarray:
    101     # pre_scale = vf_dict["pre_norm_scale"]
    102     norm_x = (X - vf_dict["norm_dict"]["mean_transformed"]) / vf_dict["norm_dict"]["scale_transformed"]
--> 103     if vf_dict["kernel_dict"]["dist"] == "cdist":
    104         quary_kernel = _con_K(norm_x, vf_dict["inducing_variables"], vf_dict["beta"])
    105     elif vf_dict["kernel_dict"]["dist"] == "geodist":

KeyError: 'kernel_dict'

Secretloong avatar Sep 12 '24 08:09 Secretloong