Comments (1)
Hey, I didn't get the notification for this issue, sorry about that.
If you don't need it to be a Rips complex, you can try Alpha
, which should work OK in the 5d case. For higher dimensions, it might take forever to build the filtration, but things should be pretty quick once that's done.
Another option is EdgeCollapsedRips
, which may or might not work well. How long it takes to build depends a lot on the shape of the data. The situation there is similar - once the complex is built, things should be pretty fast, but it may take forever.
There is also a very cool algorithm for handling large data sets, but I haven't implemented it because I don't understand it. It can be found here. Maybe you can find a way to use it, it's a pretty old and unmaintained library.
On the downsampling: I have done something similar before. Below is a function that downsamples data such that each point's nearest neighbour is at least r
away. This works well if your sample is uneven or if you don't care about very small structures in your data.
using NearestNeighbors
using Distances
using StaticArrays
function downsample(points::Vector{<:Union{NTuple{D,T},SVector{D,T}}}, r) where {D,T}
points = shuffle(points)
points_matrix = reshape(reinterpret(T, points), (D,length(points))) # KDTree wants points in a matrix
keep = fill(true, length(points))
tree = KDTree(points_matrix, Euclidean()) # for other metrics, you may want to use a BallTree instead
for i in 1:length(points)
k = keep[i]
p = points[i]
if k
keep[inrange(tree, SVector(p), r, false)] .= false
keep[i] = true # i-th point was removed, so we have to add it back
end
end
return points[keep]
end
Hope this helps and let me know if you have any other questions!
from ripserer.jl.
Related Issues (15)
- TagBot trigger issue HOT 33
- reconstruct_cycles in more than 2-dimension? HOT 1
- Cubical PH on a torus HOT 2
- bad promote_rule HOT 1
- Option to supply SparseCSCMatrix of distances directly HOT 1
- Error when reconstructing cycles HOT 1
- Can Ripserer compute the discrete morse theory for a simplex, or compute the collapses? HOT 1
- On keeping track on merges? HOT 2
- On multithreading support? HOT 2
- slow computation for a custom filtration of depth 1 (simplicial complex) HOT 2
- incorrect implementation of prime field $\mathbb{Z}/p$ when p is large HOT 3
- Obtaining the simplicial complex for a given threshold HOT 1
- Codecov migration to marketplace app
- [JOSS] Add section to the README and DOCS about related efforts in Julia HOT 2
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 ripserer.jl.