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
nvitop, an interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management

An interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management.

Xuehai Pan 1.3k Jan 02, 2023
A simple project on Data Visualization for CSCI-40 course.

Simple-Data-Visualization A simple project on Data Visualization for CSCI-40 course - the instructions can be found here SAT results in New York in 20

Hugo Matousek 8 Oct 27, 2021
Bar Chart of the number of Senators from each party who are up for election in the next three General Elections

Congress-Analysis Bar Chart of the number of Senators from each party who are up for election in the next three General Elections This bar chart shows

11 Oct 26, 2021
This plugin plots the time you spent on a tag as a histogram.

This plugin plots the time you spent on a tag as a histogram.

Tom Dörr 7 Sep 09, 2022
Advanced hot reloading for Python

The missing element of Python - Advanced Hot Reloading Details Reloadium adds hot reloading also called "edit and continue" functionality to any Pytho

Reloadware 1.9k Jan 04, 2023
Multi-class confusion matrix library in Python

Table of contents Overview Installation Usage Document Try PyCM in Your Browser Issues & Bug Reports Todo Outputs Dependencies Contribution References

Sepand Haghighi 1.3k Dec 31, 2022
LabGraph is a a Python-first framework used to build sophisticated research systems with real-time streaming, graph API, and parallelism.

LabGraph is a a Python-first framework used to build sophisticated research systems with real-time streaming, graph API, and parallelism.

MLH Fellowship 7 Oct 05, 2022
Dimensionality reduction in very large datasets using Siamese Networks

ivis Implementation of the ivis algorithm as described in the paper Structure-preserving visualisation of high dimensional single-cell datasets. Ivis

beringresearch 284 Jan 01, 2023
Handout for the tutorial "Creating publication-quality figures with matplotlib"

Handout for the tutorial "Creating publication-quality figures with matplotlib"

JB Mouret 1.9k Jan 02, 2023
Visualize data of Vietnam's regions with interactive maps.

Plotting Vietnam Development Map This is my personal project that I use plotly to analyse and visualize data of Vietnam's regions with interactive map

1 Jun 26, 2022
A site that displays up to date COVID-19 stats, powered by fastpages.

https://covid19dashboards.com This project was built with fastpages Background This project showcases how you can use fastpages to create a static das

GitHub 1.6k Jan 07, 2023
Design your own matplotlib stylefile interactively

Tired of playing with font sizes and other matplotlib parameters every time you start a new project or write a new plotting function? Want all you plots have the same style? Use matplotlib configurat

yobi byte 207 Dec 08, 2022
Type-safe YAML parser and validator.

StrictYAML StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification. Priorities: Beautiful API Re

Colm O'Connor 1.2k Jan 04, 2023
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
Plotting data from the landroid and a raspberry pi zero to a influx-db

landroid-pi-influx Plotting data from the landroid and a raspberry pi zero to a influx-db Dependancies Hardware: Landroid WR130E Raspberry Pi Zero Wif

2 Oct 22, 2021
Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects

carcassonne_tools Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects NOTE NOTE NOTE The

1 Nov 08, 2021
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
Visualizations of some specific solutions of different differential equations.

Diff_sims Visualizations of some specific solutions of different differential equations. Heat Equation in 1 Dimension (A very beautiful and elegant ex

2 Jan 13, 2022
CPG represent!

CoolPandasGroup CPG represent! Arianna Brandon Enne Luan Tracie Project requirements: use Pandas to clean and format datasets use Jupyter Notebook to

Enne 3 Feb 07, 2022
BGraph is a tool designed to generate dependencies graphs from Android.bp soong files.

BGraph BGraph is a tool designed to generate dependencies graphs from Android.bp soong files. Overview BGraph (for Build-Graphs) is a project aimed at

Quarkslab 10 Dec 19, 2022