verde
verde copied to clipboard
Deprecate BaseGridder.scatter
Description of the desired feature
The BaseGridder.scatter
enables every Verde gridder class to predict values on a random set of scattered points making use of the verde.scatter_points()
function. This method doesn't have too many use cases, and even if we want to predict on a set of scattered points, we can do so by combining verde.scatter_points()
and the BaseGridder.predict
method, while building the resulting pandas.DataFrame
can be done manually without too much effort.
Taking this into account, I think it would be better to deprecate it, so we can make maintenance, testing and inheritance much easier. For ensuring backward compatibility, we should deprecate it after Verde v2.0.0 and add a DeprecationWarning meanwhile.
Are you willing to help implement and maintain this feature? Yes, but I would leave it to anyone interested in tackling this down.
Revisiting this and the place where this really gets used is vd.datasets.CheckerBoard
to generate synthetic data. We could move the method to this class instead of keeping in the base but the work on maintaining it is the same either way.
I do think that for Verde gridders, the scatter
method is a cool addition and its maintenance it's not a big deal. I think my main motivation for this Issue was what happens with gridders like the harmonica.EquivalentSources
: on those cases the scatter
method has to be overwritten due to a missing upward
argument. Because there's no special need for the EquivalentSources
to have a scatter
method, we just raise a NotImplementedError
, although it still shows up on their docstrings.
Maybe this issue should be solved directly in Harmonica rather than trying to upstream its issues to Verde. I'll bring some ideas to the next meeting.
How about moving the implementation to the CheckerBoard
class then? It's really only useful there and it's quite handy to easily get a DataFrame from that class.
A FutureWarning
should be added before v1.7.0 #341