icol 0.9.5__tar.gz → 0.9.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: icol
3
- Version: 0.9.5
3
+ Version: 0.9.6
4
4
  Summary: Iterative Correlation Learning implementation
5
5
  Author-email: Simon Teshuva <simon.teshuva@gmail.com>
6
6
  License: MIT
@@ -123,10 +123,9 @@ class LOGISTIC_LASSO:
123
123
  'clp': self.clp
124
124
  }
125
125
 
126
- def __repr__(self):
127
- params = self.get_params()
128
- params_str = ", ".join(f"{k}={params[k]!r}" for k in sorted(params))
129
- return f"LogisticLasso({params_str})"
126
+ def __repr__(self, prec=3):
127
+ coef = self.model.coef_.ravel()
128
+ return ''.join([('+' if c > 0 else '') + sci(c, sig=prec) + '(' + self.feature_names[i] + ')' for i, c in enumerate(coef) if (np.abs(coef[i]) > self.eps_nnz)])
130
129
 
131
130
  def fit(self, X, y, d, feature_names=None, verbose=False):
132
131
  self.feature_names = ['X_{0}'.format(i) for i in range(X.shape[1])] if feature_names is None else feature_names
@@ -152,9 +151,10 @@ class LOGISTIC_LASSO:
152
151
  np.abs(np.ravel(coef)) > self.eps_nnz
153
152
  ))
154
153
 
155
- def __str__(self, prec=3):
156
- coef = self.model.coef_.ravel()
157
- return ''.join([('+' if c > 0 else '') + sci(c, sig=prec) + '(' + self.feature_names[i] + ')' for i, c in enumerate(coef) if (np.abs(coef[i]) > self.eps_nnz)])
154
+ def __str__(self):
155
+ params = self.get_params()
156
+ params_str = ", ".join(f"{k}={params[k]!r}" for k in sorted(params))
157
+ return f"LogisticLasso({params_str})"
158
158
 
159
159
  def decision_function(self, X):
160
160
  return np.dot(X, self.model.coef_.ravel())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: icol
3
- Version: 0.9.5
3
+ Version: 0.9.6
4
4
  Summary: Iterative Correlation Learning implementation
5
5
  Author-email: Simon Teshuva <simon.teshuva@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "icol"
3
- version = "0.9.5"
3
+ version = "0.9.6"
4
4
  description = "Iterative Correlation Learning implementation"
5
5
  authors = [
6
6
  { name = "Simon Teshuva", email = "simon.teshuva@gmail.com" }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes