foehnix.Foehnix

class foehnix.Foehnix(predictor, data, concomitant=None, switch=False, filter_method=None, family='gaussian', control=None, **kwargs)[source]

Foehn Classification Based on a Two-Component Mixture Model

This is the main method of the foehnix package to estimate two-component mixture models for automated foehn classification.

__init__(predictor, data, concomitant=None, switch=False, filter_method=None, family='gaussian', control=None, **kwargs)[source]

Initialize parmeters which all methods need.

Parameters:
predictor : str

Name of the main predictor (covariate) variable which is used to identify the foehn/no-foehn cluster. Must be present in data.

data : pandas.DataFrame

Index must be a time object, rows must contain neccesary data

concomitant : str or list of str

Name(s) of the covariates for the concomitant model. Must be present in data. If None (default), a mixture model without concomitants will be initialized.

switch : bool
  • False (default) if higher values of covariate y are assumed to be the foehn cluster.
  • True if lower values are the foehn cluster.
filter_method : dict, function or None

Evaluates a filter on the data. E.g. a filter on the wind direction data to only use data from within a certain wind sector. See foehnix.foehnix_filter for details on the syntax.

family : str or foehnix.Family class
  • ‘gaussian’ (default)
  • ‘logistic’
control : foehnix.foehnix.Control

If None (default) it will be initialized.

kwargs : kwargs to pass to the control function

Methods

__init__(predictor, data[, concomitant, …]) Initialize parmeters which all methods need.
no_concomitant_fit(y, control) Fitting foehnix Mixture Model Without Concomitant Model.
plot(which, **kwargs) Plotting method, helper function.
predict([newdata, returntype]) Predict method for foehnix Mixture Models
summary([detailed]) Prints information about the model
unreg_fit(y, logitx, control) Fitting unregularized foehnix Mixture Model with Concomitant Model.