nasa / prog_models

The NASA Prognostic Model Package is a Python framework focused on defining and building models for prognostics (computation of remaining useful life) of engineering systems, and provides a set of prognostics models for select components developed within this framework, suitable for use in prognostics applications for these components.
123 stars 50 forks source link

Inplace noise #533

Closed teubert closed 1 year ago

teubert commented 1 year ago

Update noise functions to apply noise inplace instead of creating a new object. The result is that this operation will be quicker

github-actions[bot] commented 1 year ago

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

github-actions[bot] commented 1 year ago
Benchmarking Results From: Test Time (s)
import main 0.13102330000000006
import thrown object 0.5132448999999999
model initialization 0.12215889999999985
set noise 0.619515
simulate 0.2981739000000001
simulate with saving 0.9476546000000003
simulate with saving, dt 1.0341370000000003
simulate with printing results, dt 1.2424767
Plot results 14.907948200000002
Metrics 0.035403699999999816
Surrogate Model Generation 3.213050199999998
surrogate sim 1.1048641000000003
surrogate sim, dt 2.9791168
To: Test Time (s)
import main 0.12914899999999996
import thrown object 0.5061929000000001
model initialization 0.12025449999999993
set noise 0.6494559999999998
simulate 0.29730769999999973
simulate with saving 0.9458700999999996
simulate with saving, dt 1.0429357000000006
simulate with printing results, dt 1.2519
Plot results 14.6549135
Metrics 0.03556090000000012
Surrogate Model Generation 3.334836599999999
surrogate sim 1.1013827999999997
surrogate sim, dt 2.9855771000000004
codecov-commenter commented 1 year ago

Codecov Report

Merging #533 (6c29829) into dev (15ef14f) will decrease coverage by 0.29%. The diff coverage is 51.72%.

@@            Coverage Diff             @@
##              dev     #533      +/-   ##
==========================================
- Coverage   79.83%   79.54%   -0.29%     
==========================================
  Files          30       30              
  Lines        2405     2420      +15     
==========================================
+ Hits         1920     1925       +5     
- Misses        485      495      +10     
Impacted Files Coverage Δ
src/prog_models/utils/noise_functions.py 58.82% <51.72%> (-20.13%) :arrow_down: