Snippets

Du code concis, avec une explication claire.

python

lightgbm: contraintes monotones

Imposer des relations monotones entre features et prédictions.

#lightgbm#constraints#monotonicity
python

imblearn SMOTETomek: suréchantillonnage + nettoyage

combiner SMOTE avec TomekLinks pour nettoyer les frontières

#imblearn#smote#tomek
python

lightgbm: poids d'échantillons et ranking

Passer des poids et groupes (LTR) via Dataset ou API sklearn.

#lightgbm#weights#ranking
python

lightgbm + optuna: tuning bout en bout

Optimiser LGBMClassifier avec Optuna et early stopping.

#lightgbm#optuna#tuning
python

lightgbm: regressor avec early stopping

Utiliser lightgbm.train avec Dataset et early stopping pour régression.

#lightgbm#regression#early-stopping
python

lime: kernel_width et features

Ajuster le noyau et le nombre de features pour stabilité.

#lime#kernel-width#features
python

lime: expliquer une prédiction tabulaire

Expliquer localement une prédiction de modèle via LIME.

#lime#explainability#tabular
python

matplotlib: imshow heatmap

Afficher une matrice comme carte de chaleur.

#matplotlib#imshow#heatmap
python

matplotlib: subplots layout

Créer plusieurs axes et ajuster l'espacement.

#matplotlib#subplots#layout
python

mlflow: log model et artefacts

Sauvegarder modèles, figures et fichiers dans un run.

#mlflow#artifacts#log-model
python

mlflow: model registry

Enregistrer un modèle, créer des versions et promouvoir de Staging à Production.

#mlflow#model-registry#staging
python

mlflow: autolog sklearn

Activer l'autologging pour capturer params/métriques automatiquement.

#mlflow#autolog#sklearn