-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2958 from markotoplak/nn_thread
[ENH] Neural network widget that works in a separate thread
- Loading branch information
Showing
6 changed files
with
226 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import sklearn.neural_network as skl_nn | ||
from Orange.base import NNBase | ||
from Orange.regression import SklLearner | ||
from Orange.classification.neural_network import NIterCallbackMixin | ||
|
||
__all__ = ["NNRegressionLearner"] | ||
|
||
|
||
class MLPRegressorWCallback(skl_nn.MLPRegressor, NIterCallbackMixin): | ||
pass | ||
|
||
|
||
class NNRegressionLearner(NNBase, SklLearner): | ||
__wraps__ = skl_nn.MLPRegressor | ||
__wraps__ = MLPRegressorWCallback | ||
|
||
def _initialize_wrapped(self): | ||
clf = SklLearner._initialize_wrapped(self) | ||
clf.orange_callback = getattr(self, "callback", None) | ||
return clf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters