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

Min max scaler util #986

Merged
merged 26 commits into from
Jun 2, 2021
Merged

Min max scaler util #986

merged 26 commits into from
Jun 2, 2021

Conversation

ebamberg
Copy link
Contributor

Description

This is MinMaxScaler implementation similar to sklearn.preprocessing.MinMaxScaler.
wanted to share this with you, just in-case that such tooling is from interest to add to the djl repo.

I needed such function in some time-series-forecast-demo and I haven't seen a similar implementation in the repo. So mainly matches functionality I needed.

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2021

Codecov Report

Merging #986 (c13e322) into master (f2e56d5) will decrease coverage by 0.00%.
The diff coverage is 72.41%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #986      +/-   ##
============================================
- Coverage     70.04%   70.03%   -0.01%     
- Complexity     5085     5105      +20     
============================================
  Files           502      503       +1     
  Lines         22509    22579      +70     
  Branches       2355     2366      +11     
============================================
+ Hits          15766    15813      +47     
- Misses         5489     5499      +10     
- Partials       1254     1267      +13     
Impacted Files Coverage Δ
...c/main/java/ai/djl/training/util/MinMaxScaler.java 72.41% <72.41%> (ø)
.../src/main/java/ai/djl/pytorch/engine/PtEngine.java 47.61% <0.00%> (-8.64%) ⬇️
api/src/main/java/ai/djl/BaseModel.java 73.64% <0.00%> (-1.01%) ⬇️
api/src/main/java/ai/djl/inference/Predictor.java 90.38% <0.00%> (+2.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2e56d5...c13e322. Read the comment docs.

frankfliu and others added 2 commits May 30, 2021 10:36
Change-Id: I0728d39b4ade8cff0d85e0a63738aeded5acd7a4
@ebamberg
Copy link
Contributor Author

ebamberg commented Jun 1, 2021

added a function to detach to MinMaxScaler from NDManager

Change-Id: I407773a7453f9e72f47a3c0cd9bfaa2d331d0f2a
@frankfliu frankfliu merged commit 956ced8 into deepjavalibrary:master Jun 2, 2021
Lokiiiiii pushed a commit to Lokiiiiii/djl that referenced this pull request Oct 10, 2023
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.

3 participants