Skip to main content

Cassandra library

Project description

Cassandra

Cassandra's library for Marketing Mix Modeling

To best perform an mmm, you will need to perform these processes in order:

  • Data Processing
  • Data Analysis
  • Trasformations
  • Models
  • Model Evaluation

Build your MMM

Create your settings variables (settings_csv, settings_variables, settings_models) as shown below:

  • settings_csv
settings_csv = {
    'pathcsv': 'path/to/dataset.csv',
    'delimiter': ',',
    'subset_columns': ['ordine_data','revenue','transazioni','google_search_spent','google_performance_max_spent','google_display_spent','fb_retargeting_spent','fb_prospecting_spent','bing_spent','bing_organico','google_organico','referral','email_sessioni','cambio_eur_dollaro','ios_14','Offerte'],
    'rename': {'ordine_data':'data'},
    'data': 'data',
    'target': 'revenue'
}
  • settings_variables
settings_variables = {
    'medias': ['google_search_spent','google_performance_max_spent','google_display_spent','fb_retargeting_spent','fb_prospecting_spent','bing_spent'],
    'organic': ['bing_organico', 'google_organico', 'referral', 'email_sessioni', 'cambio_eur_dollaro', 'ios_14',
               'Offerte', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom', 'month', 'year'],
    'seasonal_categorical': ['month', 'year', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'],
    'general_categorical': ['ios_14', 'Offerte'],
    'general_numeric': ['bing_organico', 'google_organico', 'referral', 'email_sessioni', 'cambio_eur_dollaro']
}
  • settings_models
settings_models = {
        "model": 'nevergrad',
        "linear_metric": ['accuracy', 'nrmse', 'mape'],
        "linear_coeffs": True,
        "ols_constant": True,
        "log_linear_metric": ['accuracy', 'nrmse', 'mape'],
        "log_linear_coeffs": True,
        "ridge_metric": ['accuracy', 'nrmse', 'mape'],
        "deep_learning_metric": ['accuracy', 'nrmse', 'mape'],
        "nevergrad_metric": ['accuracy', 'nrmse', 'mape'],
        'nevergrad_variables': {
            'google_search_spent': {
                'lower':0,
                'upper':3
            },
            'google_performance_max_spent': {
                'lower':0,
                'upper':6
            },
            'google_display_spent': {
                'lower':0,
            }
        },
        'nevergrad_budget': 2500
    }

Run your MMM

main.build(settings_csv, settings_variables, settings_models)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cassandra_mmm-0.1.10.tar.gz (213.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page