Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 923 Bytes

custom_models.rst

File metadata and controls

19 lines (15 loc) · 923 Bytes

Customized Learning Models

ProjectPredict comes with a Gaussian Process Regression model, however you may find this model unsuitable for your data. To make your own model, you only need to follow a minimal interface -- the only requirement is that you have a method named "predict" that accepts the dictionary of data associated with a task and returns a DurationPdf. For simplicity, assume your tasks have a "points" value in their data, and your model simply returns a DurationPdf wrapping a DeterministicPdf containing with the same value as the points passed into it. You could write this as

 class SimpleModel(object):
     def __init__(self, units=TimeUnits.hours):
         self.units = units

     def predict(self, input_data):
         return DurationPdf(DeterministicPdf(input_data['points']), units=self.units)