adaptive merge requestshttps://gitlab.kwant-project.org/qt/adaptive/-/merge_requests2019-02-07T12:09:50Zhttps://gitlab.kwant-project.org/qt/adaptive/-/merge_requests/132WIP: add support for neighbours in loss computation in LearnerND2019-02-07T12:09:50ZJorn HoofwijkWIP: add support for neighbours in loss computation in LearnerNDCloses #120
TODO add support to output in $`R^N`$
TODO rewrite the code to be more readable, I will do this next week
![image](/uploads/7da085a4974369b21915ac683aed6337/image.png)
As you can see in the plot, it is getting hard to di...Closes #120
TODO add support to output in $`R^N`$
TODO rewrite the code to be more readable, I will do this next week
![image](/uploads/7da085a4974369b21915ac683aed6337/image.png)
As you can see in the plot, it is getting hard to distinguish the LearnerND from the Learner2D :Dhttps://gitlab.kwant-project.org/qt/adaptive/-/merge_requests/90WIP: (feature) add anisotropic meshing to LearnerND2019-02-07T12:09:49ZJorn HoofwijkWIP: (feature) add anisotropic meshing to LearnerNDCloses #74
Depends on !86 and #80 and therefore it has the corresponding branches included as well
Still has a few to-do's:
- [x] let `LearnerND.ip()` make use of our triangulation rather than building a new one
- [ ] make it ...Closes #74
Depends on !86 and #80 and therefore it has the corresponding branches included as well
Still has a few to-do's:
- [x] let `LearnerND.ip()` make use of our triangulation rather than building a new one
- [ ] make it work in arbitrary dimensions
- [ ] verify that it is beneficial
- ~~let the user configure the parameters (maximum stretch factor and number of points to take into account)~~ Use one simplex and it's neighbours
- [x] make test pass
- ~~add `rtree` as install requirement~~ No more RTree anymore :)
- ~~raise exception if `anistropic=True` and `rtree` not installed, pass if `anisotropic=False`~~
- [x] refactor code to be human-readable
- ~~let's make it fast :)~~ #80
As it seems it doesn't work that well with the ring, since this ring has a relative low average gradient and very high second derivative. So maybe this second derivative might be a more useful property to determine the
Sneak peek:
![anisotropic](/uploads/3babecfe20b8ac4d6edff89566707e9e/anisotropic.png)https://gitlab.kwant-project.org/qt/adaptive/-/merge_requests/72do not always plot an Overlay because HoloViews can now handle changing datat...2018-10-01T14:56:36ZBas Nijholtdo not always plot an Overlay because HoloViews can now handle changing datatypes in DynamicMapsTitle says it all.
This is currently blocked by https://github.com/ioam/holoviews/issues/2784Title says it all.
This is currently blocked by https://github.com/ioam/holoviews/issues/2784https://gitlab.kwant-project.org/qt/adaptive/-/merge_requests/70WIP: AverageLearner2D and AverageLearner1D2018-12-19T13:36:19ZBas NijholtWIP: AverageLearner2D and AverageLearner1DThis merge request implements a Learner2D that can learn averages on the points, the `AverageLearner2D`.
When chosing points the learner can either
* add more values at an existing points
* add more triangles
The learner compares...This merge request implements a Learner2D that can learn averages on the points, the `AverageLearner2D`.
When chosing points the learner can either
* add more values at an existing points
* add more triangles
The learner compares the loss of potential new triangles with the standard error of an existing point.
The relative importance of both can be adjusted by a hyperparameter `learner.weight`.
From the doc-string:
>When `weight > 1` adding more points to existing points will be
prioritized (making the standard error of a point more imporant,)
otherwise adding new triangles will be prioritized (making the
loss of a triangle more important.)
All tests that pass for the `Learner2D` currently pass for the `AvererageLearner2D` too.
Run with:
```python
import adaptive
adaptive.notebook_extension()
def ring(xy_seed):
import numpy as np
import random
(x, y), seed = xy_seed
random.seed(seed)
noise = 0.5 * (random.random() - 1)
a = 0.2
return x + np.exp(-(x**2 + y**2 - 0.75**2)**2/a**4) + noise
learner = adaptive.AverageLearner2D(ring, bounds=[(-1, 1), (-1, 1)], weight=.1)
runner = adaptive.Runner(learner, goal=lambda l: l.loss() < 0.01, log=True)
runner.live_info()
```
which results in:
```
>>> print(learner.mean_values_per_point())
5.2737642585551328
```
and
![Screenshot_2018-09-27_at_18.03.37](/uploads/ef611854da3ca8b204b9d8028a1c47dc/Screenshot_2018-09-27_at_18.03.37.png)
Bas NijholtBas Nijholthttps://gitlab.kwant-project.org/qt/adaptive/-/merge_requests/25WIP: CI asv benchmarks2019-02-07T12:09:47ZBas NijholtWIP: CI asv benchmarksLimitations:
* `asv` doesn't keep any branch information, so we will upload the website with information of `master` + the commits of the latest branch that was benchmarked.
We cache the benchmarks of the master branch because missin...Limitations:
* `asv` doesn't keep any branch information, so we will upload the website with information of `master` + the commits of the latest branch that was benchmarked.
We cache the benchmarks of the master branch because missing commits in the `results/` dir of `asv` will lead to errors.