Skip to content

Error converting shapes due to mismatched size of X and s2 #53

@noraharhen

Description

@noraharhen

I'm getting this crazy error occasionally while running pybads with specify_target_noise=true. It looks like somehow s2 ends up with more elements than rows of X. Any idea what could be going on here?

Unfortunately, I cant create a reprex—it only happens occasionally with my own model fitting code...

Traceback (most recent call last):
  File "/dfs6/pub/nharhen/foraging/model_fitting/experiment1k_kids/cross_val/bads.py", line 39, in <module>
    result = bads.optimize()
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/pybads/bads/bads.py", line 1239, in optimize
    ) = self._search_step_(gp)
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/pybads/bads/bads.py", line 1554, in _search_step_
    gp, gp_exit_flag = local_gp_fitting(
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/pybads/bads/gaussian_process_train.py", line 402, in local_gp_fitting
    gp, hyp_gp, res, exit_flag = _robust_gp_fit_(
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/pybads/bads/gaussian_process_train.py", line 542, in _robust_gp_fit_
    new_hyp, _, res = tmp_gp.fit(
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/gpyreg/gaussian_process.py", line 1008, in fit
    X, y, s2 = self._convert_shapes(X, y, s2)
  File "/data/homezvol3/nharhen/.local/lib/python3.9/site-packages/gpyreg/gaussian_process.py", line 2555, in _convert_shapes
    s2 = s2.reshape(N, 1)
ValueError: cannot reshape array of size 55 into shape (51,1)

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