Giter Site home page Giter Site logo

scikit-tda / tadasets Goto Github PK

View Code? Open in Web Editor NEW
34.0 4.0 7.0 6.25 MB

Synthetic data sets apt for Topological Data Analysis

Home Page: http://tadasets.scikit-tda.org

License: MIT License

Python 97.70% Makefile 2.30%
dataset topology topological-data-analysis tda

tadasets's Introduction

DOI PyPI - Version PyPI - Downloads

Scikit-TDA is a home for Topological Data Analysis Python libraries intended for non-topologists.

This project aims to provide a curated library of TDA Python tools that are widely usable and easily approachable. It is structured so that each package can stand alone or be used as part of the scikit-tda bundle.

Documentation

For complete documentation please checkout docs.scikit-tda.org.

Contact

If you would like to contribute, please reach out to us on github by starting a discussion topic, creating an issue, or reaching out on twitter.

Setup

To install all these libraries

    pip install scikit-tda

Citations

If you would like to cite Scikit-TDA, please use the following citation/bibtex

Saul, Nathaniel and Tralie, Chris. (2019). Scikit-TDA: Topological Data Analysis for Python. Zenodo. http://doi.org/10.5281/zenodo.2533369

@misc{scikittda2019,
  author       = {Nathaniel Saul, Chris Tralie},
  title        = {Scikit-TDA: Topological Data Analysis for Python},
  year         = 2019,
  doi          = {10.5281/zenodo.2533369},
  url          = {https://doi.org/10.5281/zenodo.2533369}
}

License

This package is licensed with the MIT license.

Contributing

Contributions are more than welcome! There are lots of opportunities for potential projects, so please get in touch if you would like to help out. Everything from code to notebooks to examples and documentation are all equally valuable so please don't feel you can't contribute. To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.

tadasets's People

Contributors

alperenkaran avatar catanzaromj avatar ctralie avatar dependabot[bot] avatar filco306 avatar sauln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tadasets's Issues

Some ideas for point clouds

Some time ago, before I had discovered scikit-tda, I created the following functions to generate some datasets. Feel free to use and improve if you wish. Regards.

def figure_eight_pts(N, a=1):
    theta_list = 2 * np.pi * np.random.sample(N)
    pts = np.zeros((N,2))
    print theta_list
    for i in range(len(theta_list)):
        pts[i,0] = a * np.cos(theta_list[i]) * np.sqrt(2*np.cos(2*theta_list[i]))
        pts[i,1] = a * np.sin(theta_list[i]) * np.sqrt(2*np.cos(2*theta_list[i]))
    return pts

def annulus_pts(N, R=2, r=1):
    theta_list = np.random.random_sample(N)
    radius_list = r + np.random.random_sample(N) * (R-r)
    pts = np.zeros((N,2))
    for i in range(len(theta_list)):
        pts[i,0] = radius_list[i] * np.cos(2*np.pi*theta_list[i])
        pts[i,1] = radius_list[i] * np.sin(2*np.pi*theta_list[i])
    return pts

def cube_pts(N):
    npts = N/6
    faces = {}
    for i in range(3):
        data0 = np.random.random((npts,3))
        data1 = np.random.random((npts,3))
        data0[:,i] = 0
        data1[:,i] = 1
        faces[i]   = data0
        faces[i+3] = data1
    cube = np.concatenate([faces[i] for i in range(6)])
    return cube

Extract a base class for shapes to handle similar features

There should be some sort of base class or decorator that handles the noise and ambient options for each shape. These options are the same for all shapes.

One method would be a base class and then expose the shape names as the __call__ function so they appear to be functions:

class Shape:
    def __call__(self, <params>):
        shape = self.build(<params>)
        <apply noise>
        <apply ambient>
        return shape

class Sphere(Shape):
    def build(self, <params>):
         <sphere building code>

sphere = Sphere().__call__

Or decorator:

def shape(shape_builder):
    def wrapper(<params>):
        s = shape_builder(<params>)
        <apply noise>
        <apply ambient>
        return s

    return wrapper


@shape
def sphere(<params>):
    <sphere building code>
  • Decorators looks easier to understand what's going on.
  • Will either of these mess with the introspection abilities? What docstrings show up? How can we get proper docstrings?

Conda-forge

Just wondering if there's any intention to submit this package (or all of scikit-tda) into the conda-forge channel on Anaconda. It'd likely help newcomers avoid the headaches from dependency issues

Sampling from a triangulation

Many people have triangulations of their favorite objects. It could be nice to have a method of taking a triangulation and sampling points on the surface with various levels of noise and density.

Add Swiss cheese

Allow options for spotty 2-manifolds, like Swiss cheese.

This Swiss cheese could then be used as a base for constructing all of the 2-manifolds; the spheres, swiss rolls, etc.

We could also extend this to higher dimensions, I.e. dense 3-d point cloud with random balls excluded.

Add random seed

Let a user pass in a random seed to all of the constructors.

Add high-dimensional manifolds

Hello!

First of all, thank you for a very nice python package! I think high-dimensional manifolds, that is, manifolds beyond 2 and 3 dimensions would be very interesting to add. d-dimensional spheres have already been added, but if somebody knows how generate other types of manifolds of higher dimensions, I would be happy to cooperate and contribute to create this for this package :)

Cheers,
Filip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.