Skip to content

Commit 7ed6e82

Browse files
committed
Update tree plotting
1 parent 47f4023 commit 7ed6e82

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Your `data-path` should be a file with a header containing only the comma-separa
109109
Assuming that you have run the program and stored the results in a JSON file, you can plot the tree produced by the algorithm.
110110

111111
```bash
112-
poetry run python exact_kmeans.plot_tree.py --output-json output.json --plot-folder plots
112+
poetry run python -m exact_kmeans.plot_tree --output-json output.json --plot-folder plots
113113
```
114114

115115
This will create a tree that looks like this:

exact_kmeans/plot_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def plot(
8383
jj = json.load(f)
8484
plot(
8585
nodes=jj["processed_cluster_sizes"],
86-
optimal_objective=jj["optimal_objective"],
86+
optimal_objective=jj["objective"] if "objective" in jj else None,
8787
filename=args.output_json.name,
8888
plot_folder=args.plot_folder,
8989
)

0 commit comments

Comments
 (0)