Comments (2)
I wanted since a long time to rework the classes used to represent functions, in order to make them more general and move them to a separate package. Thus, some of the design choices taken for scikit-fda will be revisited.
In particular, I agree that metadata attributes, such as sample_names
complicate a lot of things. On one hand, they are interesting for plotting and exploratory analysis. On the other hand, they work really bad with operations. For example, when taking the mean of a functional dataset, the sample_names
need to be removed. This is not a new problem. Other libraries, such as xarray
or scipp
that deal with arrays including labels or units need to do something about it too. We should check what they do.
As for the copy
method itself, I am unsure of the best way to deal with it. Right now it is more of an "utility" method, used for creating identical or almost identical copies of a FData
object, that is why by default it tries to preseve everything. However I agree that this is problematic, and can create subtle bugs if one forgets about that behavior. I would love to have your feedback on how to better implement it.
from scikit-fda.
Other libraries, such as xarray or scipp that deal with arrays including labels or units need to do something about it too. We should check what they do.
I personally don't know these packages at all, so I would not be able to give you any insight at the moment.
As for the copy method itself, I am unsure of the best way to deal with it. [...] I would love to have your feedback on how to better implement it.
I don't have any strong opinion, but my main observation would be that it is currently impossible to set any argument to attr=None
, because it is then treated as self.attr
. I think this should be fixed, while retaining default behaviour.
skeleton.copy(data_matrix=data_matrix) # Raises error if data_matrix has different number of samples
skeleton.copy(data_matrix=data_matrix, sample_names=None) # Actively deleting sample names
This way, no sample name is silently deleted, but if the user encounters this error, she/he can fix it more easily.
As for implementation detail, I don't know what the best practise would be. Creating a DEF
object to replace the default None
values?
def copy(self: T, *, data_matrix=DEF, grid_points=DEF, [...]) -> T
There might be more pythonic ways I don't know of.
from scikit-fda.
Related Issues (20)
- ddof parameter in FData.cov HOT 7
- Example of `scipy.interpolate.BSpline.design_matrix` equivalent with`skfda.representation.basis.BSplineBasis` HOT 3
- Inaccurate SRSF Computation
- New `FDataGrid.restrict` option `include_bounds`? HOT 2
- `FDataGrid.__call__` any (compatible) shape? HOT 6
- `domain_range` as a 2D NumPy array? HOT 3
- Time x Space tutorial with basis representation and FPCA ? HOT 2
- Errors in test_pandas_*.py setups with pandas==2.1.0 HOT 1
- Confused from examples regarding which regression to use HOT 3
- BSplineBasis initialization incorrect error message
- Change ddof argument to correction in var and cov
- Review and refactor hat matrix code
- AttributeError: SmoothingParameterSearch object has no attribute param_name HOT 7
- Default correction=0 for cov, var
- Add infrastructure for performance/benchmark tests
- Shifting domain
- Expose the complete API of `AgglomerativeClustering`
- How to deal with unequally spaced data points? HOT 1
- `hat_matrix_` not available for BasisSmoother
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-fda.