foehnix.Foehnix.predict

Foehnix.predict(newdata=None, returntype='response')[source]

Predict method for foehnix Mixture Models

Used for prediction (perform foehn diagnosis given the estimated parameters on a new data set (newdata). If non new data set is provided (newdata = None) the prediction is made on the internal data set, the data set which has been used to train the foehnix mixture model. If a new data set is provided the foehn diagnosis will be performed on this new data set, e.g., based on a set of new observations when using foehnix for operational near real time foehn diagnosis.

Predictions will be stored in self.predictions.

Parameters:
newdata : None or pandas.DataFrame

None (default) will return the prediction of the unerlying training data. If a pandas.DataFrame provided, which contains the required variables used for model fitting and filtering, a prediction for this new data set will be returned.

returntype : str

One of:

  • 'response' (default), to return the foehn probabilities

  • 'all', the following additional values will be returned:

    • density1, density of the first component of the mixture model
    • density2, density of the second component (foehn component) of the mixture model
    • ccmodel, probability from the concomitant model