An interactive dashboard for visualisation, integration and classification of data using Active Learning.

Overview

Build Status codecov Documentation Status

DOI

AstronomicAL

An interactive dashboard for visualisation, integration and classification of data using Active Learning.

AstronomicAL is a human-in-the-loop interactive labelling and training dashboard that allows users to create reliable datasets and robust classifiers using active learning. The system enables users to visualise and integrate data from different sources and deal with incorrect or missing labels and imbalanced class sizes by using active learning to help the user focus on correcting the labels of a few key examples. Combining the use of the Panel, Bokeh, modAL and SciKit Learn packages, AstronomicAL enables researchers to take full advantage of the benefits of active learning: high accuracy models using just a fraction of the total data, without the requirement of being well versed in underlying libraries.

Load Configuration

Statement of Need

Active learning (Settles, 2012) removes the requirement for large amounts of labelled training data whilst still producing high accuracy models. This is extremely important as with ever-growing datasets; it is becoming impossible to manually inspect and verify ground truth used to train machine learning systems. The reliability of the training data limits the performance of any supervised learning model, so consistent classifications become more problematic as data sizes increase. The problem is exacerbated when a dataset does not contain any labelled data, preventing supervised learning techniques entirely. AstronomicAL has been developed to tackle these issues head-on and provide a solution for any large scientific dataset.

It is common for active learning to query areas of high uncertainty; these are often in the boundaries between classes where the expert's knowledge is required. To facilitate this human-in-the-loop process, AstronomicAL provides users with the functionality to fully explore each data point chosen. This allows them to inject their domain expertise directly into the training process, ensuring that asigned labels are both accurate and reliable.

AstronomicAL has been extensively validated on astronomy datasets. These are highly representative of the issues that we anticipate will be found in other domains for which the tool is designed to be easily customisable. Such issues include the volume of data (millions of sources per survey), vastly imbalanced classes and ambiguous class definitions leading to inconsistent labelling. AstronomicAL has been developed to be sufficiently general for any tabular data and can be customised for any domain. For example, we provide the functionality for data fusion of catalogued data and online cutout services for astronomical datasets.

Using its modular and extensible design, researchers can quickly adapt AstronomicAL for their research to allow for domain-specific plots, novel query strategies, and improved models. Furthermore, there is no requirement to be well-versed in the underlying libraries that the software uses. This is due to large parts of the complexity being abstracted whilst allowing more experienced users to access full customisability.

As the software runs entirely locally on the user's system, AstronomicAL provides a private space to experiment whilst providing a public mechanism to share results. By sharing only the configuration file, users remain in charge of distributing their potentially sensitive data, enabling collaboration whilst respecting privacy.

Documentation

The documentation for AstronomicAL can be found here.

Installation

To install AstronomicAL and its dependencies, the user can clone the repository and from within the repo folder run pip install -r requirements.txt. . It is recommended that the user creates a virtual environment using tools such as Virtualenv or Conda, to prevent any conflicting package versions.

    git clone https://github.com/grant-m-s/AstronomicAL.git
    cd AstronomicAL
    conda config --add channels conda-forge
    conda create --name astronomical --file requirements.txt
    conda activate astronomical

Quickstart Instructions

To begin using the software, run bokeh serve astronomicAL --show and your browser should automatically open to localhost:5006/astronomicAL

AstronomicAL provides both an example dataset and an example configuration file to allow you to jump right into the software and give it a test run.

Load Configuration

To begin training you simply have to select Load Custom Configuration checkbox and select your config file. Here we have chosen to use the example_config.json file.

The Load Config Select option allows use to choose the extent to which to reload the configuration.

Contributing to AstronomicAL

Reporting Bugs

If you encounter a bug, you can directly report it in the issues section.

Please describe how to reproduce the bug and include as much information as possible that can be helpful for fixing it.

Are you able to fix a bug?

You can open a new pull request or include your suggested fix in the issue.

Submission of extensions

