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
The Vector class allows us to compose a multi-component gridder from scalar gridders (like gridding a 3D vector with 3 Spline instances). We can also use this to make a multi-component Trend and use it in a Chain. But sometimes we want to fit trends to some components and not others but still have a muilt-component Chain. Currently, there is no way of doing this. A way around would be to have a DummyGridder class that implements the gridder API but does nothing with the data. It's fit method should do nothing, predict should return an array of zeros, and filter should just return whatever inputs it got. Then we can do this:
components= (data.east, data.north, data.up)
# Only use a Trend for the East and North componentsspline=vd.Chain([
("trend", vd.Vector([vd.Trend(degree=1), vd.Trend(degree=1), vd.DummyGridder()])),
("spline", vd.Vector([vd.Spline() foriinrange(3)])),
])
spline.fit(coordinates, components)
The text was updated successfully, but these errors were encountered:
leouieda
changed the title
Have a DummyGridder for use with Vector
Create a DummyGridder for use with Vector
Dec 4, 2018
Description of the desired feature
The
Vector
class allows us to compose a multi-component gridder from scalar gridders (like gridding a 3D vector with 3Spline
instances). We can also use this to make a multi-componentTrend
and use it in aChain
. But sometimes we want to fit trends to some components and not others but still have a muilt-componentChain
. Currently, there is no way of doing this. A way around would be to have aDummyGridder
class that implements the gridder API but does nothing with the data. It'sfit
method should do nothing,predict
should return an array of zeros, andfilter
should just return whatever inputs it got. Then we can do this:The text was updated successfully, but these errors were encountered: