Comments (2)
Hi,
I am using the Persim module to produce the persistent image based on the diagrams generated by RIPS (https://github.com/scikit-tda/ripser.py).
`rips = Rips(maxdim=0)
dgms = rips.fit_transform(data)
plot_diagrams(dgms, show=True)
pim = PersImage(pixels =[100,100],spread =1)
imgs = pim.transform(dgms)
plt.figure(figsize=(15,15))
pim.show(imgs)`
However, I get the following runtime warning:
`Rips(maxdim=0, thresh=inf, coeff=2, do_cocycles=False, n_perm = None, verbose=True)
I am done with rips
PersImage(pixels=[100, 100], spread=1, specs=None, kernel_type="gaussian", weighting_type="linear")
Traceback (most recent call last):
File "/Users/kianamac/Desktop/mahdi files/index.py", line 44, in
imgs = pim.transform(dgms)
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 104, in transform
imgs = [self._transform(dgm) for dgm in landscapes]
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 104, in
imgs = [self._transform(dgm) for dgm in landscapes]
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 119, in _transform
xs_lower = np.linspace(minBD, maxBD, self.nx)
File "<array_function internals>", line 5, in linspace
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/numpy/core/function_base.py", line 153, in linspace
y *= step
RuntimeWarning: invalid value encountered in multiply`
Would you please help me to understand what could be the source of the problem?
Thanks,
from persim.
Hi,
I am using the Persim module to produce the persistent image based on the diagrams generated by RIPS (https://github.com/scikit-tda/ripser.py).
`rips = Rips(maxdim=0)
dgms = rips.fit_transform(data)
plot_diagrams(dgms, show=True)
pim = PersImage(pixels =[100,100],spread =1)
imgs = pim.transform(dgms)
plt.figure(figsize=(15,15))
pim.show(imgs)`
However, I get the following runtime warning: `Rips(maxdim=0, thresh=inf, coeff=2, do_cocycles=False, n_perm = None, verbose=True) I am done with rips PersImage(pixels=[100, 100], spread=1, specs=None, kernel_type="gaussian", weighting_type="linear") Traceback (most recent call last):
File "/Users/kianamac/Desktop/mahdi files/index.py", line 44, in imgs = pim.transform(dgms)
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 104, in transform imgs = [self._transform(dgm) for dgm in landscapes]
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 104, in imgs = [self._transform(dgm) for dgm in landscapes]
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/persim/images.py", line 119, in _transform xs_lower = np.linspace(minBD, maxBD, self.nx)
File "<array_function internals>", line 5, in linspace
File "/Users/kianamac/Applications/anaconda3/lib/python3.8/site-packages/numpy/core/function_base.py", line 153, in linspace y *= step
RuntimeWarning: invalid value encountered in multiply`
Would you please help me to understand what could be the source of the problem?
Thanks,
@kalikhademi Not sure if it is still relevant, but I think the issue is that with Vietoris-Rips filtration, in dimension 0 all persistence pairs have birth=0, and thus there is not really a notion of 2D image there (as range of birth in birth-persistence diagram is [0, 0]).
from persim.
Related Issues (20)
- Default weighting function normalization
- 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
- Persistence Image for H0, H1, and H2 plus dropping inf values HOT 2
- `=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.