DOI-BOR / PyForecast

PyForecast is a statistical modeling tool used by Reclamation water managers and reservoir operators to train and build predictive models for seasonal inflows and streamflows. PyForecast allows users to make current water-year forecasts using models developed with the program.
Other
28 stars 12 forks source link

Forced Predictors defined at the Equation Pool level #4

Closed tjrocha closed 5 years ago

tjrocha commented 5 years ago

@kevinfol - Looking for feedback on how you and/or your users feel about PN handling forced predictors. We can either Option-1)make another ForcedPredictor list at the EquationPool-level to store the PredictorIDs so users can make a distinction for which predictors are 'forced' into the algorithm or Option-2)we can make this a little more hidden by just storing a parallel array under the existing PredictorPool list to track which PredictorIDs should be forced at feature-selection time.

Screenshot below shows what I'm thinking about. Option-1 will have a separate list of ForcedPredictors on the GUI or Option-2 will allow users to right-click on predictors and set them to forced.

image

kevinfol commented 5 years ago

I'd prefer Option 2. Perhaps it would be useful to mark those predictors that are being forced with a little Ⓕ Icon, for example, in PyForecast_GUI.py at the 'addDictToModel' function:

def addDictToModel(self, model, dict_, ....):
    ...
                else:
                    if isinstance(key, datetime):
                        key = datetime.strftime(key, '%Y')
                    if key in dict_[...]['forcedPredictorArray']:
                         item = QtGui.QStandardItem(u'\u24BB' + str(key) + ': ' + str(values))
                    else:
                         item = QtGui.QStandardItem(str(key) + ': ' + str(values))
                    parentItem.appendRow(item)
tjrocha commented 5 years ago

Going with Option-2 then. Thanks!

tjrocha commented 5 years ago

Implemented with PR #9. Will close this issue once PR is accepted.