Comments (2)
Hi @tydymy
- I don't think there is any way to drop features that extend to infinity automatically using
PersistenceImager
(but I could be mistaken). You could do something like the following before passing your diagrams into the transformer:
diagrams_h1_finite = diagrams_h1[~np.any(diagrams_h1 == np.inf, axis=1)]
where diagrams_h1
is a numpy array of your diagrams for a fixed homological degree. If you had ripser output, you'd have to slice it first, as in diagrams_h1 = ripser_output[1]
or diagrams_h0 = ripser_output[0]
.
- Typically, persistence images are used for a fixed homological degree. But there is nothing in the code that verifies this--the
fit
method takes an iterable of numpy arrays. So you can feed in persistence diagrams from any homological degree, not just degree 1. In particular, you could concatenate your persistence diagrams from different homological degrees into a single list and compute the persistence image of that (but I'm not sure why you would).
from persim.
If you have more questions about this, feel free to open another issue.
from persim.
Related Issues (20)
- Default weighting function normalization
- prism Persistent Image issue HOT 2
- Bottleneck distance between repeated intervals = 0 HOT 2
- Sliced Wasserstein distance vs Wasserstein distance HOT 1
- Plotting landscapes
- Gaussian mean parameters in PersistenceImager HOT 1
- Persistence weight function and negative values in persistence image HOT 1
- persistent landscape HOT 2
- PersistenceImager error HOT 3
- Sorry, but I really to know what function this line of code do HOT 1
- Persistence Landscape HOT 1
- `=perism-0.1.3` multiple tests fail with `AttributeError: module 'collections' has no attribute 'Iterable'` HOT 2
- `=perism-0.2.0` multiple tests fail HOT 1
- `=persim-0.3.0` 13 tests fail (`AttributeError` and `ValueError`) HOT 2
- Test failure with Python 3.10 HOT 1
- Bug Report: `persim.bottleneck` returns 0 for distinct diagrams HOT 2
- How to calculate the distance between two landscapes? HOT 2
- bring CI pipeline up to Python 3.12 HOT 1
- Persistence Landscapes and Machine Learning notebook issue HOT 1
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 persim.