cantalapiedra commited on
Commit
283af25
·
verified ·
1 Parent(s): bd697f4

Upload 12 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ application_train.csv filter=lfs diff=lfs merge=lfs -text
application_train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52e96b895b1112e1c853f670e58372719c8441c5ed1c57ac2f7fad559d784f5f
3
+ size 166133370
baseline_threshold.joblib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa32138b8041342c9e62cd68f33a50f393180dce7d50f5c6f6121cd6edacb2d0
3
+ size 117
eo_wrapper_with_proba.joblib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5eec80cd4902a6ed5d266565f56ccb69adfce1553e9bb037a612af2921303fd0
3
+ size 421260406
fn_baseline.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6823fa560adae6008d9e27c6a6b6b6fb104e307a80ea4cbebce2d8e5c72c8209
3
+ size 461766
fn_eo_hard.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5856770ebe94c8d083d0243fcd54823792bc01278501cf3be1f08583bd8c0d7
3
+ size 482009
fn_eo_opt.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b4b480d2c9e80a3c865548318b73d7a89a9af308765227e6e4b2fd4c1e0ee4d
3
+ size 450112
fp_baseline.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62af415f85ac12f1788da4cfa3ec8b5e01dccb0968342369f612108353882190
3
+ size 2183180
fp_eo_hard.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd0d5b0020cda21008f65f4ad9669614d359e5569bf4c241c3c6d4a519451ab3
3
+ size 2464114
fp_eo_opt.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b137d9c3e81746694272c80da5f51424e6aa103af63f23d0531a16d5b3513c1
3
+ size 2340415
lgbm_baseline.joblib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ad15c1edbe3f120addfbf172d7628b93baa4d22ee8e1f383c0760069c4d7e2a
3
+ size 374484
lgbm_eg_eqodds_mitigator.joblib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a1af1e18693a3cad8b4217afed43db0ae95c875320990c3d9a1ef528204354c
3
+ size 421260277
wrapper_eo.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+
3
+ class EOWrapper:
4
+ def __init__(self, mitigator, threshold):
5
+ self.mitigator = mitigator
6
+ self.threshold = threshold
7
+
8
+ def predict_proba(self, X):
9
+ proba_1 = np.zeros(X.shape[0])
10
+ for estimator, weight in zip(self.mitigator.predictors_, self.mitigator.weights_):
11
+ proba_1 += weight * estimator.predict_proba(X)[:, 1]
12
+ proba_1 = proba_1.reshape(-1)
13
+ return np.vstack([1 - proba_1, proba_1]).T
14
+
15
+ def predict(self, X):
16
+ proba_1 = self.predict_proba(X)[:, 1]
17
+ return (proba_1 >= self.threshold).astype(int)