lecrapaud 0.19.0__py3-none-any.whl → 0.19.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lecrapaud might be problematic. Click here for more details.

@@ -272,10 +272,13 @@ class Experiment(Base):
272
272
  return None
273
273
 
274
274
  # Normalize scores (subtract min and divide by range)
275
+ # Guard against division by zero when only one observation or all equal
275
276
  min_rmse = min(rmse_scores)
276
- range_rmse = max(rmse_scores) - min_rmse
277
+ max_rmse = max(rmse_scores)
278
+ range_rmse = max_rmse - min_rmse
277
279
  min_logloss = min(logloss_scores)
278
- range_logloss = max(logloss_scores) - min_logloss
280
+ max_logloss = max(logloss_scores)
281
+ range_logloss = max_logloss - min_logloss
279
282
 
280
283
  # Calculate combined score for each experiment
281
284
  experiment_scores = []
@@ -283,9 +286,17 @@ class Experiment(Base):
283
286
  if experiment.avg_rmse is None or experiment.avg_logloss is None:
284
287
  continue
285
288
 
286
- # Normalize both scores
287
- norm_rmse = (experiment.avg_rmse - min_rmse) / range_rmse
288
- norm_logloss = (experiment.avg_logloss - min_logloss) / range_logloss
289
+ # Normalize both scores (safe when range == 0)
290
+ norm_rmse = (
291
+ 0.0
292
+ if range_rmse == 0
293
+ else (experiment.avg_rmse - min_rmse) / range_rmse
294
+ )
295
+ norm_logloss = (
296
+ 0.0
297
+ if range_logloss == 0
298
+ else (experiment.avg_logloss - min_logloss) / range_logloss
299
+ )
289
300
 
290
301
  # Calculate combined score (average of normalized scores)
291
302
  combined_score = (norm_rmse + norm_logloss) / 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lecrapaud
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: Framework for machine and deep learning, with regression, classification and time series analysis
5
5
  License: Apache License
6
6
  Author: Pierre H. Gallet
@@ -15,7 +15,7 @@ lecrapaud/db/alembic/versions/2025_08_28_1622-8b11c1ba982e_change_name_column.py
15
15
  lecrapaud/db/alembic.ini,sha256=Zw2rdwsKV6c7J1SPtoFIPDX08_oTP3MuUKnNxBDiY8I,3796
16
16
  lecrapaud/db/models/__init__.py,sha256=Lhyw9fVLdom0Fc6yIP-ip8FjkU1EwVwjae5q2VM815Q,740
17
17
  lecrapaud/db/models/base.py,sha256=Sc6g38LsNsjn9-qpWOMSsZlbUER0Xr56-yLIJLpTMDU,7808
18
- lecrapaud/db/models/experiment.py,sha256=HlaHnAdjTRo9q87FUWq83YlKw5vB_o1sULxUQdmuCvo,14869
18
+ lecrapaud/db/models/experiment.py,sha256=9eHQ6p_bcHr0UMWiJBetkAE79p_KO3rUVNTS6WIJpNQ,15265
19
19
  lecrapaud/db/models/feature.py,sha256=5o77O2FyRObnLOCGNj8kaPSGM3pLv1Ov6mXXHYkmnYY,1136
20
20
  lecrapaud/db/models/feature_selection.py,sha256=mk42xuw1Sm_7Pznfg7TNc5_S4hscdw79QgIe3Bt9ZRI,3245
21
21
  lecrapaud/db/models/feature_selection_rank.py,sha256=Ydsb_rAT58FoSH13wkGjGPByzsjPx3DITXgJ2jgZmow,2198
@@ -42,7 +42,7 @@ lecrapaud/misc/test-gpu-transformers.ipynb,sha256=k6MBSs_Um1h4PykvE-LTBcdpbWLbIF
42
42
  lecrapaud/model_selection.py,sha256=z6sMU6ZGaymZOWdJehPw4yaWdzcYTABWweyH5LvCJwk,76980
43
43
  lecrapaud/search_space.py,sha256=FCIEHZBK1pUQ4CphJuxwXY2N_BdrCelRzHsCXnNLlVI,36334
44
44
  lecrapaud/utils.py,sha256=ATKu9pbXjYFRa2YzBYjqyLHJrzfnZ7SJrOD_qAnEBYE,8242
45
- lecrapaud-0.19.0.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
46
- lecrapaud-0.19.0.dist-info/METADATA,sha256=VdLOpM5P_sI6pe2UBIcBwcrA8870ZBWUUmjBbZINQbI,11115
47
- lecrapaud-0.19.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
48
- lecrapaud-0.19.0.dist-info/RECORD,,
45
+ lecrapaud-0.19.1.dist-info/LICENSE,sha256=MImCryu0AnqhJE_uAZD-PIDKXDKb8sT7v0i1NOYeHTM,11350
46
+ lecrapaud-0.19.1.dist-info/METADATA,sha256=9wZednrJcXhbqdRGBLxo7pZnm78d8M2Z8lI34wJtR3o,11115
47
+ lecrapaud-0.19.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
48
+ lecrapaud-0.19.1.dist-info/RECORD,,