Resolve "(Learner1D) add possibility to use the direct neighbors in the loss"
1 unresolved thread
Compare changes
- Bas Nijholt authored
This abstracts the attribute 'nn_neighbors' away and makes it easier for the user, because one can now just set the 'loss_per_interval' and the 'nn_neighbors' will be set be default.
+ 24
− 7
@@ -15,6 +15,14 @@ from ..notebook_integration import ensure_holoviews
@@ -36,6 +44,7 @@ def uniform_loss(interval, scale, data, neighbors):
@@ -70,6 +79,7 @@ def _loss_of_multi_interval(xs, ys):
@@ -85,6 +95,7 @@ def triangle_loss(interval, scale, data, neighbors):
@@ -141,10 +152,12 @@ class Learner1D(BaseLearner):
@@ -170,14 +183,18 @@ class Learner1D(BaseLearner):