A case-based reasoning python library that aims to help researchers find similar cases according to an input case with a wide range of methods that can detect similarity based on the features of each time series
Project description
CBR-FoX: Case-Based Reasoning for Time Series Prediction Explanations
CBR-FoX is a Python library designed to provide case-based reasoning explanations for time series prediction models. This approach enhances the transparency and understanding of machine learning models used with sequential data.
Features
- CBR-FoX approach implementation.
- Adaptable to various types of time series.
- Compatible with common machine learning models.
- Generates comprehensible explanations.
Installation
Clone this repository and install its dependencies:
git clone https://github.com/jerryperezperez/CBR-FoX.git
cd CBR-FoX
pip install -r requirements.txt
Usage
Follow these steps to use CBR-FoX in your projects:
-
Retreive model's information: Obtain the inputs and outputs generated by your AI model.
-
Create CBRfox instances:
cbr_instances = CBRfoxInstances(model_outputs)
-
Initialize Builder
builder = CBRfoxBuilder(cbr_instances)
-
Train the instance:
builder.fit(train_windows, train_targets, target_to_analyze, window_to_predict)
-
Obtain explanations:
builder.predict(prediction = prediction,num_cases=5)
-
Use graph visualization methods:
builder.visualize_pyplot( fmt = '--d', scatter_params={"s": 50}, xtick_rotation=50, title="nombre", xlabel="x", ylabel="y" )
Library Usage Diagram
The following diagram illustrates the typical workflow when using the CBR-FoX library. From retrieving inputs and outputs from the AI model to generating visual explanations, each step is designed to facilitate the interpretation and explanation of time series-based predictions.
Library file relation diagram
The following diagram shows the classes involved in the basic functionality of the library. Thecci_distance file is used when creating an instance that employs the eponymous technique implemented in this script.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file CBR_FoX-0.1.0.tar.gz.
File metadata
- Download URL: CBR_FoX-0.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
164839cd57e4e58b98ccad0b66e40d43b8d97d95c443ac5fa2ec12e2c189a009
|
|
| MD5 |
2f9b2dd6ca0da2014e6322286bf160d7
|
|
| BLAKE2b-256 |
32d7ff6f835a8d8acb7d9280156d2c38e91f458882f72f355ff49e3c2a5d54e5
|
File details
Details for the file CBR_FoX-0.1.0-py3-none-any.whl.
File metadata
- Download URL: CBR_FoX-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f3aa9cc7b671624bed3298f212c1956c0ad267211ddc8efaa0850be61c340c2
|
|
| MD5 |
ee846f91640aafea521720615649b1fe
|
|
| BLAKE2b-256 |
c8c439c99ac80624810837379f90f55452e01e01bdc5d91fbefffda2ee3daec8
|