Have you created an extension that you want to share with the community?

Create a pull request describing your extension and how it can improve research for others.

Support and Feedback

We would love to hear your thoughts on AstronomicAL.

Are there any features that would improve the effectiveness and usability of AstronomicAL? Let us know!

Any feedback can be submitted as an issue.

Referencing the Package

Please remember to cite our software and user guide whenever relevant.

See the Citing page in the documentation for instructions about referencing and citing the astronomicAL software.

Comments
  • Parameter errors when attempting to set up a training set

    Parameter errors when attempting to set up a training set

    Hi there,

    I have been attempting create a training set of color magnitude diagrams with astronomicAL and after a few iterations of importing data as both .csv and .fits files I keep running into the following errors and was wondering if these are specifically related to how I am using astronomicAL. I have created a column with integer labels 0-5 corresponding to galaxy shapes and have been using these as my Label and ID columns respectively. Any assistance or guidance would be appreciated and thank you for your help!

    Best, Max

    Error when launching astronomicAL (due to renamed class in newer versions of pandas?) pandas could not register all extension types imports failed with the following error: cannot import name 'ABCIndexClass' from 'pandas.core.dtypes.generic

    Errors when I attempt to view a basic plot after setting my parameters raise ValueError("%s not in parameter%s's list of possible objects, " ValueError: absMag_u_tot-absMag_g_tot not in parameter Y_variable's list of possible objects, valid options include [id, ebv, r_aper, absMag_u_tot, err_u, absMag_g_tot, err_g, absMag_r_tot, err_r, absMag_i_tot, err_i, absMag_z_tot, err_z, isTyphon, col1_1, col2_1, col3_1, col4_1, Official_name, Old_name, VCC_name, VCC_membership, VCC_Bmag, TH_name, sep_2, ...]

    /Users/mkurzner/opt/anaconda3/lib/python3.9/site-packages/bokeh/server/protocol_handler.py:94: RuntimeWarning: coroutine 'WSHandler.send_message' was never awaited work = connection.error(message, repr(e))

    opened by mkurzner 9
  • [JOSS Review] Tests

    [JOSS Review] Tests

    This issue is part of the JOSS review going on in openjournals/joss-reviews#3635.

    The tests/ directory contains 122 tests, but lacks organization. Suggested changes are:

    1. Split the test file into several individual files such that each sub-module has its own test file with just a few tests. This change is optional since JOSS doesn't require a specific structure to the test suite, but it may help users.
    2. When I ran the tests, 32 failed. I suggest looking into the failures or skipping them at runtime with a provided reason. The test summary from my run is attached below. To verify that all the functionalities of the software are working properly, I would like to get to the bottom of why the tests don't pass.
    FAILED all_test.py::TestSettings::test_data_selection_check_config_load_level_no_load_config - FileNotFoundError: [Errno 2]...
    FAILED all_test.py::TestDashboards::test_dashboard_closing_button_check_contents[Settings] - ValueError: PNG pane cannot pa...
    FAILED all_test.py::TestDashboards::test_selected_source_init_selected - _pickle.PicklingError: Can't pickle <function Colu...
    FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_none_to_selected - _pickle.PicklingError: Can't...
    FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_unique - _pickle.PicklingE...
    FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_head - _pickle.Pic...
    FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_no_id - _pickle.PicklingEr...
    FAILED all_test.py::TestDashboards::test_selected_source_check_history_from_selected_to_selected_same_id_throughout - _pick...
    FAILED all_test.py::TestDashboards::test_selected_source_empty_selected_from_selected - _pickle.PicklingError: Can't pickle...
    FAILED all_test.py::TestDashboards::test_selected_source_check_valid_select_from_selected_is_valid - _pickle.PicklingError:...
    FAILED all_test.py::TestDashboards::test_selected_source_search_valid_id - _pickle.PicklingError: Can't pickle <function Co...
    FAILED all_test.py::TestDashboards::test_selected_source_search_deselect - _pickle.PicklingError: Can't pickle <function Co...
    FAILED all_test.py::TestDashboards::test_selected_source_update_default_images - _pickle.PicklingError: Can't pickle <funct...
    FAILED all_test.py::TestDashboards::test_selected_source_update_custom_images - _pickle.PicklingError: Can't pickle <functi...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_init - ValueError: PNG pane cannot parse string that is not a f...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_close_settings - ValueError: PNG pane cannot parse string that ...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_pipeline_previous - ValueError: PNG pane cannot parse string th...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_pipeline_next - ValueError: PNG pane cannot parse string that i...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_close_button_check_disabled - ValueError: PNG pane cannot parse...
    FAILED all_test.py::TestDashboards::test_settings_dashboard_get_settings - ValueError: PNG pane cannot parse string that is...
    FAILED all_test.py::TestDashboards::test_AL_dashboard_labels_to_train_single - ValueError: No plotting extension is current...
    FAILED all_test.py::TestDashboards::test_AL_dashboard_labels_to_train_multiple - ValueError: No plotting extension is curre...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_init - ValueError: No plotting extension is currently loaded. ...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_single_matching_value_in_region - ValueError: No plottin...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_multiple_matching_values_in_region - ValueError: No plot...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_combined_matching_values_in_region - ValueError: No plot...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_removing_sample_criteria - ValueError: No plotting extension i...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_looping_through_labelled - ValueError: No plotting exten...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_new_button_with_single_match - ValueError: No plotting e...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_check_zero_matching - ValueError: No plotting extension is cur...
    FAILED all_test.py::TestDashboards::test_labelling_dashboard_save_assigned_label - ValueError: No plotting extension is cur...
    FAILED all_test.py::TestUtils::test_save_config_save_config_file - ValueError: PNG pane cannot parse string that is not a f...
    ======================================== 32 failed, 90 passed, 19 warnings in 16.04s =========================================
    
    opened by rmorgan10 9
  • [JOSS Review] Installation

    [JOSS Review] Installation

    This issue is part of the JOSS review going on in https://github.com/openjournals/joss-reviews/issues/3635.

    At present, the installation instructions are inaccurate. After cloning, users need to enter the command cd astronomicAL such that the environment creation command can access the requirements.txt file. Adding this command to the instructions will be sufficient to satisfy the JOSS installation specifications.

    That being said, I think the better way to go about installation would be to make your package available on PyPI. The motivation here is to enable users to be able to use astronomicAL in any directory they are working in as opposed to having to move their work to the location of the cloned repository. This change is optional, but could make astronomicAL much more portable.

    opened by rmorgan10 8
  • [JOSS Review] Paper

    [JOSS Review] Paper

    This issue is part of the JOSS review going on in https://github.com/openjournals/joss-reviews/issues/3635.

    The paper is well written and does an excellent job of introducing astronomicAL. I think two aspects of the paper can be improved.

    1. The state of the field discussion seems to be missing. Perhaps some examples where active learning has been applied would be helpful here.

    2. The statement of need section seems to list the features of astronomicAL as opposed to demonstrating why it is a needed piece of software. I'm aware that there is significant need for a tool like this, but I think that fact could be communicated better in the paper. For instance, when you add a more descriptive state of the field, that discussion will lend itself nicely to introducing the reason the field needs astronimcAL.

    opened by rmorgan10 5
  • How to use this for Image Labelling?

    How to use this for Image Labelling?

    Hi guys!

    I was following the README.md file but couldn't quite figure out whether this could be used for labelling images and subsequntly building image classification models.

    Any help would be appreciated. Thanks! :)

    Regards, Vinayak.

    enhancement question 
    opened by ElisonSherton 2
  • [JOSS Review] General Documentaion

    [JOSS Review] General Documentaion

    This issue is part of the JOSS review going on in openjournals/joss-reviews#3635.

    The methods are sufficiently documented given that users interact with astronomicAL through the interactive browser as opposed to directly with the API. The tutorials are very helpful in this regard.

    Just one thing is missing to satisfy JOSS requirements:

    1. Community guidelines for how people can contribute, report issues, and seek support. Generally, just a short paragraph in the README will satisfy this requirement.
    opened by rmorgan10 2
  • Documentation & Fixes

    Documentation & Fixes

    Majority of Documentation Tutorials have now been updated.

    Small fixes:

    • ensure ml data is shared across all classifiers
    • reassign index after applying scaling
    opened by grant-m-s 1
  • Code Changes From User Feedback

    Code Changes From User Feedback

    1.Added SED plots for astronomy classification

    • User can load in a photometry band file containing mean wavelength, full width half maximum (FWHM) and magnitude error values. These can be assigned specific values or assigned column names where the corresponding value will be retrieved when plotted.
    • Users can create these files through AstronomicAL and assign which features shouuld be used for the SED plot. By default all features are included in the file but are assigned -99 (indicating they shouldn't be plotted).
    • data/sed_data/example_photometry_bands.json added to work with example dataset and config.
    1. When exporting a configuration, the classifiers will export raw labels from the user rather than one-vs-rest converted ones.
    • The conversion back to one-vs-rest happens on loading the configuration file.
    • The models themselves still see one-vs-rest labels (1 if assigned class, 0 otherwise).
    1. Removed unknowns (label = -1) from performance metrics and initial starting point selection.
    • The logic initially was to set all labels that were -1 to 0 for performance metrics and starting points for each classifier but due to (2) this prevented the conversion back to original values as it wasn't possible to know whether the point was in the initial starting points or not.
    1. Show/hide incorrect and correct points in train and validation performance plots.

    2. Export to Fits file button added

    • Allowing for assigned labels in all classifiers as well as labelling mode to be saved as Fits file containing the id and assigned label of that point.
    1. Removed many print statements

    2. Various bug fixes

    opened by grant-m-s 1
  • Images as separate process

    Images as separate process

    Using multiprocessing.Process, images are now loaded on a separate process to prevent lag on the rest of the system.

    Test also updated to allow for change.

    opened by grant-m-s 1
  • Interactive labelling

    Interactive labelling

    Split into two separate modes: Active Learning Mode (same as original) and Labelling Mode (used to created hand labelled test sets)

    Also includes:

    • View test set results
    • Added default dataset and config_file
    • updated documentation
    • update testing
    opened by grant-m-s 1
  • Config collaboration

    Config collaboration

    Users can now load configuration files for layouts, settings or full training reproducibility.

    Also change include:

    • Autosaving of training labels to allow for easy restart of project.
    • Unnecessary imports removed.
    • Increased Tests in settings.
    • Improved default layout
    • Added checks for optical and radio images to prevent crashes due to website outages.
    opened by grant-m-s 1
  • AstronomicAL V2: Deep Learning and Image Update

    AstronomicAL V2: Deep Learning and Image Update

    Upcoming features:

    Machine Learning Updates

    • [ ] Full Pytorch Model Support

      • [ ] Training
      • [ ] Save/Load Model
    • [ ] Full Tensorflow Model Support

      • [ ] Training
      • [ ] Save/Load Model
    • [ ] Image Dataset Incorporation

    • [ ] Model Exploration Views

      • [ ] Saliency Maps
      • [ ] Weight Visualisation
      • [ ] Occlusion Maps
    • [ ] Incorporate Stopping Criteria into training

    • [ ] Allow cross-val to produce uncertainties during training

    UI/UX Improvements

    • [ ] Improve layout template
    • [ ] Allow dynamic dashboard creation and removal

    Various Bug Fixes

    • [ ] Improve handling train, val, test splits for small and very imbalanced datasets #16
    enhancement 
    opened by grant-m-s 0
Releases(v1.0)
Owner
Interactive AI PhD student from the University of Bristol
Manim is an animation engine for explanatory math videos.

A community-maintained Python framework for creating mathematical animations.

12.4k Dec 30, 2022
High-level geospatial data visualization library for Python.

geoplot: geospatial data visualization geoplot is a high-level Python geospatial plotting library. It's an extension to cartopy and matplotlib which m

Aleksey Bilogur 1k Jan 01, 2023
Streaming pivot visualization via WebAssembly

Perspective is an interactive visualization component for large, real-time datasets. Originally developed for J.P. Morgan's trading business, Perspect

The Fintech Open Source Foundation (www.finos.org) 5.1k Dec 27, 2022
A toolkit to generate MR sequence diagrams

mrsd: a toolkit to generate MR sequence diagrams mrsd is a Python toolkit to generate MR sequence diagrams, as shown below for the basic FLASH sequenc

Julien Lamy 3 Dec 25, 2021
SummVis is an interactive visualization tool for text summarization.

SummVis is an interactive visualization tool for analyzing abstractive summarization model outputs and datasets.

Robustness Gym 246 Dec 08, 2022
Sky attention heatmap of submissions to astrometry.net

astroheat Installation Requires Python 3.6+, Tested with Python 3.9.5 Install library dependencies pip install -r requirements.txt The program require

4 Jun 20, 2022
The repository is my code for various types of data visualization cases based on the Matplotlib library.

ScienceGallery The repository is my code for various types of data visualization cases based on the Matplotlib library. It summarizes the code and cas

Warrick Xu 2 Apr 20, 2022
Visualization of numerical optimization algorithms

Visualization of numerical optimization algorithms

Zhengxia Zou 46 Dec 01, 2022
Sparkling Pandas

SparklingPandas SparklingPandas aims to make it easy to use the distributed computing power of PySpark to scale your data analysis with Pandas. Sparkl

366 Oct 27, 2022
Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js

pivottablejs: the Python module Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js Installation pip install pivot

Nicolas Kruchten 512 Dec 26, 2022
A blender import/export system for Defold

defold-blender-export A Blender export system for the Defold game engine. Setup Notes There are no exhaustive documents for this tool yet. Its just no

David Lannan 27 Dec 30, 2022
Automate the case review on legal case documents and find the most critical cases using network analysis

Automation on Legal Court Cases Review This project is to automate the case review on legal case documents and find the most critical cases using netw

Yi Yin 7 Dec 28, 2022
A central task in drug discovery is searching, screening, and organizing large chemical databases

A central task in drug discovery is searching, screening, and organizing large chemical databases. Here, we implement clustering on molecular similarity. We support multiple methods to provide a inte

NVIDIA Corporation 124 Jan 07, 2023
100 Days of Code The Complete Python Pro Bootcamp for 2022

100-Day-With-Python 100 Days of Code - The Complete Python Pro Bootcamp for 2022. In this course, I spend with python language over 100 days, and I up

Rajdip Das 8 Jun 22, 2022
Alternative layout visualizer for ZSA Moonlander keyboard

General info This is a keyboard layout visualizer for ZSA Moonlander keyboard (because I didn't find their Oryx or their training tool particularly us

10 Jul 19, 2022
Custom ROI in Computer Vision Applications

EasyROI Helper library for drawing ROI in Computer Vision Applications Table of Contents EasyROI Table of Contents About The Project Tech Stack File S

43 Dec 09, 2022
A Scheil-Gulliver simulation tool using pycalphad.

scheil A Scheil-Gulliver simulation tool using pycalphad. import matplotlib.pyplot as plt from pycalphad import Database, variables as v from scheil i

pycalphad 6 Dec 10, 2021
Official Matplotlib cheat sheets

Official Matplotlib cheat sheets

Matplotlib Developers 6.7k Jan 09, 2023
Data visualization electromagnetic spectrum

Datenvisualisierung-Elektromagnetischen-Spektrum Anhand des Moduls matplotlib sollen die Daten des elektromagnetischen Spektrums dargestellt werden. D

Pulsar 1 Sep 01, 2022