Comments (5)
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-19T14:13:57.207Z on GitLab
After a discussion with @basnijholt, we think that maybe printing a warning.warn(...)
may be preferred over an error, and then just to disregard any point that is added outside of the domain.
from adaptive.
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-20T10:51:01.390Z on GitLab
After another discussion, we came up with the following: Add the point to the self.data
dictionary, but do not add it to any other internal state (such as the loss
dict etc.)
apart from that, we could decide to give a warning, or not: but only once by the following filter:
warnings.simplefilter('once', MyDeprecationWarning)
for _ in range(100):
warnings.warn('Warning!', MyDeprecationWarning)
from adaptive.
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-20T14:17:02.960Z on GitLab
on closer inspection, this would work for the learner1D and the learnerND, the learner2D however, takes into consideration all points that are in self.data
:
self.ask()
is calculated based on self.losses()
self.losses()
is calculated based on self.ip()
self.ip()
is calculated based on self.data
therefore if we add the x that is outside the domain into self.data
it will be taken into account whenever we request a new point -> so we can't guarantee that self.ask()
returns a point inside the domain if we have added points outside the domain to self.data
for the learner2D
from adaptive.
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-20T14:19:54.976Z on GitLab
this doesn't mean the idea is bad, it just means that it would require some extra thought for the Learner2D
(probably changing the code of the Learner2D
)
from adaptive.
originally posted by Jorn Hoofwijk (@Jorn) at 2018-09-20T14:27:09.221Z on GitLab
in fact: one of the things that should be tested, is the following: (also for the other learners of course)
import adaptive
l = adaptive.Learner1D(lambda x: x, (-1, 1))
l.tell(-1, -1)
l.tell(1, 1)
l.tell(5, 5)
xs, _ = l.ask(1)
x, = xs
assert -1 <= x <= 1
from adaptive.
Related Issues (20)
- Allow to choose colormap in learner2D.plot() HOT 2
- Question: plot_trisurf (matplotlib) directly from qhull HOT 3
- Incompatibility of adaptive (asyncio) with python=3.10 HOT 4
- Stop using atomic writes HOT 2
- Documentation: use cases of coroutine by Learner and Runner not properly explained HOT 2
- Rename master branch to main HOT 3
- Fix branch name (master --> main) in binder link in readme HOT 1
- No module named 'typing_extensions'" HOT 2
- Learner2D.interpolator and Learner2D.interpolated_on_grid give different results HOT 5
- Target function returns NaN HOT 5
- Use in script with BlockingRunner: get log and/or feedback on progress HOT 4
- Handling with regions unreachable inside the `ConvexHull` in `LearnerND` HOT 2
- large delay when using start_periodic_saving
- Create API for just signle process (No pickle) HOT 2
- Efficient sampling of measurment bound functions: BatchExecutor? HOT 2
- Question on uncertainty quantification HOT 2
- Issues with Multiprocess and AsyncRunner in adaptive for Phase Diagram Illustration HOT 2
- Async Running Problem with AsyncRunner HOT 2
- Normalize variabels HOT 4
- Question: is this applicable for time series?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptive.