Skip to main content
drawing

fusilli

🌸 Don't be silly, use fusilli for all your multi-modal data fusion needs! 🌸

DOI Twitter Documentation Status version downloads

Introduction

🍝 Welcome to fusilli 🍝, the ultimate library for multi-modal data fusion in machine learning! Fusilli makes data fusion a piece of cake, providing a platform to combine different data types efficiently.

What can Fusilli do?

Multi-modal data fusion is the combination of different types of data (or data modalities) in the pursuit of some common goal. For example, using both blood test results and neuroimaging to predict whether somebody will develop a disease. There are many different ways to combine data modalities, and the aim of fusilli is to provide a platform for anybody to compare different methods against each other.

Fusilli is built using PyTorch Lightning and PyTorch Geometric, and it currently supports the following scenarios:

  1. Tabular-Tabular Fusion: Combine two (or, for most methods, three) different types of tabular data.
  2. Tabular-Image Fusion: Combine one type of tabular data with image data (2D or 3D).

Fusilli supports a range of prediction tasks, including regression, binary classification, and multi-class classification. Note that it does not currently support tasks such as clustering or segmentation.

Want to know more? Here is a link to Read the Docs

Installation

To savour the flavours of fusilli, you can install it using pip:

pip install fusilli

Quick Start

Here is a quick example of how to use fusilli to train a regression model and plot the real values vs. predicted values.

    from fusilli.data import prepare_fusion_data
    from fusilli.train import train_and_save_models
    from fusilli.eval import RealsVsPreds
    import matplotlib.pyplot as plt

    # Import a fusion model
    from fusilli.fusionmodels.tabularfusion.concat_data import ConcatTabularData as ExampleModel

    data_paths = {
        "tabular1": "path/to/tabular_1.csv",  
        "tabular2": "path/to/tabular_2.csv",  
        "image": "path/to/image_file.pt",  
    }

    output_paths = {
        "checkpoints": "path/to/checkpoints/dir",  
        "losses": "path/to/losses/dir",  
        "figures": "path/to/figures/dir",  
    }

    # Get the data ready
    data_module = prepare_fusion_data(prediction_task="regression",
                                      fusion_model=ExampleModel,
                                      data_paths=data_paths,
                                      output_paths=output_paths)

    # Train the model
    trained_model = train_and_save_models(data_module=data_module,
                                          fusion_model=ExampleModel)

    # Evaluate the model by plotting the real values vs. predicted values
    RealsVsPreds_figure = RealsVsPreds.from_final_val_data(trained_model)
    plt.show()

How to Cite

Florence Townend, Patrick J. Roddy, & Philipp Goebl. (2024). florencejt/fusilli: Fusilli v1.1.0 (v1.1.0). Zenodo. https://doi.org/10.5281/zenodo.10463697

Contribute!

If you've developed new fusion methods or want to enhance Fusilli, check our contribution guidelines to get started. PyTorch templates and contribution guidance our in the contributions documentation.

Authors and Acknowledgements

fusilli is authored by Florence J Townend, James Chapman, and James H Cole.

Florence J Townend was supported by a UCL UKRI Centre for Doctoral Training in AI-enabled Healthcare studentship ( EP/S021612/1) during the initial development of this software.

License

This project is licensed under AGPLv3. See the LICENSE file for details.

Metadata

Release files for fusilli 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fusilli 2.0.0
File Size Uploaded
fusilli-2.0.0.tar.gz 23.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for fusilli 2.0.0
File Interpreter ABI Platform
fusilli-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 MB

Release files / fusilli-2.0.0.tar.gz

Download URL fusilli-2.0.0.tar.gz
Size 23.3 MB
Tags Source
SHA-256 checksum
How to use checksums
49885a9b545e88f45e79ea7cbea2211562824fff50e6b1a566710a64d1f104df
BLAKE2b-256 checksum
How to use checksums
e917fd9c637b4bd9a1971f7674fa4394b9f971ca9e206f1dd1fc7d19fb090334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / fusilli-2.0.0-py3-none-any.whl

Download URL fusilli-2.0.0-py3-none-any.whl
Size 8.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e47f1c6995376fe51d6d06636092f5ce5332d5e1a5fa91ef3bbd38b6d2d7d4fc
BLAKE2b-256 checksum
How to use checksums
c0e7b6ca0137c4be49ec87613386debdd3d346198ec6fd24cb680d59da70affa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page