Giter Site home page Giter Site logo

galperhom's Introduction

Galaxy classification with the use of persistent homologies

Installation

We use Python3, OpenCV, matplotlib and or-tools:

pip3 install -r requirements.txt

Usage

  1. Create a directory kaggle/ in the project directory and place unzipped files from Kaggle inside it: images_training_rev1/ and training_solutions_rev1.csv. Download them from https://www.kaggle.com/c/galaxy-zoo-the-galaxy-challenge/data

  2. Choose some number of galaxies to classify. We will classify them as smooth vs. having features/disk, we discard the third Galaxy Zoo main class, ie. star/artifact.:

    python3 src/choose_galaxies.py
    
  3. Use the generated file with chosen galaxies' ids to copy them into the train directory:

    python3 src/prepare_images.py
    
  4. Then generate the persistence diagram. You may use the radial, brightness or level filtration, but the first one is most efficient. This may take some time:

    src/make_diagrams.sh radial
    
  5. Now you can check how well a kNN classification using the generated diagrams performs:

    python3 src/test_classify.py
    
  6. All Python scripts listed above have adjustable parameters, which are not discussed here. One may learn about them calling the scripts with an -h flag.

  7. Our result for the best parameters set can be found in results.txt. These parameters are set as default in the scripts.

galperhom's People

Contributors

donvel avatar

Watchers

 avatar  avatar

Forkers

wesmania

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.