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: Add a -1 detection in the log_distribution_plot function #375

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ For more details: Please refer to:
The following screenshot shows the downloads and launching of our software on macOS:

<p align="center">
<img src="https://github.com/ZJUEarthData/geochemistrypi/assets/47497750/70728795-59b7-4741-ab5b-9e63d284ad37" alt="Downloads and Launching on macOS" width="450" />
<img src="https://github.com/user-attachments/assets/4fa0e2e7-20ad-4548-ab6c-ca5f26ba0106" alt="Downloads and Launching on macOS" width="450" />
</p>

## Roadmap
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sphinx_rtd_theme

project = "Geochemistry π"
copyright = "2023, ZJUEarthData"
copyright = "2024, ZJUEarthData"
author = "ZJUEarthData"
# release = 'v0.1.0'

Expand Down
3 changes: 3 additions & 0 deletions geochemistrypi/data_mining/plot/statistic_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def log_distribution_plot(col: pd.Index, df: pd.DataFrame) -> None:
df : pd.DataFrame
The data set.
"""
# Replace -1 with -1.0001
df[col] = df[col].replace(-1, -1.0001)

# Log transform the required columns
df_log_transformed = df[col].applymap(lambda x: np.log(x + 1))

Expand Down
Loading