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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fusilli-2.0.0.tar.gz (23.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fusilli-2.0.0-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

Details for the file fusilli-2.0.0.tar.gz.

File metadata

  • Download URL: fusilli-2.0.0.tar.gz
  • Upload date:
  • Size: 23.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fusilli-2.0.0.tar.gz
Algorithm Hash digest
SHA256 49885a9b545e88f45e79ea7cbea2211562824fff50e6b1a566710a64d1f104df
MD5 cfde11e5a1c47c46539b8f08b2f83d43
BLAKE2b-256 e917fd9c637b4bd9a1971f7674fa4394b9f971ca9e206f1dd1fc7d19fb090334

See more details on using hashes here.

File details

Details for the file fusilli-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: fusilli-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for fusilli-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e47f1c6995376fe51d6d06636092f5ce5332d5e1a5fa91ef3bbd38b6d2d7d4fc
MD5 24a68d7932a8802f5d49cd8a91e5a89a
BLAKE2b-256 c0e7b6ca0137c4be49ec87613386debdd3d346198ec6fd24cb680d59da70affa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 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