Quantus

Latest version: v0.5.3

Safety actively analyzes 683530 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.2.0

What's Changed 🚀

For more transparent kwargs-passing and error handling, we have updated the API of Quantus! The main changes are the following:

- Add function-specific keyword-arguments to metric functions. by dkrako in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/124

**From implicit to explicit argument passing.** To mitigate the risk of user typos and other undefined behaviours, the new version `0.2.0` forces explicit argument passing of all metric initalisations and calls. Instead of passing all evaluation parameters in one single kwargs list, e.g.,
python
kwargs = {"n_perturb_samples": 10, "abs": False, "normalise": True, "explain_func": quantus.explain, method: "Saliency"}}
metric = Infidelity(**kwargs)
metric(model=model, x_batch=x, y_batch=y, a_batch=a, s_batch=s, **kwargs)

which could for example result in typos being overlooked, we now separate the parameters into different dictionaries such as `normalise_func_kwargs`, `explain_func_kwargs`, `model_predict_kwargs`. With the new API, the same call looks like this:
python
metric = Infidelity(n_perturb_samples=10, abs=False, normalise=True)
metric(model=model, x_batch=x, y_batch=y, a_batch=a, s_batch=s, explain_func=quantus.explain, explain_func_kwargs={"method": "Saliency"})

In this way, we assert better control over the parameters. If an unexpected argument is passed, an error will now be thrown.

**Extended the `base.Metric` class.** Many metrics share the same logic when it comes to general attributes and pre-processing. To remove duplicate code, we extended the base class, which now includes some key methods `general_preprocessing`, `custom_preprocessing`, `evaluate_instance`, `custom_postprocessing` all which could be used for various `Metric` implementations.

**Additional functionality in helpers and increased general code-quality.** We have shortended and rewritten scripts where necessary for better code readability. Added new functions and refactored existing ones to adhere to [PEP-8](https://www.python.org/dev/peps/pep-0008/).

If these API changes are not suitable for your project's needs, please install a previous release version such as [v0.1.6](https://github.com/understandable-machine-intelligence-lab/Quantus/releases/tag/v0.1.6) via:

bash

0.1.6

What's Changed
* Fixed a bug with patch creation and with .index() on np arrays by leanderweber in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/140
* Do not show zennit warning, if captum or tf-explain is used by aaarrti in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/141
* [Create CITATION](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/3e0ea3f62b45d3f6ef73e47efc565bee79cc54af)
* [Fixed bug uniform sampling (str) option in get_baseline_dict](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/b70cfa24f95749489ac3dc8b6cb0980df38d742a)

New Contributors
* aaarrti made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/141

**Full Changelog**: https://github.com/understandable-machine-intelligence-lab/Quantus/compare/v0.1.5...v0.1.6

0.1.5

What's Changed 🎉
* New metrics:
* Consistency and Sufficiency 112 by dilyabareeva in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/117
* Focus implementation by FerranPares in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/127
* Fix typing issue explanation_func.py by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/120
* Issue 125 fixed, 1st attempt by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/126
* Avoid empty prints when no deprecation warnings by vedal in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/128
* Minor fixes by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/132, including:
* [Updated signature of all metrics to include the s_batch](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/7b93a6e673f911b406d4361a9b4ba8d2a6aa7523)
* [Updated docstrings](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/5987aaf546584b5bc478b4f4cc3f608ab218d9a0)
* [Added implmentation to return aggregate score](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/930e8f280dda6f372e9ccc09b8bf325e7ca45d5f)
* [Added progressbar to tdqm](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/9468691db300aa672788abfa58432dc620c5da8a)

New Contributors
* vedal made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/128

* FerranPares made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/127

**Full Changelog**: https://github.com/understandable-machine-intelligence-lab/Quantus/compare/v0.1.4...v0.1.5

0.1.4

In the spotlight 🎉

- New evaluation metrics: **(In)fidelity** and **ROAD**
- Updated to a more generous **LGPL license** model, allowing for commercial use
- Additional functionality for faithfulness metrics e.g., computing AUC scores
- Cleaning up perturb function and supporting multi-dimensional channels
- Smaller typos and bugs fixed :-)

What's Changed
* Issue 71 and minor bug fixes by dilyabareeva in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/81
* Merging flexible input size support by leanderweber in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/86
* Added a random uniform explanation method by Wickstrom in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/97
* Fix typos and verify targets by rodrigobdz in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/99
* added softmax_act param by Wickstrom in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/102
* fixed a few typos in the readme overview section by sltzgs in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/100
* Cleaning up Perturb Functions, Multidimensional Channel support by leanderweber in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/88
* Update LICENSE to LGPL by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/109
* Update LICENSE to LGPL by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/108
* Included auc or mean aggregation to faithfulness metrics. by Wickstrom in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/105
* Issues 55 104, 106, 110 and 113: smaller bug fixes by annahedstroem in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/114
* Infidelity (Issue 72) & Road (Issue 76) by dilyabareeva in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/107

New Contributors
* sltzgs made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/100

**Full Changelog**: https://github.com/understandable-machine-intelligence-lab/Quantus/compare/v0.1.3...v0.1.4

0.1.3

What's Changed
* WIP: 1d and non squared 2d input shapes by dkrako in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/74
* fixing image distortion on mobile screens by sebastian-lapuschkin in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/85

Fixed issues
* [Ability to Specify Seed for RandomLogit 67](https://github.com/understandable-machine-intelligence-lab/Quantus/issues/67)
* [PixelFlipping metric only flips first color channel 75](https://github.com/understandable-machine-intelligence-lab/Quantus/issues/75)

Other commits
* [post-merge fixes: impr. code coverage, formatting, docstrings, tytori…](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/5febb2fedb8abff6a88b5429f9ef048163822662)
* [bug fixes: from self.last_result to self.last_results](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/50ca684bded7f05630f0771d6621f86d00e0a1c8)[](https://github.com/annahedstroem)
* [updated perturb_func for input_shift](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/051c00d4af5f8236368e9d8560f55c20ae1c9e01)
* [fixes: axiomatic metrics, warnings, features_in_step extension, defau…](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/bce9002ecc9ba8a5fce50dd8d1b32092bace1a31)


**Full Changelog**: https://github.com/understandable-machine-intelligence-lab/Quantus/compare/v0.1.2...v0.1.3

0.1.2

What's Changed
* updating readme to reflect arxiv submission by sebastian-lapuschkin in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/63
* Readme: Fix minor typos by rodrigobdz in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/64
* minor typo corrections by dkrako in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/68
* add tqdm progress bar for faithfullness metrics by dkrako in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/69

New Contributors
* rodrigobdz made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/64
* dkrako made their first contribution in https://github.com/understandable-machine-intelligence-lab/Quantus/pull/68

Fixes
* annahedstroem Fixed PixelFlipping metric only flips first color channel (https://github.com/understandable-machine-intelligence-lab/Quantus/commit/b0d6554f40556ce12ede0cb5abceba2114f83ffc)
* annahedstroem [updated a workflow guide to Contributing](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/b3f385c07eab58d21204b6048d1c19dfd06c7e76)[](https://github.com/annahedstroem)
* annahedstroem [added functionality to specify seed in randomisation tests](https://github.com/understandable-machine-intelligence-lab/Quantus/commit/128ac4294699079eaec3ae40817e90b4be35061c)[](https://github.com/annahedstroem)

**Full Changelog**: https://github.com/understandable-machine-intelligence-lab/Quantus/compare/v0.1.1...v0.1.2

PyPi package here: https://pypi.org/project/quantus/0.1.2/

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.