Skip to content

Commit

Permalink
Merge pull request #15 from lbluque/main
Browse files Browse the repository at this point in the history
Remove normalize, fix solver options, and file cleanup
  • Loading branch information
lbluque authored Aug 31, 2022
2 parents d71ee5d + e5a3bd9 commit 722ef09
Show file tree
Hide file tree
Showing 14 changed files with 270 additions and 363 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: enhancement
---

<!--
Thank you for contributing ideas to smol!
Thank you for contributing ideas to sparse-lm!
Please fill in as much of the template below as you're able.
-->
Expand Down
27 changes: 14 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

# ci: when open add this
# autoupdate_schedule: monthly
ci:
autoupdate_schedule: monthly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -54,23 +54,24 @@ repos:
- --expand-star-imports
- --ignore-init-module-imports

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
files: ^smol/
language_version: python3
additional_dependencies:
- flake8-typing-imports==1.10.1
# flake8 can not be configured in pytoml, so line lengths will cause many failures
#- repo: https://github.com/PyCQA/flake8
# rev: 5.0.4
# hooks:
# - id: flake8
# files: ^sparselm/
# language_version: python3
# additional_dependencies:
# - flake8-typing-imports==1.10.1
# - flake8-docstrings==1.6.0 # fix these
# - flake8-rst-docstrings==0.2.3
- flake8-rst==0.8.0
# - flake8-rst-docstrings==0.2.3
# - flake8-rst==0.8.0

- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
files: ^smol/
files: ^sparselm/

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Sparse Linear Regression Models
===============================

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/CederGroupHub/sparse-lm/main.svg)](https://results.pre-commit.ci/latest/github/CederGroupHub/sparse-lm/main)
[![pypi version](https://img.shields.io/pypi/v/sparse-lm?color=blue)](https://pypi.org/project/sparse-lm)

> :warning: this package is currently largely lacking in unit-tests.
> Use at your own risk!
Expand Down
18 changes: 8 additions & 10 deletions sparselm/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
"""Classes implementing generalized linear regression estimators."""

from sparselm.model.adaptive_lasso import (
from sparselm.model._adaptive_lasso import (
AdaptiveGroupLasso,
AdaptiveLasso,
AdaptiveOverlapGroupLasso,
AdaptiveRidgedGroupLasso,
AdaptiveSparseGroupLasso,
)
from sparselm.model.lasso import (
from sparselm.model._lasso import (
GroupLasso,
Lasso,
OverlapGroupLasso,
RidgedGroupLasso,
SparseGroupLasso,
)
from sparselm.model.miqp.best_subset import (
BestGroupSelection,
BestSubsetSelection,
RidgedBestGroupSelection,
RidgedBestSubsetSelection,
)
from sparselm.model.miqp.regularized_l0 import (
from sparselm.model._ols import OrdinaryLeastSquares
from sparselm.model.miqp import (
L1L0,
L2L0,
BestGroupSelection,
BestSubsetSelection,
GroupedL0,
GroupedL2L0,
RegularizedL0,
RidgedBestGroupSelection,
RidgedBestSubsetSelection,
)
from sparselm.model.ols import OrdinaryLeastSquares

__all__ = [
"OrdinaryLeastSquares",
Expand Down
Loading

0 comments on commit 722ef09

Please sign in to comment.