-
Couldn't load subscription status.
- Fork 11
Add new plots for population Diversity #113
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
Conversation
|
Hello @gkirgizov! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2023-06-08 07:15:29 UTC |
Codecov Report
@@ Coverage Diff @@
## main #113 +/- ##
==========================================
- Coverage 74.84% 74.55% -0.30%
==========================================
Files 122 123 +1
Lines 6849 6920 +71
==========================================
+ Hits 5126 5159 +33
- Misses 1723 1761 +38
|
|
Отлично, больше доступных визуализаций всегда лучше, чем меньше. Подскажи, diversity всегда измеряешь как разнообразие значений в используемой метрике? Оценивается ли разнообразие состава узлов графа? |
|
А в структурах проверяется только полное совпадение? Может добавить что-то вроде распределения попарных расстояний между графами? |
И то, и другое. |
Да, полное. Можно добавить такое распределение, пожалуй. Попробую UPD |
Может сделать какую-то приближенную оценку? Сравнивать хотя бы совпадение вектора вершин и вектора ребер. В стиле "0 - совпадают полностью, различаются гиперпараметры - плюс <число различающихся вершин>, различаются типы моделей - плюс<число различающихся вершин>, различаются ребра (в предположении что ребро это пара вершин) - плюс число ребер. Чтобы было проще отлавливать ситуации, когда различия есть, но около-минимальны. Но наверное уже не в этом PR, в любом случае. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Небольшое пожелание: две шкалы это удобно, но глаза теряются. Предлагаю немного поразмыслить, каким образом визуально выделить показатель для правой шкалы. Пока в голову приходит отрисовка его пунктиром или проекции от линии на соответствующую ось.
Если выйдет запарно/некрасиво, то пусть будет как есть
| class DiversityLine(HistoryVisualization): | ||
| def visualize(self, show: bool = True, save_path: Optional[Union[os.PathLike, str]] = None): | ||
| return plot_diversity_dynamic(self.history, show=show, save_path=save_path, dpi=self.visuals_params['dpi']) | ||
|
|
||
|
|
||
| class DiversityPopulation(HistoryVisualization): | ||
| def visualize(self, save_path: Union[os.PathLike, str], fps: int = 4): | ||
| return plot_diversity_dynamic_gif(self.history, filename=save_path, fps=fps, dpi=self.visuals_params['dpi']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавь, пожалуйста, докстринги - методам visualize. Для diversity line были сомнения, как его читать, пока не залез в код.
Upd: если понятнее оформить визуал у diversity line, то отсутвие описания не критично.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавил комменты
Можно, например, сделать цветную подпись у правой шкалы, как в этом примере |
Цветовая ассоциация полезна, да. Вот обновленный вариант с более понятными подпиясми осей к тому же. |
* WIP add plot of std of fitness for estimating diversity after the run * WIP add plot of fitness diversity for GIF * WIP diversity plot gif * WIP diversity plot gif in experiment * Fix diversity plot to be correct after all * WIP violin plot * Add unique ratio to the graph * Make violinplot instead of histograms in Diversity * DIV PLOT: upd add saving to diversity plot * Drop unused code from diversi * Move diversity.py to visualisation * WIP Add limits to diversity plot & better legend * Integrate diversity viz into OptHistoryVizualizer * Fix pep8 issues * Make diversity plot a bit clearer,add comments * Change plot color
Add 2 new kinds of plot for estimating diversity of populations based on OptHistory.
Done as additional functionality during work on #89
Usage example:
2 examples: below for multi-objective optimization with 4 metrics at once: