Skip to main content

MODELOS DE ATRIBUCION

Esta es una librería creada para el trabajo con modelos de atribución sobre datos de marketing digital. Con esta librería se podrán crear modelos heurísticos (First click, Last click, Linear) o modelos data-driven (Markov, Shapley). Funciona tanto con datos previamente formateados como con datos sin formatear.

INSTALACIÓN

pip install atribucion

CÓMO SE USA

Primero, es necesario crear un modelo pasando la data a utilizar. Se deberá indicar si la información fue previamente formateada o no.

La data formateada debe ser un dataframe con 2 columnas:

  1. lista o array de recorridos (string)
  2. conversión (boolean o int)

La data sin formatear debe ser un dataframe con 4 columnas:

  1. tiempo (date o timestamp)
  2. usuario (string)
  3. canal (string)
  4. conversion (boolean o int)
modelo = atribucion.Modelo(data, formateada=True)

Si la data no está formateada, se puede formatear para Markov o para Shapley. Los modelos heurísticos usan indistintamente cualquiera de las dos. Para formatear la data, hay que indicar 3 parámetros:

  1. ventana (int): cuántos días para atrás de la conversión se van a tener en cuenta para armar los recorridos.
  2. touchpoints (int): la mayor cantidad de touchpoints que se admiten en cada recorrido.
  3. conversión (bool): si se corta cada recorrido al encontrar una conversión o no.
modelo.formatear_markov(ventana=30, touchpoints=8, conversion=True)
modelo.formatear_shapley(ventana=30, touchpoints=8, conversion=True)

Luego, se piden los modelos deseados llamando a la función correspondiente. La única que admite un parámetro es markov (el orden).

resultado_markov = modelo.markov(orden=1)
resultado_shapley = modelo.shapley()
resultado_first = modelo.first()
resultado_last = modelo.last()
resultado_linear = modelo.linear()

Metadata

Release files for atribucion 2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atribucion 2.3
File Size Uploaded Provenance
atribucion-2.3.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for atribucion 2.3
File Interpreter ABI Platform
atribucion-2.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / atribucion-2.3.tar.gz

Download URL atribucion-2.3.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d224bab51871f3b249b937e5e20cb7b61751cde413d15feee06157908fb4ef33
BLAKE2b-256 checksum
How to use checksums
30e5e94548c00fed12794e54fde5d2c2093c56a1ff5ae7deda06ad64664d2a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.9

Release files / atribucion-2.3-py3-none-any.whl

Download URL atribucion-2.3-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afb38ae993bd32e6477344a31e3671782eafd0c2533a1cc8c4d90b3b5e492478
BLAKE2b-256 checksum
How to use checksums
37f1892868294ec8fec8da19b3cdfd273c6a7b11d91fb2d6aaf23533cf70c100
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.9

Security for atribucion 2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page