Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:saattrupdan/doubt into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
saattrupdan committed Jul 17, 2022
2 parents 5d8a82b + 072d61d commit 9560f9e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [Unreleased]
### Changed
- Updated `README` to include generalised linear models, rather than only
mentioning linear regression.

### Fixed
- Removed mention of `PyTorch` model support, as that has not been implemented
yet


## [v4.1.0] - 2021-07-26
### Changed
- The `verbose` argument to `QuantileRegressionForest` also displays a progress
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Dan Saattrup Nielsen
Copyright (c) 2021

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ pip install doubt

## Features

- Bootstrap wrapper for all Scikit-Learn and PyTorch models
- Bootstrap wrapper for all Scikit-Learn models
- Can also be used to calculate usual bootstrapped statistics of a dataset
- (Linear) Quantile Regression
- Quantile Regression for all generalised linear models
- Quantile Regression Forests
- A uniform dataset API, with 24 regression datasets and counting


## Quick Start

If you already have a model in Scikit-Learn or PyTorch, then you can simply
If you already have a model in Scikit-Learn, then you can simply
wrap it in a `Boot` to enable predicting with prediction intervals:

```python
Expand Down
8 changes: 4 additions & 4 deletions doubt/models/boot/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Boot:
Datasets can be any sequence of numeric input, from which bootstrapped
statistics can be calculated, with confidence intervals included.
The models can be any model that is either callable or equipped with
a `predict` method, such as all the models in `scikit-learn`, `pytorch`
and `tensorflow`, and the bootstrapped model can then produce predictions
The models can be any model that has a `fit` method and is either callable
or equipped with a `predict` method, such as all the models in
`scikit-learn`, and the bootstrapped model can then produce predictions
with prediction intervals.
The bootstrapped prediction intervals are computed using the an extension
Expand Down Expand Up @@ -336,7 +336,7 @@ def fit(self, X: FloatArray, y: FloatArray, n_boots: Optional[int] = None):

# Compute the m_i's and the validation residuals
val_residuals = []
for boot_idx in range(n_boots):
for _ in range(n_boots):
train_idxs = rng.choice(range(n), size=n, replace=True)
val_idxs = [idx for idx in range(n) if idx not in train_idxs]

Expand Down

0 comments on commit 9560f9e

Please sign in to comment.