Puppet Class: profile::product_analytics::forecasting

Defined in:
modules/profile/manifests/product_analytics/forecasting.pp

Overview

Provision for forecasting

Install and configure R and install Product Analytics-specific essential R/Python2 packages for training time series models and generating forecasts.

filtertags: labs-project-discovery-stats



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'modules/profile/manifests/product_analytics/forecasting.pp', line 7

class profile::product_analytics::forecasting {
    require profile::product_analytics::probabilistic

    $r_packages = [
        'forecast', # Forecasting Functions for Time Series and Linear Models
        'prophet',  # Automatic Forecasting Procedure
        'bsts'      # Bayesian Structural Time Series
    ]
    r_lang::cran { $r_packages:
        require => R_lang::Cran['rstan'],
        timeout => 12000,
    }

    package { 'pystan':
        ensure   => 'installed',
        require  => [
            Package['python-dev'],
            Package['python-numpy'],
            Package['python-cython']
        ],
        provider => 'pip',
    }
    package { 'fbprophet':
        ensure   => 'installed',
        require  => [
            Package['pystan']
        ],
        provider => 'pip',
    }

}