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

Feature metric jsd #66

Merged
merged 9 commits into from
Dec 17, 2023
Merged

Conversation

sjh120
Copy link
Collaborator

@sjh120 sjh120 commented Dec 15, 2023

Description

JSD实现

Motivation and Context

Resolves #40

How has this been tested?

通过修改1_ctgan_example.py中selected_columns字段选择要选取的列,isDiscrete字段表示是否选取离散列或连续列,将计算多列联合概率密度的JS散度

Types of changes

  • Maintenance (no change in code, maintain the project's CI, docs, etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link
Contributor

sweep-ai bot commented Dec 15, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link
Collaborator

@Wh1isper Wh1isper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all .idea/* files, you can add .idea/ in root's .gitignore

You can just pick .gitignore file in main branch: 35beee7#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947

@Wh1isper Wh1isper linked an issue Dec 16, 2023 that may be closed by this pull request
@MooooCat
Copy link
Contributor

@sjh120 Please sync the base class currently in branch "feature-metric-base".

This PR should only contains the following files:

  • example/1_ctgan_example.py
  • sdgx/metrics/column/jsd.py

sjh120 and others added 4 commits December 17, 2023 16:44
@sjh120
Copy link
Collaborator Author

sjh120 commented Dec 17, 2023

已修改,对base.py的修改为直接pull base class in branch "feature-metric-base"的结果

Copy link
Collaborator

@Wh1isper Wh1isper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as a demo.

But it's probably not a good idea to directly modify an existing example...

What do you think? @MooooCat

@MooooCat MooooCat merged commit 9bea673 into hitsz-ids:feature-metric-jsd Dec 17, 2023
2 checks passed
MooooCat added a commit that referenced this pull request Dec 18, 2023
* Feature metric jsd (#66)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* jsd

* jsd

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* base更新

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Delete .idea directory

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MoooCat <141886018+MooooCat@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>


* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* Update type hint and comments.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: sjh120 <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>
MooooCat added a commit that referenced this pull request Dec 18, 2023
* Update metric base-class

* Update column metric base class

* Update Metric Base Class

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* Feature: Add metric jsd (#66) (#71)

* Feature metric jsd (#66)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* jsd

* jsd

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* base更新

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Delete .idea directory

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MoooCat <141886018+MooooCat@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>


* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* Update type hint and comments.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: sjh120 <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix typo error

unnecessary imports are also removed.

* Add type hints and comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update input check methods

The format of some codes has also been adjusted.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>
Co-authored-by: Jinhang Su <171846802@qq.com>
Wh1isper added a commit that referenced this pull request Dec 18, 2023
* Update metric base-class

* Update column metric base class

* Update Metric Base Class

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* Feature: Add metric jsd (#66) (#71)

* Feature metric jsd (#66)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* jsd

* jsd

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* base更新

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Delete .idea directory

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MoooCat <141886018+MooooCat@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>


* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* Update type hint and comments.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------


Co-authored-by: Jinhang Su <171846802@qq.com>
Co-authored-by: sjh120 <171846802@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix typo error

unnecessary imports are also removed.

* Add type hints and comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update input check methods

The format of some codes has also been adjusted.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zhongsheng Ji <9573586@qq.com>
Co-authored-by: Jinhang Su <171846802@qq.com>
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.

[Feature]🌌Jensen–Shannon divergence Implementation
3 participants