diff --git a/src/lop/active_learning/ActiveLearner.py b/src/lop/active_learning/ActiveLearner.py new file mode 100644 index 0000000..02d4143 --- /dev/null +++ b/src/lop/active_learning/ActiveLearner.py @@ -0,0 +1,25 @@ +# Copyright 202 Ian Rankin +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this +# software and associated documentation files (the "Software"), to deal in the Software +# without restriction, including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +# to whom the Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all copies or +# substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +# ActiveLearner.py +# Written Ian Rankin - February 2022 +# +# Active learning selection algorithms for Pairwise GP's + +import numpy as np +from copy import copy diff --git a/src/lop/active_learning/__init__.py b/src/lop/active_learning/__init__.py new file mode 100644 index 0000000..38ad45e --- /dev/null +++ b/src/lop/active_learning/__init__.py @@ -0,0 +1,2 @@ +# init the active_learning subfolder + diff --git a/src/lop/models/Model.py b/src/lop/models/Model.py index 9bb065a..c9b56b9 100644 --- a/src/lop/models/Model.py +++ b/src/lop/models/Model.py @@ -77,7 +77,7 @@ def select_best(self, candidate_pts): ## select - # This function calls the active learner and specifies the + # This function calls the active learner and specifies the number of alternatives to select def select(self, candidate_pts, num_alts, prefer_num=-1): return self.active_learner.select(candidate_pts, num_alts, prefer_num) @@ -92,7 +92,7 @@ class SimplelestModel(Model): def predict(self, X): return X, None - def clear(self): + def reset(self): pass