Lakeland Model: Implement a version 0 clustering model called KMeansModel
for Lakeland data
#251
Labels
Milestone
KMeansModel
for Lakeland data
#251
We currently have a
PopulationModel
base class that inherits fromGenerator
via theModel
class.Our goal is to write up a
KMeansModel
subclass ofPopulationModel
, which will be run once all the other infrastructure around it is implemented. This should go in the corresponding python file atsrc/ogd/games/LAKELAND/models/KMeansModel.py
.The following functions need to be implemented:
_featureFilter
: just like a normal 2nd-order feature extractor. Specify a list of the names of features we want for training_updateFromFeature
: again, similar to a 2nd-order feature extractor. At the moment, this approach to implementation sucks and is dumb and will be replaced, but this function will need to effectively turn a bunch of individualFeatureData
objects back into a table or whatever we want to train from. Further explanation in another comment._train
: This function will run once, after the_updateFromFeature
function has been called once on eachFeatureData
object for the whole population. Whatever variable (say,self._data
) has been constructed with_updateFromFeature
can now be used as input for the training of the k-means model. My assumption is that the implementation of_train
here is calling all the code we currently have for the filtering, PCA, and k-means training steps. We can put any classes you've written for these steps into the sameLAKELAND/models
folder as this class, and import from there. We'll find a better home for those files later._apply
: This function takes in a list ofFeatureData
objects, and converts them into a 1-D array (or whatever is needed for the scikit model's "predict" function, or whatever the function is called). Then it returns a newFeatureData
object with the predicted value. Again, more details onFeatureData
class in comments below.The text was updated successfully, but these errors were encountered: