FERMATRICA (pronounced as "Fermatritsa") allows the construction of time series models and panel models with a focus on marketing mix modeling. The core functionality can also be applied to tasks from other subject areas.
The approach used separates the model definition into two contours:
- Inner contour - generally a linear model.
- Outer contour - transformations that occur before building/executing the linear model and/or after it.
By splitting the model into two parts, we avoid the issue of adjusting parameters/coefficients for a complex nonlinear model directly. Nonlinearity is moved to a separate contour with appropriate algorithms, effectively representing parameterized feature engineering. The inner contour retains the transformed variables with included nonlinearity, allowing for the use of simple and fast linear algorithms like OLS/LME.
The specificity of FERMATRICA is a broader interpretation of the outer contour. The classical approach allows building models with only one type of dependency of the target variable on factors - either additive or multiplicative. In FERMATRICA, you can add multiplicative factors to additive ones by specifying them in the LHS transformations. Such additional factors will be optimized using the outer contour alongside the transformation parameters.
In addition to multiplicative factors, other transformations can be added to the outer contour, including auxiliary models for correcting both Y and X.
Among other advantages of FERMATRICA are wide and flexible support for panel models, availability of global and local search algorithms for the outer contour, modularity (new algorithms can be included as development progresses), and a broad range of supported transformations.
FERMATRICA consists of three publicly available reposotories, install them all for most scenarios.
- Clone repos
cd [my_fermatrica_folder]
git clone https://github.com/FERMATRICA/fermatrica_utils.git
git clone https://github.com/FERMATRICA/fermatrica.git
git clone https://github.com/FERMATRICA/fermatrica_rep.git
- Install each via
pip install [path]
FERMATRICA was first designed by OKKAM Business Data Science Team. Please contact us if any additional info, support or consulting is required.