icol 0.10.0__py3-none-any.whl → 0.10.2__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.
- icol/logistic_icol.py +5 -7
- {icol-0.10.0.dist-info → icol-0.10.2.dist-info}/METADATA +1 -1
- icol-0.10.2.dist-info/RECORD +9 -0
- icol-0.10.0.dist-info/RECORD +0 -9
- {icol-0.10.0.dist-info → icol-0.10.2.dist-info}/LICENSE +0 -0
- {icol-0.10.0.dist-info → icol-0.10.2.dist-info}/WHEEL +0 -0
- {icol-0.10.0.dist-info → icol-0.10.2.dist-info}/top_level.txt +0 -0
icol/logistic_icol.py
CHANGED
|
@@ -131,7 +131,7 @@ class LOGISTIC_ADALASSO:
|
|
|
131
131
|
nonancols = np.isnan(X).sum(axis=0)==0
|
|
132
132
|
noinfcols = np.isinf(X).sum(axis=0)==0
|
|
133
133
|
valcols = np.logical_and(nonancols, noinfcols)
|
|
134
|
-
if self.gamma <= 1e-10:
|
|
134
|
+
if np.abs(self.gamma) <= 1e-10:
|
|
135
135
|
beta_hat = np.ones(X.shape[1])
|
|
136
136
|
w_hat = np.ones(X.shape[1])
|
|
137
137
|
X_star_star = X.copy()
|
|
@@ -159,9 +159,10 @@ class LOGISTIC_ADALASSO:
|
|
|
159
159
|
break
|
|
160
160
|
|
|
161
161
|
self.model_idx = best_idx
|
|
162
|
-
self.coef_idx_ = np.arange(len(self.coef_))[np.abs(np.ravel(self.coef_)) > self.eps_nnz]
|
|
163
|
-
|
|
164
162
|
beta_hat_star_star = self.models[self.model_idx].coef_.ravel()
|
|
163
|
+
|
|
164
|
+
self.coef_idx_ = np.arange(len(beta_hat_star_star))[np.abs(np.ravel(beta_hat_star_star)) > self.eps_nnz]
|
|
165
|
+
|
|
165
166
|
beta_hat_star_n_valcol = np.array([beta_hat_star_star[j]/w_hat[j] for j in range(len(beta_hat_star_star))])
|
|
166
167
|
beta_hat_star_n = np.zeros(X.shape[1])
|
|
167
168
|
beta_hat_star_n[valcols] = beta_hat_star_n_valcol
|
|
@@ -171,7 +172,6 @@ class LOGISTIC_ADALASSO:
|
|
|
171
172
|
self.model.coef_ = self.coef_
|
|
172
173
|
|
|
173
174
|
return self
|
|
174
|
-
|
|
175
175
|
|
|
176
176
|
def _count_nnz(self, coef):
|
|
177
177
|
return int(np.sum(
|
|
@@ -179,9 +179,7 @@ class LOGISTIC_ADALASSO:
|
|
|
179
179
|
))
|
|
180
180
|
|
|
181
181
|
def __str__(self):
|
|
182
|
-
|
|
183
|
-
params_str = ", ".join(f"{k}={params[k]!r}" for k in sorted(params))
|
|
184
|
-
return f"LogisticLasso({params_str})"
|
|
182
|
+
return f"Logistic{0}Lasso".format("Ada" if np.abs(self.gamma)<=1e-10 else '')
|
|
185
183
|
|
|
186
184
|
def decision_function(self, X):
|
|
187
185
|
return np.dot(X, self.model.coef_.ravel())
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
icol/__init__.py,sha256=nnhJPjnFCpho8OB-5q-Mq8J91EeCV_o3KVO-lLC8tQY,173
|
|
2
|
+
icol/feature_expansion.py,sha256=frWmfvneP1lFxMm-b_oVoRT2zvLk2WpqBM1Pzpb2rJQ,12520
|
|
3
|
+
icol/icol.py,sha256=uZihshYZydEL4gU32CWVtx5CsTr-fuypZER5gwLSaPU,29228
|
|
4
|
+
icol/logistic_icol.py,sha256=4K3CvgckaIUj19FNNSww9-9kY0VyN5A3e8d6Lb8lsk0,16365
|
|
5
|
+
icol-0.10.2.dist-info/LICENSE,sha256=aD00NFSvGfojy-IWFmtKpeSg262O0dWzmsfXAaT0xuk,1070
|
|
6
|
+
icol-0.10.2.dist-info/METADATA,sha256=ME6sk7A2YsIPzxwN99FyZHreWz1E7n3VZGbHfyD1hpU,1978
|
|
7
|
+
icol-0.10.2.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
|
|
8
|
+
icol-0.10.2.dist-info/top_level.txt,sha256=OKisIKQUWtt2x-hxR53qbTr2AR3kdeRfTChIdmn2sDY,5
|
|
9
|
+
icol-0.10.2.dist-info/RECORD,,
|
icol-0.10.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
icol/__init__.py,sha256=nnhJPjnFCpho8OB-5q-Mq8J91EeCV_o3KVO-lLC8tQY,173
|
|
2
|
-
icol/feature_expansion.py,sha256=frWmfvneP1lFxMm-b_oVoRT2zvLk2WpqBM1Pzpb2rJQ,12520
|
|
3
|
-
icol/icol.py,sha256=uZihshYZydEL4gU32CWVtx5CsTr-fuypZER5gwLSaPU,29228
|
|
4
|
-
icol/logistic_icol.py,sha256=L3t60n29x-7NQ6ZH0gJDP82QWzyphW11C-TFucL0B2c,16413
|
|
5
|
-
icol-0.10.0.dist-info/LICENSE,sha256=aD00NFSvGfojy-IWFmtKpeSg262O0dWzmsfXAaT0xuk,1070
|
|
6
|
-
icol-0.10.0.dist-info/METADATA,sha256=NcX0bGJ6JmESs4u4WTVBaa87n1lVuVsJLvHPfyd6ewQ,1978
|
|
7
|
-
icol-0.10.0.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
|
|
8
|
-
icol-0.10.0.dist-info/top_level.txt,sha256=OKisIKQUWtt2x-hxR53qbTr2AR3kdeRfTChIdmn2sDY,5
|
|
9
|
-
icol-0.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|