Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
311 commits
Select commit Hold shift + click to select a range
14c0bc8
Update 0-install.ipynb
alejandroschuler Feb 28, 2020
e567477
Update 0-install.html
alejandroschuler Feb 28, 2020
13783dd
Update 0-install.ipynb
alejandroschuler Feb 28, 2020
cafc528
Update 0-install.html
alejandroschuler Feb 28, 2020
d0a3c10
testing doc building
alejandroschuler Feb 28, 2020
edd2b20
testing doc building
alejandroschuler Feb 28, 2020
880b691
testing doc building
alejandroschuler Feb 28, 2020
4dbadb2
testing doc building
alejandroschuler Feb 28, 2020
d000b5b
testing doc building
alejandroschuler Feb 28, 2020
65128b9
testing doc building
alejandroschuler Feb 28, 2020
d7a29d7
testing doc building
alejandroschuler Feb 28, 2020
9df1167
testing doc building
alejandroschuler Feb 28, 2020
5c335bc
testing doc building
alejandroschuler Feb 28, 2020
0f26b30
testing doc building
alejandroschuler Feb 28, 2020
1e99530
logo
alejandroschuler Feb 28, 2020
856a581
docs update
alejandroschuler Feb 28, 2020
b44c133
docs testing
alejandroschuler Feb 28, 2020
af4fe5f
remove _site redundancy in docs
alejandroschuler Feb 28, 2020
b1de4a7
Merge pull request #102 from stanfordmlgroup/dependabot/bundler/examp…
alejandroschuler Feb 28, 2020
6384dc9
rebuild docs
alejandroschuler Feb 28, 2020
2678717
rebuild docs
alejandroschuler Feb 28, 2020
38a152f
pickling now works for uncensored distscores
alejandroschuler Mar 7, 2020
661584a
comment
alejandroschuler Mar 8, 2020
b2854d2
fix classification sample code
tokoroten Mar 13, 2020
33bc305
Merge pull request #107 from tokoroten/fix_classification_sample_code
tonyduan Mar 13, 2020
543e540
Bugfix for NormalFixedVar.
tonyduan Mar 13, 2020
e8a0b3e
predictions always made at n_estimators unless max_iter specified man…
alejandroschuler Mar 14, 2020
5c6c416
Get long description from README.md
yutayamazaki Mar 20, 2020
a1c9a6b
Merge pull request #109 from yutayamazaki/improve-setup.py
tonyduan Mar 20, 2020
d1e568a
Create version.py
daikikatsuragawa Mar 21, 2020
65e3fad
Update setup.py
daikikatsuragawa Mar 21, 2020
85e8a0e
Update __init__.py
daikikatsuragawa Mar 21, 2020
bc3c09e
Update setup.py
daikikatsuragawa Mar 21, 2020
48c4482
Update version.py
daikikatsuragawa Mar 21, 2020
f9e90e5
Merge pull request #110 from daikikatsuragawa/version-numbering
tonyduan Mar 21, 2020
b24844f
Update manifold.py
daikikatsuragawa Mar 22, 2020
7edc70d
Update regression_sim.py
daikikatsuragawa Mar 22, 2020
7870fbf
Update distn.py
daikikatsuragawa Mar 22, 2020
c0df5b5
Update distn.py
daikikatsuragawa Mar 22, 2020
7603b56
Apply black
daikikatsuragawa Mar 22, 2020
1d4fdae
Merge pull request #111 from daikikatsuragawa/minor-fixes
tonyduan Mar 22, 2020
c7bd038
Update early stopping documentation for #113.
tonyduan Mar 30, 2020
2ae82bd
fixed sample weights to work with batching
alejandroschuler Mar 31, 2020
c981c15
potential bugfix in feature importance
alejandroschuler Mar 31, 2020
e3c78d4
Update early stopping documentation to fix #118.
tonyduan Apr 17, 2020
5acfefe
Fix inefficiency to address #121.
tonyduan May 6, 2020
34f2b0c
Update ngboost.py
saianil58 Jun 2, 2020
02c2119
Update ngboost.py
saianil58 Jun 2, 2020
eeea2d3
Update api.py
saianil58 Jun 2, 2020
cc07bf5
Update helpers.py
saianil58 Jun 2, 2020
c83672f
Fix typo in user guide.
tonyduan Jun 4, 2020
a9df99b
Merge pull request #129 from saianil58/patch-2
alejandroschuler Jun 4, 2020
7da1ca9
Update figure generation code.
tonyduan Jun 24, 2020
677b0fb
added Poisson regression
btatkinson Jul 3, 2020
6f02b25
NLL
btatkinson Jul 3, 2020
ab6f160
Update 0-install.ipynb
ryan-wolbeck Jul 9, 2020
501ad80
Merge pull request #148 from ryan-wolbeck/ryan-wolbeck-patch-1
tonyduan Jul 10, 2020
1424532
Fix typo in docs.
tonyduan Jul 10, 2020
935a3fb
Apply suggestions from code review
btatkinson Jul 13, 2020
eb28679
removed unnecessary function
btatkinson Jul 13, 2020
37c660b
add notebook example for running hypteropt with ngboost
Jul 14, 2020
8ee9e0c
add evalaution on the test set
Jul 15, 2020
88e224c
Merge pull request #151 from ryan-wolbeck/hyperopt-example
alejandroschuler Jul 15, 2020
0c5408e
add a missing init file for pytest to work in root
Jul 17, 2020
c872992
Bump version number.
tonyduan Jul 17, 2020
533a470
Merge pull request #153 from ryan-wolbeck/run-tests
alejandroschuler Jul 18, 2020
d460302
Update ngboost/distns/poisson.py
alejandroschuler Jul 20, 2020
7f741c1
remove arbitrary stability constant in fisher information
avati Aug 4, 2020
1e37703
version update
avati Aug 4, 2020
be40af1
add logic to check base python version required and bump version
Aug 6, 2020
cbcb1b2
apply black
Aug 6, 2020
3c4ff30
Merge pull request #165 from stanfordmlgroup/update-setup-py-3
ryan-wolbeck Aug 7, 2020
f72b5db
added poisson example
btatkinson Aug 17, 2020
ff293ee
fixed merge error
btatkinson Aug 17, 2020
ac05b3e
fixed merge error
btatkinson Aug 17, 2020
9d1d191
black formatting and removed placeholder
btatkinson Aug 17, 2020
da273f0
example hotfix
btatkinson Aug 17, 2020
e1a95a1
Merge pull request #143 from btatkinson/poisson_branch
alejandroschuler Aug 18, 2020
53e7d21
update version
Aug 18, 2020
136070c
Merge pull request #174 from stanfordmlgroup/update-poisson-release
alejandroschuler Aug 25, 2020
0d690ac
apply black
Aug 25, 2020
5296caa
lint updates to api.py
Aug 25, 2020
a493843
lint evaluation.py and apply black to api.py
Aug 25, 2020
7a7f7b0
lint scores and manifold
Aug 26, 2020
2b4345a
lint tests
Aug 26, 2020
13ba2aa
bump version
Aug 26, 2020
575075b
remove betabinom.py
Aug 26, 2020
d03c7a1
Merge pull request #175 from stanfordmlgroup/update-formatting
ryan-wolbeck Aug 26, 2020
f9fc18f
clean up in examples folder
Aug 26, 2020
deaae7f
lint on the figures folder
Aug 26, 2020
8fb1faf
fix delete of exp import
Aug 26, 2020
7c383de
update version
Aug 28, 2020
c5ca55b
Merge pull request #176 from stanfordmlgroup/more-linting
ryan-wolbeck Aug 31, 2020
0636565
Create MANIFEST.in and package license file
synapticarbors Sep 2, 2020
a42d639
Merge pull request #178 from synapticarbors/patch-1
ryan-wolbeck Sep 3, 2020
cd3594f
bump version
Sep 3, 2020
7382609
fix docstring for categorical
alejandroschuler Sep 4, 2020
b458fb0
Fix Laplace docs and add Laplace distribution.
tonyduan Sep 4, 2020
fd7e19f
Merge pull request #180 from stanfordmlgroup/distn-laplace
tonyduan Sep 9, 2020
b36aa00
bump version and upload release
Sep 9, 2020
ea8c7ec
Issue #181 - fix feature importance when col_sample < 1
samshipengs Sep 10, 2020
a8322f7
Issue #181 - set instance variable for n_features; move inner functio…
samshipengs Sep 10, 2020
fc5b3fa
Merge pull request #183 from samshipengs/Issue-181-feature-importance…
alejandroschuler Sep 10, 2020
5d771c8
bump version and release
Sep 14, 2020
f7995f2
Setup pytest testing with parametrized functions
Sep 20, 2020
73d246d
bump version
Sep 25, 2020
f83a64f
Merge pull request #184 from ecurtin2/master
ryan-wolbeck Sep 25, 2020
008237d
Update Pipfile
ryan-wolbeck Sep 25, 2020
31bc773
Wolbra fix deps (#187)
ryan-wolbeck Sep 25, 2020
450a2e7
add exact fisher
angeldroth Oct 15, 2020
990651d
switch to paramter which exists
angeldroth Oct 15, 2020
3f0d415
Merge pull request #192 from angeldroth/feature/add_poisson_fisher
alejandroschuler Oct 16, 2020
9298c78
Delete 5-dev.ipynb
cs2716 Oct 24, 2020
99c1fa5
Add Fisher Information Reparameterisation to User Guide
cs2716 Oct 24, 2020
405f55a
Merge pull request #196 from cs2716/fisher-info-example
alejandroschuler Oct 26, 2020
5cce1fc
Update documentation
mzjp2 Oct 26, 2020
8864bce
Merge pull request #198 from mzjp2/build-docs
alejandroschuler Oct 26, 2020
ca4e047
clean up formatting on lines of laplace dist (#199)
ryan-wolbeck Oct 28, 2020
037a352
Feature/add t distn (#190)
angeldroth Nov 9, 2020
5380270
Switch to poetry and add robust contributing workflow (#204)
mzjp2 Nov 10, 2020
7ea0452
Fix typo in Makefile (#207)
mzjp2 Nov 10, 2020
2da2a8f
update dep for tqdm
Nov 11, 2020
a446e3a
Merge pull request #209 from stanfordmlgroup/fix-deps
ryan-wolbeck Nov 12, 2020
8610675
update readme with conda forge instructions
Dec 30, 2020
4c2b11d
Merge pull request #215 from stanfordmlgroup/update-readme
ryan-wolbeck Dec 30, 2020
0763dfb
update dependencies
Feb 8, 2021
ac103a4
supported version checking via ngboost.__version__
zyxue Feb 10, 2021
a71ab31
isort fix
zyxue Feb 10, 2021
b85b908
setup tox
zyxue Feb 10, 2021
f781017
Merge pull request #229 from zyxue/version-check
ryan-wolbeck Feb 16, 2021
c8a5561
Updated the multivariate_normal distribution just for regression.
Feb 20, 2021
02542b3
Added an example for the multivariate normal distribution.
Feb 20, 2021
da81aa6
isort applied
Feb 21, 2021
7b58a84
isort applied
Feb 21, 2021
e2a26a4
Minor changes to fix failed pylint tests
Feb 21, 2021
222d702
Merge pull request #230 from zyxue/setup-tox
ryan-wolbeck Feb 23, 2021
a814ddb
add codeowners file and bump version for latest merges
Feb 23, 2021
0652bb1
Merge pull request #239 from stanfordmlgroup/codeowners-version
ryan-wolbeck Feb 23, 2021
a7ebf1d
Added d_score and metric tests for most distributions. Set some relat…
Feb 24, 2021
f79127d
Merge pull request #237 from MikeOMa/MultivariateNormal_implementation
alejandroschuler Feb 25, 2021
0b5d938
bump version to 0.3.10
Feb 25, 2021
c214041
Merge pull request #240 from stanfordmlgroup/bump-version
ryan-wolbeck Feb 25, 2021
e21cf3e
There were some typos.
dguzelkokar Mar 18, 2021
10a41c0
Merge pull request #245 from dguzelkokar/patch-4
alejandroschuler Mar 18, 2021
466f84f
Made NGBSurvival pickable, followed a similar method to k_categorical…
Mar 23, 2021
2fd69d6
Added tests from the test-pickle branch.
Mar 23, 2021
473196d
Moved SurvivalDistnClass factory to distn/utils.
Mar 25, 2021
514480b
Cleaned up test_pickling.py to make use of already existing fixtures
Mar 25, 2021
317a323
update version
Mar 25, 2021
df461f5
Merge pull request #246 from MikeOMa/survival-pickle
ryan-wolbeck Mar 25, 2021
15db37e
Bump nokogiri from 1.10.8 to 1.11.5 in /examples/user-guide
dependabot[bot] May 20, 2021
8a10619
Merge pull request #257 from stanfordmlgroup/dependabot/bundler/examp…
alejandroschuler May 20, 2021
5451b2a
Updated examples to avoid dataset loading problems with sklean 0.25
JoseLlorensRipolles May 26, 2021
0d9ae99
fix linting issues
May 26, 2021
57dbc2f
Merge pull request #259 from JoseLlorensRipolles/prepare-for-sklearn0.25
ryan-wolbeck May 26, 2021
0c9f639
Merge branch 'master' into update_dependencies
ryan-wolbeck Jun 2, 2021
f87c832
fix helper functions
Jun 2, 2021
64d37d2
fix linting issues with else and the returns
Jun 2, 2021
a137863
bump version
Jun 3, 2021
f3e3215
Merge pull request #227 from merl-dev/update_dependencies
ryan-wolbeck Jun 3, 2021
778ac55
Try to allow sparse X
rhjohnstone Jul 9, 2021
1655ee4
Try to allow sparse X
rhjohnstone Jul 9, 2021
39981f4
Allow sparse X in fit and predict
rhjohnstone Jul 9, 2021
12da02b
Linting
rhjohnstone Jul 12, 2021
cfc067b
Merge pull request #272 from rhjohnstone/allow-sparse-X
ryan-wolbeck Jul 29, 2021
51a2991
Kmedved/master (#268)
ryan-wolbeck Jul 30, 2021
84f9bbc
Bump python version due to lack of support for 3.6.0 from Pandas. Fix…
robertsont Mar 1, 2022
63789ea
added Gamma distribution
eco3 Sep 7, 2022
11a5b1a
fixed too long lines
eco3 Sep 7, 2022
a18be1a
fixed missing whitespace around arithmetic operator
eco3 Sep 7, 2022
338fce8
formatting with black
eco3 Sep 19, 2022
49345ec
second attempt of running black
eco3 Sep 19, 2022
3a064b4
Fixing black formatter (#301)
eco3 Oct 11, 2022
3958e4f
Merge branch 'stanfordmlgroup:master' into master
eco3 Oct 11, 2022
2f4f0e2
rerun black
eco3 Oct 11, 2022
d8c3572
Fix off-by-one error (issue #302)
Nov 10, 2022
2e1fad6
Merge pull request #303 from juliangilbey/fix-off-by-one-issue302
ryan-wolbeck Nov 23, 2022
3575781
Merge pull request #295 from eco3/master
ryan-wolbeck Jan 9, 2023
91057ab
add sklearn dictionary support
Jan 20, 2023
8f32dff
fix formatting
Jan 20, 2023
da1b532
add release notes and bump version
Jan 20, 2023
9c8dda0
add release note desc
Jan 20, 2023
539c009
doc: centre readme buttons and more buttons - repo size, version numb…
CompRhys Jan 23, 2023
820210e
upate relase notes and bump version
Jan 26, 2023
bcac835
remove metadata add
Jan 26, 2023
af1f142
doc: FI -> fisher_information for readability
CompRhys Mar 14, 2023
ae3677b
Merge pull request #310 from stanfordmlgroup/sklearn_dict
ryan-wolbeck Mar 14, 2023
daa532c
Shift flake8 to dev dependencies
jack-mcivor Mar 14, 2023
bb2afd9
fea: change code such that fit doesn't append to a global list but re…
CompRhys Mar 14, 2023
a77836a
Merge branch 'stanfordmlgroup:master' into master
CompRhys Mar 14, 2023
83f6393
doc: revert FI name change
CompRhys Mar 14, 2023
e54a7a2
Merge branch 'master' of https://github.com/CompRhys/ngboost
CompRhys Mar 14, 2023
d679ed1
Merge pull request #311 from CompRhys/patch-1
ryan-wolbeck Mar 14, 2023
7dce8ef
Merge pull request #317 from jack-mcivor/feature/flake8-dev-dependency
ryan-wolbeck Mar 14, 2023
2c6c3e0
lint: run pre-commit hook
CompRhys Mar 15, 2023
de94844
fea: test that the three lists have same length and
CompRhys Mar 15, 2023
598f205
Remove declared pandas dependency
jack-mcivor Mar 15, 2023
cf16b0a
Merge pull request #316 from CompRhys/master
ryan-wolbeck Mar 30, 2023
c74d1d8
update version and add release notes
Mar 30, 2023
00603e6
Merge pull request #321 from stanfordmlgroup/version-bump-0.4.1
ryan-wolbeck Mar 31, 2023
cd69a10
feat: add estimator type with reg and clf
NeroHin Apr 5, 2023
ce588f0
fix: remove the whitespace
NeroHin Apr 5, 2023
04c2ac2
Enable Base models that don't accept sample weight
joseortiz3 Apr 11, 2023
b461e27
Change docstring for NGBoost.fit()
joseortiz3 Apr 11, 2023
e7fab5f
Update README.md
alejandroschuler Apr 12, 2023
9ace1f2
black reformatted something
joseortiz3 Apr 17, 2023
81aad42
Merge pull request #326 from joseortiz3/patch-2
ryan-wolbeck Apr 19, 2023
8b3c994
add workflow for running tests
peterdudfield Apr 25, 2023
79fb898
rename workflow
peterdudfield Apr 25, 2023
00954f3
Merge pull request #330 from openclimatefix/github-actions-test
ryan-wolbeck Aug 22, 2023
8a33fdf
Merge pull request #318 from jack-mcivor/remove-pandas-dependency
ryan-wolbeck Sep 8, 2023
efef0b8
Fix bool deprecation
Oct 31, 2023
427eabd
Minor boyscout fixes
Oct 31, 2023
036e6cf
Fix another np.bool
Oct 31, 2023
64bf295
Update release notes
Oct 31, 2023
ab5a5f4
Typo
Oct 31, 2023
f274cd3
Merge pull request #337 from jack-mcivor/bugfix/np-bool-deprecation
ryan-wolbeck Oct 31, 2023
f8dce61
Update load_boston in README.md (#340)
jyx-su Nov 20, 2023
f65b57e
speed up tests by loading sample once
ryan-wolbeck Nov 28, 2023
07734dd
Merge pull request #341 from stanfordmlgroup/tune-tests
ryan-wolbeck Nov 29, 2023
b45f7b6
no need for staged_pred_dist if will only use last value
mesenrj Jan 23, 2024
c482aab
Add py311, remove py37 (#320)
jack-mcivor Jan 29, 2024
ffbd359
Merge pull request #344 from mesenrj/fix/pred-dist-memory-usage
ryan-wolbeck Jan 31, 2024
f064594
Add support for python 3.12, drop python 3.8 (#346)
connortann Feb 13, 2024
f5c2a1e
Release 0.5.0 (#347)
ryan-wolbeck Feb 14, 2024
1cd58b6
Adding NormalFixedMean (#333)
joseortiz3 Feb 20, 2024
38c2245
Makefile updates (#348)
ryan-wolbeck Feb 20, 2024
acf6b27
Merge pull request #325 from NeroHin/master
alejandroschuler Oct 29, 2024
124000f
Add support for Numpy 2.*, fix linting issues (#365)
robertsont Jan 23, 2025
1512c2a
add 0.5.2 release notes (#367)
ryan-wolbeck Jan 23, 2025
f1dd7c6
Updating poetry (#369)
robertsont Jan 31, 2025
ecffeac
Allow NaNs in input X (#362)
calvinmccarter Jan 31, 2025
9b47057
update for 0.5.3 release (#370)
ryan-wolbeck Feb 1, 2025
84347f8
Update partial_fit to respect validation data (#372)
jerome-f Feb 12, 2025
34d2052
0.5.4 release (#373)
ryan-wolbeck Feb 13, 2025
6e4df9b
fix broken package image (#374)
ryan-wolbeck Feb 22, 2025
66447f2
fix: syntax warning in examples (#378)
mariushelf Mar 1, 2025
4f5e0d4
bump sklearn to 1.6 and rename deprecated parameters (#377)
mariushelf Mar 1, 2025
a6c3c21
v0.5.5 release (#380)
ryan-wolbeck Mar 1, 2025
3ce0fe4
Update parameters in `get_params`
CoRiis Mar 19, 2025
c143d4a
Merge pull request #383 from CoRiis/patch-2
alejandroschuler Mar 21, 2025
fcf77c9
fix: make col_sample min equals to 1 (#385)
HEGAB7 Apr 4, 2025
5faed11
Added Weibull Distribution (#386)
acdundore May 7, 2025
22f9ef7
feat: added halfnormal distribution (#387)
acdundore May 7, 2025
10d6710
release 0.5.6 (#388)
ryan-wolbeck May 23, 2025
9ca4faa
Enabling `python=3.13` (#390)
fhoehle Jul 14, 2025
3742ff9
README: swap Boston→California; remove broken pd/np usage and HTTP fe…
minhkhoango Aug 23, 2025
1f7bda4
Update dev dependencies (#394)
ryan-wolbeck Oct 7, 2025
a5a1133
Fix numpy2 natural gradient compatibility (#400)
ryan-wolbeck Nov 15, 2025
6ac07c8
release 0.5.8 (#401)
ryan-wolbeck Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* ryan-wolbeck alejandroschuler tonyduan
43 changes: 18 additions & 25 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
name: Python package
name: Python lint and test

on: [push]
on:
push:
pull_request:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pytest
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: make install
- name: Run linters
run: make lint
- name: Run tests
run: make test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Pycharm
.idea/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -13,6 +16,8 @@ dist/
downloads/
eggs/
.eggs/
examples/user-guide/_build/
examples/user-guide/.sass-cache/
lib/
lib64/
parts/
Expand Down Expand Up @@ -107,3 +112,4 @@ venv.bak/
*.pkl

.DS_Store
poetry.lock
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

default_stages: [pre-commit, manual]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml # Checks yaml files for parsable syntax.
- id: check-json # Checks json files for parsable syntax.
- id: check-added-large-files # Checks for large files that bloat the git repository
- id: check-case-conflict # Check for files that would conflict in case-insensitive filesystems
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: debug-statements # Check for debugger imports and py37+ `breakpoint()` calls in python source.
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: local
hooks:
- id: isort
name: isort
types: [file, python]
language: system
entry: isort
- id: flake8
name: Flake8
types: [file, python]
language: system
files: ^ngboost
entry: flake8
- id: pylint-ngboost
name: pylint on ngboost*
types: [file, python]
language: system
files: ^ngboost
entry: pylint --disable=invalid-name,no-member,missing-docstring,no-self-argument,arguments-differ
- id: pylint-tests
name: pylint on tests*
language: system
files: ^tests
entry: pylint --disable=invalid-name,missing-docstring,too-many-function-args,unused-variable,fixme
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include LICENSE
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
all:
python3 -m pylint ngboost
pkg:
python3 setup.py sdist bdist_wheel

install:
pip install poetry==2.0.1 && poetry install

package:
poetry build

publish: package
source .env && poetry config pypi-token.pypi $$PYPI_TOKEN && poetry publish

lint:
poetry run pre-commit run --hook-stage manual --all-files

test:
poetry run pytest --slow -v

clean:
rm -r build dist ngboost.egg-info
upload:
twine upload dist/*
rm -rf dist/*
49 changes: 38 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
![Python package](https://github.com/stanfordmlgroup/ngboost/workflows/Python%20package/badge.svg)

# NGBoost: Natural Gradient Boosting for Probabilistic Prediction

ngboost is a Python library that implements Natural Gradient Boosting, as described in ["NGBoost: Natural Gradient Boosting for Probabilistic Prediction"](https://stanfordmlgroup.github.io/projects/ngboost/). It is built on top of [Scikit-Learn](https://scikit-learn.org/stable/), and is designed to be scalable and modular with respect to choice of proper scoring rule, distribution, and base learners.
<h4 align="center">

Installation:
![Python package](https://img.shields.io/pypi/v/ngboost)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/stanfordmlgroup/ngboost?label=Repo+Size)](https://github.com/stanfordmlgroup/ngboost/graphs/contributors)
[![Github License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/ngboost?logo=pypi&logoColor=white)](https://pypi.org/project/ngboost)
[![PyPI Downloads](https://img.shields.io/pypi/dm/ngboost?logo=icloud&logoColor=white)](https://pypistats.org/packages/ngboost)

```
pip install --upgrade git+https://github.com/stanfordmlgroup/ngboost.git
</h4>

ngboost is a Python library that implements Natural Gradient Boosting, as described in ["NGBoost: Natural Gradient Boosting for Probabilistic Prediction"](https://stanfordmlgroup.github.io/projects/ngboost/). It is built on top of [Scikit-Learn](https://scikit-learn.org/stable/), and is designed to be scalable and modular with respect to choice of proper scoring rule, distribution, and base learner. A didactic introduction to the methodology underlying NGBoost is available in this [slide deck](https://docs.google.com/presentation/d/1Tn23Su0ygR6z11jy3xVNiLGv0ggiUQue/edit?usp=share_link&ouid=102290675300480810195&rtpof=true&sd=true).

## Installation

```sh
via pip

pip install --upgrade ngboost

via conda-forge

conda install -c conda-forge ngboost
```

Probabilistic regression example on the Boston housing dataset:
## Usage

Probabilistic regression example on the Boston housing dataset:

```python
from ngboost import NGBRegressor

from sklearn.datasets import load_boston
from sklearn.datasets import fetch_california_housing
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error

X, Y = load_boston(True)
# Load California housing dataset
cal = fetch_california_housing()
X, Y = cal.data, cal.target

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2)

ngb = NGBRegressor().fit(X_train, Y_train)
Expand All @@ -36,6 +55,14 @@ test_NLL = -Y_dists.logpdf(Y_test).mean()
print('Test NLL', test_NLL)
```

More information about available distributions, scoring rules, learners, how to tune NGBoost models, and model interpretation is available in our [vignette](https://github.com/stanfordmlgroup/ngboost/blob/master/examples/vignette.ipynb). Please see our [developer guide](https://github.com/stanfordmlgroup/ngboost/blob/master/examples/dev_vignette.ipynb) for more information on how to add new distributions or scores to NGBoost.
Details on available distributions, scoring rules, learners, tuning, and model interpretation are available in our [user guide](https://stanfordmlgroup.github.io/ngboost/intro.html), which also includes numerous usage examples and information on how to add new distributions or scores to NGBoost.

## License

[Apache License 2.0](https://github.com/stanfordmlgroup/ngboost/blob/master/LICENSE).

## Reference

A [slide deck](https://drive.google.com/file/d/183BWFAdFms81MKy6hSku8qI97OwS_JH_/view?usp=sharing) with an accessible presentation of how NGBoost works is also available.
Tony Duan, Anand Avati, Daisy Yi Ding, Khanh K. Thai, Sanjay Basu, Andrew Y. Ng, Alejandro Schuler. 2019.
NGBoost: Natural Gradient Boosting for Probabilistic Prediction.
[arXiv](https://arxiv.org/abs/1910.03225)
70 changes: 70 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# RELEASE NOTES

## Version 0.5.8

* Fix numpy2 natural gradient compatibility

## Version 0.5.7

* Support for Python 3.13
* Update to dev dependencies

## Version 0.5.6

* Add support for Weibull and HalfNormal Distributions

## Version 0.5.5

* Upgrade sklearn > 1.6

## Version 0.5.4

* Update to partial fit to respect validation data

## Version 0.5.3

* Allow NAN as input
* Poetry update

## Version 0.5.2

* Support for Numpy 2.0
* Value error fix
* Linting updates

## Version 0.5.1

* Adds support for NormalFixedMean distribution
* Updates to makefile for easier publishing

## Version 0.5.0

* Drops support for python 3.7 and 3.8
* Now supports Python 3.11 and 3.12
* Fixed issue with np.bool
* Optimized memory usage in pred-dist
* Removed declared pandas dependency
* Significant improvements to run times on tests during development
* Minor enhancements to github actions

## Version 0.4.2

* Fix deprecated numpy type alias. This was causing a warning with NumPy >=1.20 and an error with NumPy >=1.24
* Remove pandas as a declared dependency

## Version 0.4.1

### Added `partial_fit` method for incremental learning

NGBoost now includes a new `partial_fit` method that allows for incremental learning. This method appends new base models to the existing ones, which can be useful when new data becomes available over time or when the data is too large to fit in memory all at once.

The `partial_fit` method takes similar parameters to the `fit` method, including predictors `X`, outcomes `Y`, and validation sets `X_val` and `Y_val`. It also supports custom weights for the training and validation sets, as well as early stopping and custom loss monitoring.

Please note that the `partial_fit` method is not yet fully tested and may not work as expected in all cases. Use it with caution and thoroughly test its behavior in your specific use case before relying on it in production.

## Version 0.4.0

* Added support for the gamma distribution
* Added sklearn support to `set_params`
* Fixed off-by-one issue for max trees
* Upgraded version of `black` formatter to 22.8.0
Loading