Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Conditions préalables et recommandations concernant le système
Python 3.11 ou 3.12 est requis pour utiliser Meridian.
Nous vous recommandons également d'utiliser au moins un GPU.
Installer
Exécutez la commande suivante pour installer automatiquement la version publiée de Meridian la plus récente depuis PyPI.
Linux (GPU)
python3-mpipinstall--upgrade'google-meridian[and-cuda]'# Verify the installation:python3-c"import meridian; print(meridian.__version__)"
macOS
python3-mpipinstall--upgrade'google-meridian'# Verify the installation:python3-c"import meridian; print(meridian.__version__)"
CPU
python3-mpipinstall--upgrade'google-meridian'# Verify the installation:python3-c"import meridian; print(meridian.__version__)"
Le plus récent
python3-mpipinstall--upgradegit+https://github.com/google/meridian.git
# Verify the installation:python3-c"import meridian; print(meridian.__version__)"
Utiliser la bibliothèque Meridian
Vous pouvez exécuter le code Meridian de manière programmatique à l'aide d'exemples de données avec le colab de démarrage.
Le modèle Meridian utilise une approche d'échantillonnage MCMC holistique appelée No U-Turn Sampler (NUTS), qui peut nécessiter de nombreux calculs. Pour vous aider, la compatibilité avec le GPU a été développée dans la bibliothèque (prête à l'emploi) à l'aide de tenseurs. Nous vous recommandons d'exécuter votre modèle Meridian sur des GPU pour obtenir des résultats d'optimisation en temps réel et réduire considérablement le temps d'entraînement.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/29 (UTC).
[null,null,["Dernière mise à jour le 2025/07/29 (UTC)."],[[["\u003cp\u003eMeridian requires Python 3.11 or 3.12 to operate.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to use at least 1 GPU for optimal performance, with testing performed on V100 and T4 GPUs with 16 GB of RAM.\u003c/p\u003e\n"],["\u003cp\u003eMeridian can be installed using the command: \u003ccode\u003epip install --upgrade google-meridian\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMeridian utilizes a compute-intensive No U Turn Sampler (NUTS) approach, and leveraging GPUs is advised to speed up optimization and reduce training times.\u003c/p\u003e\n"]]],["Meridian requires Python 3.11 or 3.12 and recommends at least 1 GPU (V100 or T4 with 16GB RAM tested). Installation via `pip` uses: `python3 -m pip install --upgrade 'google-meridian[and-cuda]'` (Linux/GPU), `google-meridian` (macOS/CPU). CPU-only install also uses `google-meridian`. To verify the install, run: `python3 -c \"import meridian; print(meridian.__version__)\"`. The library, which uses No U-Turn Sampler, is compute-intensive, thus GPU usage is recommended for real-time optimization and faster training.\n"],null,["# Install Meridian\n\nPrerequisites and system recommendations\n----------------------------------------\n\nPython 3.11 or 3.12 is required to use Meridian.\n\nWe also recommend using a minimum of 1 GPU.\n| **Note:** This project has been tested on V100 and T4 GPU using 16 GB of RAM.\n\nInstall\n-------\n\nTo install Meridian, run the following command to automatically install the most\nrecent published version from PyPI. \n\n### Linux (GPU)\n\n**Note:** CUDA toolchain and a compatible GPU device is necessary for `[and-cuda]` extra to activate. For CPU-only environment, see: \"CPU\". \n\n python3 -m pip install --upgrade 'google-meridian[and-cuda]'\n # Verify the installation:\n python3 -c \"import meridian; print(meridian.__version__)\"\n\n### macOS\n\n**Note:** There is no official GPU support for macOS. \n\n python3 -m pip install --upgrade 'google-meridian'\n # Verify the installation:\n python3 -c \"import meridian; print(meridian.__version__)\"\n\n### CPU\n\n python3 -m pip install --upgrade 'google-meridian'\n # Verify the installation:\n python3 -c \"import meridian; print(meridian.__version__)\"\n\n### Latest\n\n python3 -m pip install --upgrade git+https://github.com/google/meridian.git\n # Verify the installation:\n python3 -c \"import meridian; print(meridian.__version__)\"\n\nHow to use the Meridian library\n-------------------------------\n\nYou can run the Meridian code programmatically using sample data with\nthe [Getting started colab](/meridian/notebook/meridian-getting-started).\n\nThe Meridian model uses a holistic MCMC sampling approach called\n[No U Turn Sampler (NUTS)](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/mcmc/NoUTurnSampler)\nwhich can be compute intensive. To help with this, GPU support has been\ndeveloped across the library (out-of-the-box) using tensors. We recommend\nrunning your Meridian model on GPUs to get real time optimization results and\nsignificantly reduce training time."]]