decode-mcd


Namedecode-mcd JSON
Version 2024.2.22rc0 PyPI version JSON
download
home_page
SummaryMCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.
upload_time2024-02-22 20:29:18
maintainer
docs_urlNone
authorLyle Regenwetter & Yazan Abu Obaideh
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Lyleregenwetter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords counterfactuals design multi-objective multiobjective machine-learning
VCS
bugtrack_url
requirements about-time alive-progress autogluon.common autogluon.core autogluon.features autogluon.tabular autograd boto3 botocore build certifi cffi charset-normalizer cma contourpy cryptography cycler Deprecated dill docutils fonttools future grapheme idna importlib-metadata importlib-resources jaraco.classes jeepney jmespath joblib keyring kiwisolver markdown-it-py matplotlib mdurl more-itertools networkx nh3 numpy packaging pandas Pillow pkginfo psutil pycparser Pygments pymoo pyparsing pyproject_hooks python-dateutil pytz readme-renderer requests requests-toolbelt rfc3986 rich s3transfer scikit-learn scipy SecretStorage six threadpoolctl tomli tqdm twine tzdata urllib3 wrapt zipp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Multiobjective-Counterfactuals-for-Design

[//]: # (Official Repository for Multi-Objective Counterfactuals for Design (MCD))

[//]: # ([![Contributors][contributors-shield]][contributors-url])

[//]: # ([![Forks][forks-shield]][forks-url])

[//]: # ([![Stargazers][stars-shield]][stars-url])

[//]: # ([![Issues][issues-shield]][issues-url])

[//]: # ([![MIT License][license-shield]][license-url])

[//]: # ([![LinkedIn][linkedin-shield]][linkedin-url])



<!-- PROJECT LOGO -->

[//]: # (<br />)
<div>

[//]: # (  <a href="https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design">)

[//]: # (    <img src="images/logo.png" alt="Logo" width="80" height="80">)

[//]: # (  </a>)

[//]: # (<h3 align="center">Multiobjective Counterfactuals for Design &#40;MCD&#41;</h3>)

  <p>
    MCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.  
    <br />

[//]: # (    <a href="https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design"><strong>Explore the docs »</strong></a>)

[//]: # (    <br />)

[//]: # (    <br />)

[//]: # (    <a href="https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design">View Demo</a>)

[//]: # (    ·)

[//]: # (    <a href="https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues">Report Bug</a>)

[//]: # (    ·)

[//]: # (    <a href="https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues">Request Feature</a>)
  </p>
</div>


[//]: # (<!-- TABLE OF CONTENTS -->)

[//]: # (<details>)

[//]: # (  <summary>Table of Contents</summary>)

[//]: # (  <ol>)

[//]: # (    <li>)

[//]: # (      <a href="#about-the-project">About The Project</a>)

[//]: # (      <ul>)

[//]: # (        <li><a href="#built-with">Built With</a></li>)

[//]: # (      </ul>)

[//]: # (    </li>)

[//]: # (    <li>)

[//]: # (      <a href="#getting-started">Quick-Start Guide</a>)

[//]: # (      <ul>)

[//]: # (        <li><a href="#prerequisites">Prerequisites</a></li>)

[//]: # (        <li><a href="#installation">Installation</a></li>)

[//]: # (      </ul>)

[//]: # (    </li>)

[//]: # (    <li><a href="#usage">Quick-Start Guide</a></li>)

[//]: # (    <li><a href="#roadmap">Roadmap</a></li>)

[//]: # (    <li><a href="#contributing">Contributing</a></li>)

[//]: # (    <li><a href="#license">License</a></li>)

[//]: # (    <li><a href="#contact">Contact</a></li>)

[//]: # (    <li><a href="#acknowledgments">Acknowledgments</a></li>)

[//]: # (  </ol>)

[//]: # (</details>)



<!-- ABOUT THE PROJECT -->

## About The Project

Multiobjective Counterfactuals for Design (MCD) is a framework primarily intended for the generation of design
alternatives that meet user-specified
performance criteria while remaining within a certain region of the design space. To use MCD, you need a dataset of
designs that are reasonably representative of the desired region of the design space, including performance metrics,
as well as a model capable of predicting the performance metrics of a given design. MCD is model agnostic - this means
that the model need not be a differentiable machine learning model, or,
in fact, a machine learning model in the first place. MCD also offers high flexibility in terms of the number and 'type'
of performance targets that can be specified.
Performance targets can be any combination of:

* 'Continuous Targets': (e.g. I want suggested bike designs to weigh between 2 and 4 kilograms)
* 'Classification Targets': (e.g. I want suggested bike designs to be classified as dirt bikes)
* 'Probability Targets': (e.g. I want each suggested design to have a higher probability of
  belonging to classes A or B than of
  belonging to C or D)

[//]: # ([![Product Name Screen Shot][product-screenshot]]&#40;https://example.com&#41;)

[//]: # ()

[//]: # (Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor)

[//]: # (for the)

[//]: # (following: `github_username`, `repo_name`, `twitter_handle`, `linkedin_username`, `email_client`, `email`, `project_title`, `project_description`)

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)

### Built With

* [![Python][python-badge-url]][python-url]
* [![Pymoo][pymoo-badge-url]][pymoo-url]
* [![Pandas][pandas-badge-url]][pandas-url]
* [![Numpy][numpy-badge-url]][numpy-url]

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)



<!-- GETTING STARTED -->

## Quick-Start Guide

### Installation

1. Install MCD with:
   ```pip install decode-mcd```
2. Run:

```python
import random

from pymoo.core.variable import Real

import numpy as np
from decode_mcd import DesignTargets, DataPackage, MultiObjectiveProblem, CounterfactualsGenerator, ContinuousTarget

x = np.random.random(100)
x = x.reshape(100, 1)
y = x * 100


def predict(_x):
    return _x * 100 + random.random()


data_package = DataPackage(features_dataset=x,
                           predictions_dataset=y,
                           query_x=x[0].reshape(1, 1),
                           design_targets=DesignTargets([ContinuousTarget(label=0,
                                                                          lower_bound=25,
                                                                          upper_bound=75)]),
                           datatypes=[Real(bounds=(0, 1))])

problem = MultiObjectiveProblem(data_package=data_package,
                                prediction_function=lambda design: predict(design),
                                constraint_functions=[])

generator = CounterfactualsGenerator(problem=problem,
                                     pop_size=10,
                                     initialize_from_dataset=False)

generator.generate(n_generations=10)
counterfactuals = generator.sample_with_dtai(num_samples=10, gower_weight=1,
                                             avg_gower_weight=1, cfc_weight=1,
                                             diversity_weight=50)
print(counterfactuals)
```

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)



<!-- USAGE EXAMPLES -->

[//]: # (## I-Got-Time Guide)

[//]: # ()

[//]: # (1. Either install MCD with pip as shown in the Quick-Start Guide, or fork the repo with)

[//]: # (   ```git clone git@github.com:Lyleregenwetter/Multiobjective-Counterfactuals-for-Design.git```)

[//]: # (2. Now, customize the code below to fit your datasets and model. The template below assumes the following:)

[//]: # (    * The features_dataset _X_ has 4 columns: R1, R2, C1, in order. R1 and R2 are real variables)

[//]: # (      with the following respective ranges &#40;0, 10&#41; and &#40;-50, 50&#41;. C1 is a choice variable &#40;0, 1, 2&#41;.)

[//]: # (    * The predictions_dataset _Y_ has 5 columns. O_R1 and O_R2 are real variables.)

[//]: # (      O_C1 is a categorical/choice variable. O_P1 and O_P2 represent the probabilities of belonging to classes A and B,)

[//]: # (      respectively, where a design can belong to either class A or B and nothing else.)

[//]: # (    *)

[//]: # ()

[//]: # (```python)

[//]: # (from pymoo.core.variable import Real, Choice)

[//]: # (from decode_mcd import DesignTargets, DataPackage, MultiObjectiveProblem, CounterfactualsGenerator, ContinuousTarget)

[//]: # ()

[//]: # (x, y = ...  # load your data)

[//]: # (model = ...  # load your model)

[//]: # (query_x = ...  # define the initial design or starting point)

[//]: # ()

[//]: # (data_package = DataPackage&#40;features_dataset=x,)

[//]: # (                           predictions_dataset=y,)

[//]: # (                           query_x=query_x,)

[//]: # (                           design_targets=DesignTargets&#40;[ContinuousTarget&#40;label=0,)

[//]: # (                                                                          lower_bound=25,)

[//]: # (                                                                          upper_bound=75&#41;]&#41;,)

[//]: # (                           datatypes=[Real&#40;bounds=&#40;0, 10&#41;&#41;,)

[//]: # (                                      Real&#40;bounds=&#40;-50, 50&#41;&#41;,)

[//]: # (                                      Choice&#40;options=[0, 1, 2]&#41;],)

[//]: # (                           # # optional parameters)

[//]: # (                           # features_to_vary=..., )

[//]: # (                           # bonus_objectives=...,)

[//]: # (                           # datasets_validity=...,)

[//]: # (                           # datasets_scores=...,)

[//]: # (                           &#41;)

[//]: # ()

[//]: # (problem = MultiObjectiveProblem&#40;data_package=data_package,)

[//]: # (                                prediction_function=lambda design: model.predict&#40;design&#41;,)

[//]: # (                                constraint_functions=[]&#41;)

[//]: # ()

[//]: # (generator = CounterfactualsGenerator&#40;problem=problem,)

[//]: # (                                     pop_size=10,)

[//]: # (                                     initialize_from_dataset=False,)

[//]: # (                                     verbose=True&#41;)

[//]: # ()

[//]: # (generator.generate&#40;n_generations=10&#41;)

[//]: # (counterfactuals = generator.sample_with_dtai&#40;num_samples=10, gower_weight=1,)

[//]: # (                                             avg_gower_weight=1, cfc_weight=1,)

[//]: # (                                             diversity_weight=50&#41;)

[//]: # (print&#40;counterfactuals&#41;)

[//]: # (```)

<!-- ROADMAP -->

## Roadmap

- [ ] We are currently working on support for gradient-based optimization

See the [open issues](https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues) for a full
list of proposed features (and
known issues).

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)



<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any
contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also
simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)



<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE` for more information.

[//]: # (<p align="right">&#40;<a href="#readme-top">back to top</a>&#41;</p>)


<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge

[contributors-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge

[forks-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/network/members

[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge

[stars-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/stargazers

[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge

[issues-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues

[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge

[license-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/blob/master/LICENSE


[python-badge-url]: https://img.shields.io/badge/language-python-purple

[python-url]: https://www.python.org/

[pandas-badge-url]: https://img.shields.io/badge/framework-pandas-red

[pandas-url]: https://pandas.pydata.org/

[numpy-badge-url]: https://img.shields.io/badge/framework-numpy-green

[numpy-url]: https://numpy.org/

[pymoo-badge-url]: https://img.shields.io/badge/framework-pymoo-blue

[pymoo-url]: https://pymoo.org/

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "decode-mcd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "counterfactuals,design,multi-objective,multiobjective,machine-learning",
    "author": "Lyle Regenwetter & Yazan Abu Obaideh",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/59/dd/a557314105e4819787085444dcb26c94e5361f476fc2f9be56f6c1da8662/decode-mcd-2024.2.22rc0.tar.gz",
    "platform": null,
    "description": "# Multiobjective-Counterfactuals-for-Design\n\n[//]: # (Official Repository for Multi-Objective Counterfactuals for Design &#40;MCD&#41;)\n\n[//]: # ([![Contributors][contributors-shield]][contributors-url])\n\n[//]: # ([![Forks][forks-shield]][forks-url])\n\n[//]: # ([![Stargazers][stars-shield]][stars-url])\n\n[//]: # ([![Issues][issues-shield]][issues-url])\n\n[//]: # ([![MIT License][license-shield]][license-url])\n\n[//]: # ([![LinkedIn][linkedin-shield]][linkedin-url])\n\n\n\n<!-- PROJECT LOGO -->\n\n[//]: # (<br />)\n<div>\n\n[//]: # (  <a href=\"https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design\">)\n\n[//]: # (    <img src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\">)\n\n[//]: # (  </a>)\n\n[//]: # (<h3 align=\"center\">Multiobjective Counterfactuals for Design &#40;MCD&#41;</h3>)\n\n  <p>\n    MCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.  \n    <br />\n\n[//]: # (    <a href=\"https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design\"><strong>Explore the docs \u00bb</strong></a>)\n\n[//]: # (    <br />)\n\n[//]: # (    <br />)\n\n[//]: # (    <a href=\"https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design\">View Demo</a>)\n\n[//]: # (    \u00b7)\n\n[//]: # (    <a href=\"https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues\">Report Bug</a>)\n\n[//]: # (    \u00b7)\n\n[//]: # (    <a href=\"https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues\">Request Feature</a>)\n  </p>\n</div>\n\n\n[//]: # (<!-- TABLE OF CONTENTS -->)\n\n[//]: # (<details>)\n\n[//]: # (  <summary>Table of Contents</summary>)\n\n[//]: # (  <ol>)\n\n[//]: # (    <li>)\n\n[//]: # (      <a href=\"#about-the-project\">About The Project</a>)\n\n[//]: # (      <ul>)\n\n[//]: # (        <li><a href=\"#built-with\">Built With</a></li>)\n\n[//]: # (      </ul>)\n\n[//]: # (    </li>)\n\n[//]: # (    <li>)\n\n[//]: # (      <a href=\"#getting-started\">Quick-Start Guide</a>)\n\n[//]: # (      <ul>)\n\n[//]: # (        <li><a href=\"#prerequisites\">Prerequisites</a></li>)\n\n[//]: # (        <li><a href=\"#installation\">Installation</a></li>)\n\n[//]: # (      </ul>)\n\n[//]: # (    </li>)\n\n[//]: # (    <li><a href=\"#usage\">Quick-Start Guide</a></li>)\n\n[//]: # (    <li><a href=\"#roadmap\">Roadmap</a></li>)\n\n[//]: # (    <li><a href=\"#contributing\">Contributing</a></li>)\n\n[//]: # (    <li><a href=\"#license\">License</a></li>)\n\n[//]: # (    <li><a href=\"#contact\">Contact</a></li>)\n\n[//]: # (    <li><a href=\"#acknowledgments\">Acknowledgments</a></li>)\n\n[//]: # (  </ol>)\n\n[//]: # (</details>)\n\n\n\n<!-- ABOUT THE PROJECT -->\n\n## About The Project\n\nMultiobjective Counterfactuals for Design (MCD) is a framework primarily intended for the generation of design\nalternatives that meet user-specified\nperformance criteria while remaining within a certain region of the design space. To use MCD, you need a dataset of\ndesigns that are reasonably representative of the desired region of the design space, including performance metrics,\nas well as a model capable of predicting the performance metrics of a given design. MCD is model agnostic - this means\nthat the model need not be a differentiable machine learning model, or,\nin fact, a machine learning model in the first place. MCD also offers high flexibility in terms of the number and 'type'\nof performance targets that can be specified.\nPerformance targets can be any combination of:\n\n* 'Continuous Targets': (e.g. I want suggested bike designs to weigh between 2 and 4 kilograms)\n* 'Classification Targets': (e.g. I want suggested bike designs to be classified as dirt bikes)\n* 'Probability Targets': (e.g. I want each suggested design to have a higher probability of\n  belonging to classes A or B than of\n  belonging to C or D)\n\n[//]: # ([![Product Name Screen Shot][product-screenshot]]&#40;https://example.com&#41;)\n\n[//]: # ()\n\n[//]: # (Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor)\n\n[//]: # (for the)\n\n[//]: # (following: `github_username`, `repo_name`, `twitter_handle`, `linkedin_username`, `email_client`, `email`, `project_title`, `project_description`)\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n### Built With\n\n* [![Python][python-badge-url]][python-url]\n* [![Pymoo][pymoo-badge-url]][pymoo-url]\n* [![Pandas][pandas-badge-url]][pandas-url]\n* [![Numpy][numpy-badge-url]][numpy-url]\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n\n\n<!-- GETTING STARTED -->\n\n## Quick-Start Guide\n\n### Installation\n\n1. Install MCD with:\n   ```pip install decode-mcd```\n2. Run:\n\n```python\nimport random\n\nfrom pymoo.core.variable import Real\n\nimport numpy as np\nfrom decode_mcd import DesignTargets, DataPackage, MultiObjectiveProblem, CounterfactualsGenerator, ContinuousTarget\n\nx = np.random.random(100)\nx = x.reshape(100, 1)\ny = x * 100\n\n\ndef predict(_x):\n    return _x * 100 + random.random()\n\n\ndata_package = DataPackage(features_dataset=x,\n                           predictions_dataset=y,\n                           query_x=x[0].reshape(1, 1),\n                           design_targets=DesignTargets([ContinuousTarget(label=0,\n                                                                          lower_bound=25,\n                                                                          upper_bound=75)]),\n                           datatypes=[Real(bounds=(0, 1))])\n\nproblem = MultiObjectiveProblem(data_package=data_package,\n                                prediction_function=lambda design: predict(design),\n                                constraint_functions=[])\n\ngenerator = CounterfactualsGenerator(problem=problem,\n                                     pop_size=10,\n                                     initialize_from_dataset=False)\n\ngenerator.generate(n_generations=10)\ncounterfactuals = generator.sample_with_dtai(num_samples=10, gower_weight=1,\n                                             avg_gower_weight=1, cfc_weight=1,\n                                             diversity_weight=50)\nprint(counterfactuals)\n```\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n\n\n<!-- USAGE EXAMPLES -->\n\n[//]: # (## I-Got-Time Guide)\n\n[//]: # ()\n\n[//]: # (1. Either install MCD with pip as shown in the Quick-Start Guide, or fork the repo with)\n\n[//]: # (   ```git clone git@github.com:Lyleregenwetter/Multiobjective-Counterfactuals-for-Design.git```)\n\n[//]: # (2. Now, customize the code below to fit your datasets and model. The template below assumes the following:)\n\n[//]: # (    * The features_dataset _X_ has 4 columns: R1, R2, C1, in order. R1 and R2 are real variables)\n\n[//]: # (      with the following respective ranges &#40;0, 10&#41; and &#40;-50, 50&#41;. C1 is a choice variable &#40;0, 1, 2&#41;.)\n\n[//]: # (    * The predictions_dataset _Y_ has 5 columns. O_R1 and O_R2 are real variables.)\n\n[//]: # (      O_C1 is a categorical/choice variable. O_P1 and O_P2 represent the probabilities of belonging to classes A and B,)\n\n[//]: # (      respectively, where a design can belong to either class A or B and nothing else.)\n\n[//]: # (    *)\n\n[//]: # ()\n\n[//]: # (```python)\n\n[//]: # (from pymoo.core.variable import Real, Choice)\n\n[//]: # (from decode_mcd import DesignTargets, DataPackage, MultiObjectiveProblem, CounterfactualsGenerator, ContinuousTarget)\n\n[//]: # ()\n\n[//]: # (x, y = ...  # load your data)\n\n[//]: # (model = ...  # load your model)\n\n[//]: # (query_x = ...  # define the initial design or starting point)\n\n[//]: # ()\n\n[//]: # (data_package = DataPackage&#40;features_dataset=x,)\n\n[//]: # (                           predictions_dataset=y,)\n\n[//]: # (                           query_x=query_x,)\n\n[//]: # (                           design_targets=DesignTargets&#40;[ContinuousTarget&#40;label=0,)\n\n[//]: # (                                                                          lower_bound=25,)\n\n[//]: # (                                                                          upper_bound=75&#41;]&#41;,)\n\n[//]: # (                           datatypes=[Real&#40;bounds=&#40;0, 10&#41;&#41;,)\n\n[//]: # (                                      Real&#40;bounds=&#40;-50, 50&#41;&#41;,)\n\n[//]: # (                                      Choice&#40;options=[0, 1, 2]&#41;],)\n\n[//]: # (                           # # optional parameters)\n\n[//]: # (                           # features_to_vary=..., )\n\n[//]: # (                           # bonus_objectives=...,)\n\n[//]: # (                           # datasets_validity=...,)\n\n[//]: # (                           # datasets_scores=...,)\n\n[//]: # (                           &#41;)\n\n[//]: # ()\n\n[//]: # (problem = MultiObjectiveProblem&#40;data_package=data_package,)\n\n[//]: # (                                prediction_function=lambda design: model.predict&#40;design&#41;,)\n\n[//]: # (                                constraint_functions=[]&#41;)\n\n[//]: # ()\n\n[//]: # (generator = CounterfactualsGenerator&#40;problem=problem,)\n\n[//]: # (                                     pop_size=10,)\n\n[//]: # (                                     initialize_from_dataset=False,)\n\n[//]: # (                                     verbose=True&#41;)\n\n[//]: # ()\n\n[//]: # (generator.generate&#40;n_generations=10&#41;)\n\n[//]: # (counterfactuals = generator.sample_with_dtai&#40;num_samples=10, gower_weight=1,)\n\n[//]: # (                                             avg_gower_weight=1, cfc_weight=1,)\n\n[//]: # (                                             diversity_weight=50&#41;)\n\n[//]: # (print&#40;counterfactuals&#41;)\n\n[//]: # (```)\n\n<!-- ROADMAP -->\n\n## Roadmap\n\n- [ ] We are currently working on support for gradient-based optimization\n\nSee the [open issues](https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues) for a full\nlist of proposed features (and\nknown issues).\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n\n\n<!-- CONTRIBUTING -->\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also\nsimply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n\n\n<!-- LICENSE -->\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n[//]: # (<p align=\"right\">&#40;<a href=\"#readme-top\">back to top</a>&#41;</p>)\n\n\n<!-- MARKDOWN LINKS & IMAGES -->\n<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->\n\n[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge\n\n[contributors-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/graphs/contributors\n\n[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge\n\n[forks-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/network/members\n\n[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge\n\n[stars-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/stargazers\n\n[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge\n\n[issues-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/issues\n\n[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge\n\n[license-url]: https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design/blob/master/LICENSE\n\n\n[python-badge-url]: https://img.shields.io/badge/language-python-purple\n\n[python-url]: https://www.python.org/\n\n[pandas-badge-url]: https://img.shields.io/badge/framework-pandas-red\n\n[pandas-url]: https://pandas.pydata.org/\n\n[numpy-badge-url]: https://img.shields.io/badge/framework-numpy-green\n\n[numpy-url]: https://numpy.org/\n\n[pymoo-badge-url]: https://img.shields.io/badge/framework-pymoo-blue\n\n[pymoo-url]: https://pymoo.org/\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Lyleregenwetter  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "MCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.",
    "version": "2024.2.22rc0",
    "project_urls": {
        "Homepage": "https://github.com/Lyleregenwetter/Multiobjective-Counterfactuals-for-Design"
    },
    "split_keywords": [
        "counterfactuals",
        "design",
        "multi-objective",
        "multiobjective",
        "machine-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "088430691423e094fdf5d22dfdd958c4d4ba91603d91516d6df860901c8bc5ca",
                "md5": "a6bfa5a00f4a98c0e7933c5c73105d73",
                "sha256": "55a87e108c3eefe1321dcc55e23c302ae28fdfd079a54e0d8a8c7423bb387196"
            },
            "downloads": -1,
            "filename": "decode_mcd-2024.2.22rc0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a6bfa5a00f4a98c0e7933c5c73105d73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 25952,
            "upload_time": "2024-02-22T20:29:16",
            "upload_time_iso_8601": "2024-02-22T20:29:16.529973Z",
            "url": "https://files.pythonhosted.org/packages/08/84/30691423e094fdf5d22dfdd958c4d4ba91603d91516d6df860901c8bc5ca/decode_mcd-2024.2.22rc0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59dda557314105e4819787085444dcb26c94e5361f476fc2f9be56f6c1da8662",
                "md5": "351e49cf26b163d8fd2c01f669e6eb98",
                "sha256": "963dc38da6b9c71859ff92278765be57aa73c54be1f2d00a8783b3bbcd7db8cf"
            },
            "downloads": -1,
            "filename": "decode-mcd-2024.2.22rc0.tar.gz",
            "has_sig": false,
            "md5_digest": "351e49cf26b163d8fd2c01f669e6eb98",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 35292,
            "upload_time": "2024-02-22T20:29:18",
            "upload_time_iso_8601": "2024-02-22T20:29:18.302082Z",
            "url": "https://files.pythonhosted.org/packages/59/dd/a557314105e4819787085444dcb26c94e5361f476fc2f9be56f6c1da8662/decode-mcd-2024.2.22rc0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-22 20:29:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Lyleregenwetter",
    "github_project": "Multiobjective-Counterfactuals-for-Design",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "about-time",
            "specs": [
                [
                    "==",
                    "4.2.1"
                ]
            ]
        },
        {
            "name": "alive-progress",
            "specs": [
                [
                    "==",
                    "3.1.4"
                ]
            ]
        },
        {
            "name": "autogluon.common",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "autogluon.core",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "autogluon.features",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "autogluon.tabular",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "autograd",
            "specs": [
                [
                    "==",
                    "1.6.2"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    "==",
                    "1.28.55"
                ]
            ]
        },
        {
            "name": "botocore",
            "specs": [
                [
                    "==",
                    "1.31.55"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.7.22"
                ]
            ]
        },
        {
            "name": "cffi",
            "specs": [
                [
                    "==",
                    "1.15.1"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "cma",
            "specs": [
                [
                    "==",
                    "3.2.2"
                ]
            ]
        },
        {
            "name": "contourpy",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "cryptography",
            "specs": [
                [
                    "==",
                    "41.0.4"
                ]
            ]
        },
        {
            "name": "cycler",
            "specs": [
                [
                    "==",
                    "0.11.0"
                ]
            ]
        },
        {
            "name": "Deprecated",
            "specs": [
                [
                    "==",
                    "1.2.14"
                ]
            ]
        },
        {
            "name": "dill",
            "specs": [
                [
                    "==",
                    "0.3.7"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.20.1"
                ]
            ]
        },
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.42.1"
                ]
            ]
        },
        {
            "name": "future",
            "specs": [
                [
                    "==",
                    "0.18.3"
                ]
            ]
        },
        {
            "name": "grapheme",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "6.8.0"
                ]
            ]
        },
        {
            "name": "importlib-resources",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "jaraco.classes",
            "specs": [
                [
                    "==",
                    "3.3.0"
                ]
            ]
        },
        {
            "name": "jeepney",
            "specs": [
                [
                    "==",
                    "0.8.0"
                ]
            ]
        },
        {
            "name": "jmespath",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "joblib",
            "specs": [
                [
                    "==",
                    "1.3.2"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "24.2.0"
                ]
            ]
        },
        {
            "name": "kiwisolver",
            "specs": [
                [
                    "==",
                    "1.4.5"
                ]
            ]
        },
        {
            "name": "markdown-it-py",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "mdurl",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.1.0"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    "==",
                    "3.1"
                ]
            ]
        },
        {
            "name": "nh3",
            "specs": [
                [
                    "==",
                    "0.2.14"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.1"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "1.5.3"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "10.0.1"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.9.6"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.5"
                ]
            ]
        },
        {
            "name": "pycparser",
            "specs": [
                [
                    "==",
                    "2.21"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.16.1"
                ]
            ]
        },
        {
            "name": "pymoo",
            "specs": [
                [
                    "==",
                    "0.6.0.1"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.1.1"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2023.3.post1"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "42.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    "==",
                    "13.5.3"
                ]
            ]
        },
        {
            "name": "s3transfer",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    "==",
                    "1.2.2"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.11.2"
                ]
            ]
        },
        {
            "name": "SecretStorage",
            "specs": [
                [
                    "==",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "threadpoolctl",
            "specs": [
                [
                    "==",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.66.1"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "tzdata",
            "specs": [
                [
                    "==",
                    "2023.3"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.16"
                ]
            ]
        },
        {
            "name": "wrapt",
            "specs": [
                [
                    "==",
                    "1.15.0"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.17.0"
                ]
            ]
        }
    ],
    "lcname": "decode-mcd"
}
        
Elapsed time: 0.18803s