decode-mcd


Namedecode-mcd JSON
Version 1.0.0rc0 PyPI version JSON
download
home_pageNone
SummaryMCD generates counterfactuals that meet multiple, customizable objectives in both the feature and performance spaces.
upload_time2024-11-08 12:29:54
maintainerNone
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 autograd build cma contourpy cycler Deprecated dill fonttools grapheme importlib_metadata importlib_resources joblib kiwisolver matplotlib numpy packaging pandas pillow pymoo pyparsing pyproject_hooks python-dateutil pytz scikit-learn scipy six threadpoolctl tomli tzdata 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 is a framework to identify tractable "counterfactual" modifications to a design that achieve a set of desired properties. MCD searches for these counterfactuals by iteratively querying a set of property predictors provided by the user. MCD is capable of recommending design modifications 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>)


![Overview](MCD.png)

<!-- 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(x=x,
                           y=y,
                           x_datatypes=[Real(bounds=(0, 1))])

problem = MultiObjectiveProblem(data_package=data_package,
                                prediction_function=lambda design: predict(design),
                                x_query=x[0].reshape(1, 1),
                                y_targets=DesignTargets([ContinuousTarget(label=0,
                                                                          lower_bound=25,
                                                                          upper_bound=75)]),
                                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>)

## Citation

If you use MCD for research, please consider citing our [paper](https://arxiv.org/pdf/2305.11308):

Regenwetter, L., Abu Obaideh, Y., and Ahmed, F. (July 16, 2024). "MCD: A Model-Agnostic Counterfactual Search
Method For Multi-modal Design Modifications." ASME. J. Mech. Des. doi: https://doi.org/10.1115/1.4065998


<!-- 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": null,
    "name": "decode-mcd",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "counterfactuals, design, multi-objective, multiobjective, machine-learning",
    "author": "Lyle Regenwetter & Yazan Abu Obaideh",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5a/03/55f4415124aec5ca65f451f0c70d4f20b81085637e282e086c08b3672681/decode_mcd-1.0.0rc0.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 is a framework to identify tractable \"counterfactual\" modifications to a design that achieve a set of desired properties. MCD searches for these counterfactuals by iteratively querying a set of property predictors provided by the user. MCD is capable of recommending design modifications that meet multiple, customizable objectives in both the feature and performance spaces. \n    <br />\n\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![Overview](MCD.png)\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(x=x,\n                           y=y,\n                           x_datatypes=[Real(bounds=(0, 1))])\n\nproblem = MultiObjectiveProblem(data_package=data_package,\n                                prediction_function=lambda design: predict(design),\n                                x_query=x[0].reshape(1, 1),\n                                y_targets=DesignTargets([ContinuousTarget(label=0,\n                                                                          lower_bound=25,\n                                                                          upper_bound=75)]),\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## Citation\n\nIf you use MCD for research, please consider citing our [paper](https://arxiv.org/pdf/2305.11308):\n\nRegenwetter, L., Abu Obaideh, Y., and Ahmed, F. (July 16, 2024). \"MCD: A Model-Agnostic Counterfactual Search\nMethod For Multi-modal Design Modifications.\" ASME. J. Mech. Des. doi: https://doi.org/10.1115/1.4065998\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": "1.0.0rc0",
    "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": "244d8b87c877c35f5e2614daddadd647d4c72bf78af70ba23fe32a332b10fcbf",
                "md5": "1708ae25d2dc30a635cb008f0a8c2e15",
                "sha256": "dab733a7b22533aa0d5b96bf744db681fe4d4a81e7f212ce3f048dfb74d5a663"
            },
            "downloads": -1,
            "filename": "decode_mcd-1.0.0rc0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1708ae25d2dc30a635cb008f0a8c2e15",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26468,
            "upload_time": "2024-11-08T12:29:52",
            "upload_time_iso_8601": "2024-11-08T12:29:52.406558Z",
            "url": "https://files.pythonhosted.org/packages/24/4d/8b87c877c35f5e2614daddadd647d4c72bf78af70ba23fe32a332b10fcbf/decode_mcd-1.0.0rc0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a0355f4415124aec5ca65f451f0c70d4f20b81085637e282e086c08b3672681",
                "md5": "f625216ffc3aa5691332d03bba78c81c",
                "sha256": "67b0c164bba284d0cf1e0ac6f9178adc22491b55f8877d18ebb260216481fa58"
            },
            "downloads": -1,
            "filename": "decode_mcd-1.0.0rc0.tar.gz",
            "has_sig": false,
            "md5_digest": "f625216ffc3aa5691332d03bba78c81c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 35568,
            "upload_time": "2024-11-08T12:29:54",
            "upload_time_iso_8601": "2024-11-08T12:29:54.115083Z",
            "url": "https://files.pythonhosted.org/packages/5a/03/55f4415124aec5ca65f451f0c70d4f20b81085637e282e086c08b3672681/decode_mcd-1.0.0rc0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-08 12:29:54",
    "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.2.0"
                ]
            ]
        },
        {
            "name": "autograd",
            "specs": [
                [
                    "==",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.2.post1"
                ]
            ]
        },
        {
            "name": "cma",
            "specs": [
                [
                    "==",
                    "3.2.2"
                ]
            ]
        },
        {
            "name": "contourpy",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "cycler",
            "specs": [
                [
                    "==",
                    "0.12.1"
                ]
            ]
        },
        {
            "name": "Deprecated",
            "specs": [
                [
                    "==",
                    "1.2.14"
                ]
            ]
        },
        {
            "name": "dill",
            "specs": [
                [
                    "==",
                    "0.3.9"
                ]
            ]
        },
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.54.1"
                ]
            ]
        },
        {
            "name": "grapheme",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "importlib_metadata",
            "specs": [
                [
                    "==",
                    "8.5.0"
                ]
            ]
        },
        {
            "name": "importlib_resources",
            "specs": [
                [
                    "==",
                    "6.4.5"
                ]
            ]
        },
        {
            "name": "joblib",
            "specs": [
                [
                    "==",
                    "1.4.2"
                ]
            ]
        },
        {
            "name": "kiwisolver",
            "specs": [
                [
                    "==",
                    "1.4.7"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.9.2"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.2"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.3"
                ]
            ]
        },
        {
            "name": "pillow",
            "specs": [
                [
                    "==",
                    "11.0.0"
                ]
            ]
        },
        {
            "name": "pymoo",
            "specs": [
                [
                    "==",
                    "0.6.1.3"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.2.0"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2024.2"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    "==",
                    "1.5.2"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "threadpoolctl",
            "specs": [
                [
                    "==",
                    "3.5.0"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        },
        {
            "name": "tzdata",
            "specs": [
                [
                    "==",
                    "2024.2"
                ]
            ]
        },
        {
            "name": "wrapt",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.20.2"
                ]
            ]
        }
    ],
    "lcname": "decode-mcd"
}
        
Elapsed time: 0.39105s