diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d74fd5b1..aa9803ad 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -1,14 +1,14 @@ name: build_wheels -on: # [push, pull_request] - release: - types: - - created - workflow_dispatch: - inputs: - version: - description: 'Manually trigger wheel build in Github UI' - required: true +on: #[push, pull_request] + release: + types: + - created + workflow_dispatch: + inputs: + version: + description: 'Manually trigger wheel build in Github UI' + required: true jobs: @@ -17,7 +17,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, windows-latest, macos-latest] + os: [ubuntu-22.04, windows-latest, macos-latest] steps: - uses: actions/checkout@v2 @@ -28,12 +28,13 @@ jobs: python-version: '3.8' - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==1.10.0 + python -m pip install cibuildwheel==2.12.1 - name: Build wheels env: # We only build for Python 3.6+. On Linux manylinux2010 is used. # Skipping pypy wheels for now since scipy & scikit-learn haven't build them yet. - CIBW_SKIP: "pp* *p27* *p35*" + # Skip python3.11 for 32bit. + CIBW_SKIP: "pp* *-win32 *-manylinux_i686 *musllinux*" CIBW_TEST_REQUIRES: "pytest pandas scikit-learn" CIBW_TEST_COMMAND: "pytest --pyargs sklearn_extra" run: | diff --git a/pyproject.toml b/pyproject.toml index 44088477..24b7dfba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,3 +14,6 @@ requires = [ [tool.black] line-length = 79 + +[tool.cibuildwheel] +manylinux-i686-image = "manylinux2010" diff --git a/sklearn_extra/robust/robust_weighted_estimator.py b/sklearn_extra/robust/robust_weighted_estimator.py index 76140398..f421d2b8 100644 --- a/sklearn_extra/robust/robust_weighted_estimator.py +++ b/sklearn_extra/robust/robust_weighted_estimator.py @@ -129,13 +129,13 @@ class _RobustWeightedEstimator(BaseEstimator): Maximum number of iterations. For more information, see the optimization scheme of base_estimator. - c : float>0 or None, default=None + c : float>0 or None, default=1 Parameter used for Huber weighting procedure, used only if weightings is 'huber'. Measure the robustness of the weighting procedure. A small value of c means a more robust estimator. Can have a big effect on efficiency. If None, c is estimated at each step using half the Inter-quartile - range, this tends to be conservative (robust). + range, this tends to be unstable. k : int < sample_size/2, default=1 Parameter used for mom weighting procedure, used only if weightings @@ -211,7 +211,7 @@ def __init__( loss, weighting="huber", max_iter=100, - c=None, + c=1, k=0, tol=1e-5, n_iter_no_change=10,