You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
there is some incongruences in uf_designmat concerning circular splines. At the moment it only works with formulas with lower and upper bounds, like 'circspl(angle,5,0,360)', and not with 'circspl(angle,5)'. This seems to be by design given the error message in uf_designmat, line 228, but with ''circspl(angle,5)' it never gets there because it does not run the for loop starting at line 226 ("check the circular splines"). This is because the parsing of 'circspl(angle,5)' with circsplRegexp gives an empty cell.
uf_designmat_spline seem to be able to deal with circular splines with no bound defined, taking them from the data.
This is not a problem if the cyclical spline is defined with bounds (btw, that is not how is described in the manuscript draft and it is also not described yet in the tutorials).
And I have two questions:
Could you explain a bit how the bound for circular spline work and how they should be defined?
Also, how should be the values to use for a circular spline predictor (eg,. angles, radians, unwrapped or wrapped, etc)
thks!
The text was updated successfully, but these errors were encountered:
Hi! Yes, you have to specify the bounds. Else the function uses the maximum / minimum it finds in the data.
I will add an excemption if bounds are not specified. I think its a lot safer if you specify the bounds manually.
We will fix it in the manual + tutorials.
The bounds are simply the values which connect the circular spline. I.e. if your predictor runs from 0 °to 360° it should be [0,360].
If its from -pi to pi, [-pi,pi].
The reason for bounds is, that you might not have a "360" in your predictor, but a max of lets say 320°. Then 320° and 0° would predict the same value, even though that is not very logical.
I think I added automatic wrapping of predictorvalues - definitely something I need to check. Either implement that (its easy) or throw an exception if out-of-bound values are found.
Hi,
there is some incongruences in uf_designmat concerning circular splines. At the moment it only works with formulas with lower and upper bounds, like 'circspl(angle,5,0,360)', and not with 'circspl(angle,5)'. This seems to be by design given the error message in uf_designmat, line 228, but with ''circspl(angle,5)' it never gets there because it does not run the for loop starting at line 226 ("check the circular splines"). This is because the parsing of 'circspl(angle,5)' with circsplRegexp gives an empty cell.
uf_designmat_spline seem to be able to deal with circular splines with no bound defined, taking them from the data.
This is not a problem if the cyclical spline is defined with bounds (btw, that is not how is described in the manuscript draft and it is also not described yet in the tutorials).
And I have two questions:
Could you explain a bit how the bound for circular spline work and how they should be defined?
Also, how should be the values to use for a circular spline predictor (eg,. angles, radians, unwrapped or wrapped, etc)
thks!
The text was updated successfully, but these errors were encountered: