scm2cpp-lasso 0.5.0.1__tar.gz → 0.5.2__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.
Files changed (19) hide show
  1. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/PKG-INFO +1 -1
  2. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/pyproject.toml +1 -1
  3. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/__init__.py +12 -1
  4. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso.egg-info/PKG-INFO +1 -1
  5. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/README.md +0 -0
  6. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/setup.cfg +0 -0
  7. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/setup.py +0 -0
  8. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/__init__.py +0 -0
  9. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/_loader.py +0 -0
  10. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/lasso_cov.cpp +0 -0
  11. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/lasso_cov.hpp +0 -0
  12. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/lasso_cov_capi.cpp +0 -0
  13. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_generated/scm2cpp.hpp +0 -0
  14. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/_libfind.py +0 -0
  15. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso/batch_capi.cu +0 -0
  16. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso.egg-info/SOURCES.txt +0 -0
  17. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso.egg-info/dependency_links.txt +0 -0
  18. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso.egg-info/requires.txt +0 -0
  19. {scm2cpp_lasso-0.5.0.1 → scm2cpp_lasso-0.5.2}/src/scm2cpp_lasso.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scm2cpp-lasso
3
- Version: 0.5.0.1
3
+ Version: 0.5.2
4
4
  Summary: Lasso by covariance-update coordinate descent, translated from Scheme to C++ by scm2cpp; GPU batch solver included
5
5
  Author: Hirotaka Niitsuma
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scm2cpp-lasso"
7
- version = "0.5.0.1"
7
+ version = "0.5.2"
8
8
  description = "Lasso by covariance-update coordinate descent, translated from Scheme to C++ by scm2cpp; GPU batch solver included"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -31,7 +31,7 @@ from ._libfind import load_batch_lib
31
31
 
32
32
  __all__ = ["CovLasso", "CovRidge", "CovLogistic", "CovGroupLasso",
33
33
  "cuda_available", "kernel"]
34
- __version__ = "0.5.0.1"
34
+ __version__ = "0.5.2"
35
35
 
36
36
  _BATCH = load_batch_lib()
37
37
  _DP = ctypes.POINTER(ctypes.c_double)
@@ -141,6 +141,17 @@ class CovLasso:
141
141
 
142
142
  # ---------------------------- fitting ----------------------------
143
143
 
144
+ def fit(self, lam, **kw):
145
+ """Coefficients at one lambda.
146
+
147
+ A single penalty is the one-element special case of the path:
148
+ the Gram matrix was built in the constructor, so this costs one
149
+ descent and nothing per row -- and a warm-started path over a
150
+ whole grid costs barely more, which is why fit_path is the
151
+ primary interface rather than this convenience.
152
+ """
153
+ return self.fit_path([lam], **kw)[0]
154
+
144
155
  def fit_path(self, lambdas, tol=1e-8, chunk=20, max_sweeps=100000,
145
156
  l1_ratio=1.0):
146
157
  """Coefficients per lambda, each warm-started from the last.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scm2cpp-lasso
3
- Version: 0.5.0.1
3
+ Version: 0.5.2
4
4
  Summary: Lasso by covariance-update coordinate descent, translated from Scheme to C++ by scm2cpp; GPU batch solver included
5
5
  Author: Hirotaka Niitsuma
6
6
  License: MIT
File without changes
File without changes
File without changes