Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AverageLearner1D added #283

Merged
merged 51 commits into from Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
07a8aa1
AverageLearner1D added
AlvaroGI Jun 19, 2020
01dc6c0
fix all style issues
basnijholt Jun 19, 2020
7cbdc44
rename alfa -> alpha
basnijholt Jun 19, 2020
afdbf31
remove unused imports
basnijholt Jun 19, 2020
b59224a
start refactoring
basnijholt Jun 19, 2020
0b7446d
refactor and simplify more
basnijholt Jun 19, 2020
7d9c13c
simplify _update_rescaled_error_in_mean
basnijholt Jun 19, 2020
0b77e61
simplify tell_many
basnijholt Jun 19, 2020
db24c6d
change asserts to if ...: raise
basnijholt Jun 19, 2020
4669cdd
no need to return at the end of a function
basnijholt Jun 19, 2020
1c31b8d
rename averagelearner1D.py -> average_learner1D.py
basnijholt Jun 19, 2020
29b966c
plot a line through the averages
basnijholt Jun 19, 2020
2bbcaa9
reverse notation
basnijholt Jun 19, 2020
942693e
Comment modification on updating the scale
AlvaroGI Jun 19, 2020
2d2dbe6
Bugfixes in aveare_learner1D.tell_many()
AlvaroGI Jun 21, 2020
eb2990c
Corrected doc-string of averagelearner1D.plot()
AlvaroGI Jun 22, 2020
f5631ac
Changed variable name from min_Delta_g to min_error
AlvaroGI Jun 29, 2020
36c4b60
tell_many() redesigned
AlvaroGI Jun 30, 2020
16c13a4
Tutorial and docs updated to .rst
AlvaroGI Oct 26, 2020
7c2b0dd
run 'pre-commit run --all'
basnijholt Mar 23, 2021
c208d67
documentation fixes
basnijholt Mar 23, 2021
9c55259
small code style changes
basnijholt Mar 23, 2021
9aa93ec
rename _error_in_mean -> error and _rescaled_error_in_mean -> rescale…
basnijholt Mar 23, 2021
5e1d9cd
rename 'tell_many_samples' -> 'tell_many_at_point'
basnijholt Mar 23, 2021
24814f1
rework example
basnijholt Mar 23, 2021
98318e0
rename 'total_samples' -> 'nsamples', inline with 'npoints'
basnijholt Mar 23, 2021
672de37
update doc-string
basnijholt Mar 23, 2021
55a1dd3
add newline
basnijholt Mar 23, 2021
9b47e03
add AverageLearner1D to test_learners.py
basnijholt Mar 23, 2021
4434ccb
add _get_data and _set_data to AverageLearner1D
basnijholt Mar 23, 2021
aed824a
simplify tell_many
basnijholt Mar 23, 2021
df52232
add simple_run to the tests
basnijholt Mar 23, 2021
8394906
add adaptive/tests/test_average_learner1d.py
basnijholt Mar 23, 2021
135b21e
change to test_tell_many_at_point
basnijholt Mar 23, 2021
b4bb48f
cast to list and make a copy of list that is modified inplace
basnijholt Mar 23, 2021
ff3594c
learner -> control
basnijholt Mar 23, 2021
616adc8
test equality of bounding box
basnijholt Mar 23, 2021
bb7960d
bugfix in tell_many_at_point()
AlvaroGI Mar 31, 2021
3e83b93
Merge remote-tracking branch 'origin/master' into average1d
basnijholt Aug 25, 2021
30f8dfa
style and remove superfluous comment
basnijholt Aug 25, 2021
68913b8
add pandas as test dependency
basnijholt Aug 25, 2021
16c028b
fix test_tell_many_at_point
basnijholt Aug 25, 2021
4a363a2
change function signature to: f(x_seed: Tuple[int, float]) for Averag…
basnijholt Aug 27, 2021
21a8ef9
implement BalancingLearner.nsamples to fix test_saving_of_balancing_l…
basnijholt Aug 27, 2021
3bfb22d
add comment about first point that is sampled
basnijholt Aug 27, 2021
cf8af90
change the way the loss_improvement is returned
basnijholt Aug 27, 2021
3b85da5
fix bug where loss_improvement becomes nan
basnijholt Aug 27, 2021
44883d7
fix test_learner_performance_is_invariant_under_scaling for AverageLe…
basnijholt Aug 27, 2021
afb4a38
fix the documentation for AverageLearner1D
basnijholt Aug 27, 2021
cb318bc
add comment about out of domain data
basnijholt Aug 27, 2021
7b316c9
fix noisy_peak signature in example-notebook.ipynb
basnijholt Aug 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.rst
Expand Up @@ -44,8 +44,10 @@ The following learners are implemented:
- ``Learner1D``, for 1D functions ``f: ℝ → ℝ^N``,
- ``Learner2D``, for 2D functions ``f: ℝ^2 → ℝ^N``,
- ``LearnerND``, for ND functions ``f: ℝ^N → ℝ^M``,
- ``AverageLearner``, For stochastic functions where you want to
- ``AverageLearner``, for random variables where you want to
average the result over many evaluations,
- ``AverageLearner1D``, for stochastic 1D functions where you want to
estimate the mean value of the function at each point,
- ``IntegratorLearner``, for
when you want to intergrate a 1D function ``f: ℝ → ℝ``,
- ``BalancingLearner``, for when you want to run several learners at once,
Expand Down
2 changes: 2 additions & 0 deletions adaptive/__init__.py
Expand Up @@ -4,6 +4,7 @@
from adaptive._version import __version__
from adaptive.learner import (
AverageLearner,
AverageLearner1D,
BalancingLearner,
BaseLearner,
DataSaver,
Expand Down Expand Up @@ -34,6 +35,7 @@
"Learner1D",
"Learner2D",
"LearnerND",
"AverageLearner1D",
"make_datasaver",
"SequenceLearner",
"active_plotting_tasks",
Expand Down
2 changes: 2 additions & 0 deletions adaptive/learner/__init__.py
@@ -1,6 +1,7 @@
from contextlib import suppress

from adaptive.learner.average_learner import AverageLearner
from adaptive.learner.average_learner1D import AverageLearner1D
from adaptive.learner.balancing_learner import BalancingLearner
from adaptive.learner.base_learner import BaseLearner
from adaptive.learner.data_saver import DataSaver, make_datasaver
Expand All @@ -20,6 +21,7 @@
"Learner1D",
"Learner2D",
"LearnerND",
"AverageLearner1D",
"SequenceLearner",
]

Expand Down