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
I love the idea of this package! One thing that I think might be necessary as the number of resampling methods in the package grows is to start to create a more object-oriented framework for the bootstrap, jackknife, etc.
For example, there could be an abstract base class called "Statistic" or "ResampledStatistic", that would represent the base of any of the resampling methods that might be added to this package. Then, there could be Bootstrap, Jackknife, etc... objects that inherit from this class.
Benefits of this approach include --
A unified interface for data inputs and functions.
A Statistic base class could include methods for dealing with pandas dataframes, ndarrays, matricies, and other special cases which would be inherited by any class that is a sub-class to it, e.g. Bootstrap, Jackknife.
A series of specialized functions would be replaced with method calls on an object.
For example, let's say there is a matrix that would you like to sample the rows. Currently, the syntax is
bootstrap_matrixsample(data, axis=0).
But creating a Bootstrap object would lead to something like this.
bstrp = Bootstrap(data)
bstrp.sample(axis=0)
Which would return a sample of the rows in the matrix. If the Statistic base class had code to determine that the data is a matrix, then the user would not have to worry about specifying the correct function for their problem. They would know that the bstrp.sample() functionality works regardless. This functionality is what makes pandas so powerful.
I know there differences seem trivial, but as the code base grows, this sort of framework will really pay dividends, at least in saving your wrists.
I'd be happy to create a new branch and play around with this idea.
The text was updated successfully, but these errors were encountered:
I think this is a great idea. If you look back at earlier commits, I originally started with this idea, but since the library was so small, I removed it. I think we need to get back to it though. I would be interested to see how you structure it.
Hi there,
I love the idea of this package! One thing that I think might be necessary as the number of resampling methods in the package grows is to start to create a more object-oriented framework for the bootstrap, jackknife, etc.
For example, there could be an abstract base class called "Statistic" or "ResampledStatistic", that would represent the base of any of the resampling methods that might be added to this package. Then, there could be Bootstrap, Jackknife, etc... objects that inherit from this class.
Benefits of this approach include --
For example, let's say there is a matrix that would you like to sample the rows. Currently, the syntax is
bootstrap_matrixsample(data, axis=0).
But creating a Bootstrap object would lead to something like this.
bstrp = Bootstrap(data)
bstrp.sample(axis=0)
Which would return a sample of the rows in the matrix. If the Statistic base class had code to determine that the data is a matrix, then the user would not have to worry about specifying the correct function for their problem. They would know that the bstrp.sample() functionality works regardless. This functionality is what makes pandas so powerful.
I know there differences seem trivial, but as the code base grows, this sort of framework will really pay dividends, at least in saving your wrists.
I'd be happy to create a new branch and play around with this idea.
The text was updated successfully, but these errors were encountered: