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

[sml] add chi2 stats in jax #667

Merged
merged 2 commits into from
May 7, 2024

Conversation

lizzy-0323
Copy link
Contributor

Pull Request

What problem does this PR solve?

使用SPU实现chi2统计量的计算
Issue Number: Fixed #591

Possible side effects?

  • Performance:
    Test:
OK
Chi2 stats result:
[ 10.817831    3.7107298 116.31106    67.04839  ]
Sklearn chi2 stats result:
[ 10.81782088   3.7107283  116.31261309  67.0483602 ]
P value result:
[0.00416027 0.14996627 0.         0.        ]
Sklearn p value result:
[4.47651499e-03 1.56395980e-01 5.53397228e-26 2.75824965e-15]

Emulation:

=========================
Running time in Sklearn: 0.005s
=========================
Running time in SPU: 3.628s
=========================
Chi2 stats result:
[ 10.821831    3.7121124 116.352936   67.072624 ]
Sklearn chi2 stats result:
[ 10.81782088   3.7107283  116.31261309  67.0483602 ]
P value result:
[0.00415421 0.1498375  0.         0.        ]
Sklearn p value result:
[4.47651499e-03 1.56395980e-01 5.53397228e-26 2.75824965e-15]
[2024-04-25 12:54:47,659] Shutdown multiprocess cluster...
  • Backward compatibility:

sml/feature_selection/BUILD.bazel Outdated Show resolved Hide resolved
sml/feature_selection/univariate_selection.py Show resolved Hide resolved
sml/feature_selection/univariate_selection.py Outdated Show resolved Hide resolved
sml/feature_selection/univariate_selection.py Outdated Show resolved Hide resolved
sml/feature_selection/univariate_selection.py Outdated Show resolved Hide resolved
sml/feature_selection/univariate_selection.py Show resolved Hide resolved
@deadlywing
Copy link
Contributor

另外,,univariate_selection.py 这个文件缺少lisence

@deadlywing
Copy link
Contributor

以及,bazel文件的格式不对,,以下两个文件应该是缺少空行,您可以在本地用buildifier格式化后再push
sml/feature_selection/BUILD.bazel # reformat
sml/feature_selection/tests/BUILD.bazel # reformat

@lizzy-0323
Copy link
Contributor Author

已按照修改意见修改。

Copy link
Contributor

@deadlywing deadlywing left a comment

Choose a reason for hiding this comment

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

LGTM

@deadlywing deadlywing merged commit f9f9334 into secretflow:main May 7, 2024
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

使用SPU实现chi-squared统计量
2 participants