Upload preprocessing.py with huggingface_hub
Browse files- preprocessing.py +4 -1
preprocessing.py
CHANGED
|
@@ -3,7 +3,10 @@ from sklearn.base import BaseEstimator, TransformerMixin
|
|
| 3 |
|
| 4 |
|
| 5 |
class IQRCapper(BaseEstimator, TransformerMixin):
|
| 6 |
-
"""Winsorise each feature at the IQR fence learned from the fitted (training) data only.
|
|
|
|
|
|
|
|
|
|
| 7 |
def __init__(self, factor=1.5):
|
| 8 |
self.factor = factor
|
| 9 |
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
class IQRCapper(BaseEstimator, TransformerMixin):
|
| 6 |
+
"""Winsorise each feature at the IQR fence learned from the fitted (training) data only.
|
| 7 |
+
Defined in a standalone module so the saved pipeline can be reloaded outside the
|
| 8 |
+
notebook (e.g. in the Streamlit app), avoiding 'Can't get attribute IQRCapper'.
|
| 9 |
+
"""
|
| 10 |
def __init__(self, factor=1.5):
|
| 11 |
self.factor = factor
|
| 12 |
|