EvoEulerAP: Evolving Area-Proportional Euler and Venn Diagrams with Specific Properties
Project description
EvoEulerAP: Evolving Area-Proportional Euler and Venn Diagrams with Specific Properties
To the best of our knowledge, EvoEulerAP is the first area-proportional Euler and Venn diagram generation method that returns a set of non-dominated solutions (diagrams). Before optimization, a single shape type (an ellipse or an arbitrary simple closed shape with smoothing applied where possible) has to be chosen as the curve shape for all diagrams. Each solution is evaluated with six objectives (stress, missing zone, unwanted zone, triple point, concurrency, and disconnected zone) that together minimize area error and violations of well-matchedness and well-formedness properties.
EvoEulerAP is available as a Python package with both a web interface and an application programming interface (API). It extends EvoEuler, which generates non-area-proportional Euler and Venn diagrams with specific properties.
Installation
Run the following command to install EvoEulerAP:
pip install evoeulerap
Web Interface
Run the following command to launch the web interface:
evoeulerap
API
The example below shows the use of all functions provided by the API.
The supported algorithms for the API are: NSGA-II and NSGA-III.
The supported shapes for the API are: ellipse and arbitrary_shape.
If n_process is not set, all available logical CPU cores are used for parallelization.
"""Search for area-proportional 3-set Euler diagrams with ellipses."""
import matplotlib.pyplot as plt
from evoeulerap import (
diagram,
metrics,
obj_values,
optimize,
pcp,
shape_params,
zone_info,
)
if __name__ == "__main__":
area_spec = {
"A": 0.205,
"B": 0.116,
"C": 0.292,
"A C": 0.104,
"B C": 0.146,
}
# Start an optimization.
result = optimize(
area_spec=area_spec,
shape="ellipse",
algorithm="NSGA-II",
n_gen=100,
n_process=1,
)
# Print the number of non-dominated solutions.
print(f"Number of non-dominated solutions: {len(result)}")
# Show the parallel coordinates plot that visualizes the set of
# non-dominated solutions.
fig = pcp(result)
fig.show()
solution_idx = 0 # Solution index
# Show the diagram of a non-dominated solution.
diagram(
result[solution_idx], show_target_areas=True, shade_unwanted_zones=True
)
plt.show()
# Print the objective values of a non-dominated solution.
print("Objective values:")
print(obj_values(result[solution_idx]))
# Print the metrics of a non-dominated solution.
print("Metrics:")
print(metrics(result[solution_idx]))
# Print the zone information of a non-dominated solution.
print("Zone info:")
print(zone_info(result[solution_idx]))
# Print the shape parameters of a non-dominated solution.
print("Shape params:")
print(shape_params(result[solution_idx]))
Examples
Some example scripts for searching area-proportional Euler or Venn diagrams are in ./examples.
Contact
If you have any questions, please contact Chi Ho Chan at c.chan3@napier.ac.uk.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evoeulerap-1.0.0.tar.gz.
File metadata
- Download URL: evoeulerap-1.0.0.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76d40e746828871d05be21727a539d022d63ee33564aa154786b787cf438ce30
|
|
| MD5 |
97ec9d07f36c69b160dcea9c3f414340
|
|
| BLAKE2b-256 |
31d3a6697d117d799dba44d1ff11d17f34a8974a11ac41516e43358b7aee48ef
|
File details
Details for the file evoeulerap-1.0.0-py3-none-any.whl.
File metadata
- Download URL: evoeulerap-1.0.0-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56229b2fbefd0f9ebb7f64c6fa3a71c5eb6047f2e3e14c84cdbd88a920fcc05c
|
|
| MD5 |
2791b07c62686b613533312b153f0333
|
|
| BLAKE2b-256 |
a3bee5a33f7df015feafa406b233c6a1386005901c8453c5d567145a8f82bbcd
|