Skip to content

Instantly share code, notes, and snippets.

View markdregan's full-sized avatar

Mark Regan markdregan

  • Product Manager, Google Assistant
  • Dublin
View GitHub Profile
@markdregan
markdregan / probatus_simulation.py
Last active July 2, 2023 20:41
Probatus simulation to demonstrate impact of PR #218
from probatus.feature_elimination import ShapRFECV, EarlyStoppingShapRFECV
from sklearn.datasets import make_classification
from catboost import CatBoostClassifier
import numpy as np
import pandas as pd
def get_best_idx(shap_report):
shap_report["eval_metric"] = shap_report["val_metric_mean"]
best_iteration_idx = shap_report["eval_metric"].argmax()
@markdregan
markdregan / gist:ffa0e62d7a020391e826
Created September 27, 2015 02:09
Discrete variable PYMC3 issue
{
"cells": [
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
@markdregan
markdregan / pymc_post_pred_sampling_issue.ipynb
Created August 31, 2015 15:32
Pymc Post Pred Sampling Issue
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###Plot posterior predictive distribution from hierarchal model"
]
},
{
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###Plot posterior predictive distribution from hierarchal model"
]
},
{
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###Plot posterior predictive distribution from hierarchal model"
]
},
{