Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix fitness and constraint plots #80

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jennmald
Copy link
Contributor

@jennmald jennmald commented Jan 2, 2025

  • Fix the fitness plot issue, plots do not appear when they are supposed to
  • add in the constraint plots using log_total_constraints

@jennmald jennmald marked this pull request as ready for review January 10, 2025 15:27
@jennmald
Copy link
Contributor Author

jennmald commented Jan 10, 2025

@thomaswmorris I fixed up the broken plots and tried to follow your advice on the constraint plots. There are some constraint plots that look right and others that definitely don't. Can you review if those plots should even be included? Let me know what you think.

@thomaswmorris
Copy link
Contributor

These already look a lot better. Which constraint plots are weird? Also, could you add the bad samples (maybe as a bunch of black x's) in the leftmost column?

@jennmald
Copy link
Contributor Author

jennmald commented Jan 14, 2025

@thomaswmorris there are occasional plots that look like this:
Screenshot 2025-01-14 at 1 17 23 PM
where all the values in the dataset are the same.

Also what determines a "bad" point? Is there some threshold I should be computing?

@thomaswmorris
Copy link
Contributor

"Bad" points are the nan values in agent.train_targets(). The constant values are normal, when there are no bad points the agent predicts all other points to be good with probability 1.

@jennmald
Copy link
Contributor Author

@thomaswmorris if there are nan values in agent.train_targets() the _nanquantile function makes all points in the scatter plot not visible. There is no way I have found to determine which points correlate to np.nan values.
For example:
I made values the same as in the test but then injected a np.nan value at the end of the list for the last point. When the code hits:

values = obj._untransform(targets)
val_vmin, val_vmax = np.nanquantile(values, q=[0.01, 0.99])`
val_norm = (
            mpl.colors.LogNorm(val_vmin, val_vmax) if obj.transform == "log" else mpl.colors.Normalize(val_vmin, val_vmax)
        )

then the val_norm and everything after that is np.nan, so no values appear on the plot. Any advice on how to approach this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants