Skip to content

Instantly share code, notes, and snippets.

@gitgithan
gitgithan / rf_bias.py
Created December 23, 2018 03:53 — forked from rnowling/rf_bias.py
Simulate RF Categorical Variable Encoding Bias
import random
import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestClassifier
N_SAMPLES = 1000
N_TREES = 100
MAX_CATEGORIES = 32
@gitgithan
gitgithan / Exploring stack, melt, pivot_table.ipynb
Last active April 25, 2024 03:08
Exploring stack, melt, pivot_table
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gitgithan
gitgithan / README.md
Created December 3, 2018 04:19 — forked from tmilos/README.md
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation