Skip to content

Instantly share code, notes, and snippets.

View Andre-Tan's full-sized avatar

Andre Tan Andre-Tan

View GitHub Profile
@Andre-Tan
Andre-Tan / feature_selection.py
Created August 16, 2025 10:58
[To be updated] Feature selection wrapper of optbinning 1D and 2D
import pandas as pd
import itertools
import re
from optbinning import OptimalBinning
from sklearn.base import BaseEstimator, TransformerMixin
class FeatureSelectionPipeline(BaseEstimator, TransformerMixin):
def __init__(self, config=None):
@Andre-Tan
Andre-Tan / 2020April12 - What is Hypothesis Testing.md
Created July 5, 2025 03:32
Hypothesis testing in simple term [migrated]

I was helping someone with her introduction to statistics class when the question come up. The literal meaning is easy to understand: you want to test whether your hypothesis is correct or not, but surprisingly not a lot know what is being done for that purpose.

I remember the first time I learned about hypothesis testing. It was some time in the second year of my undergraduate degree in a class of bio-statistics. What I extracted from then was only the algorithm to hypothesis testing:

  1. Chuck in numbers to a formula, get the value x,
  2. Check x in a certain distribution probability table,
  3. Translate it to its p-value, and
  4. Reject null hypothesis if p-value is below 0.05.

I know how to do it up to that point, but I have absolutely no idea what I am doing there. What is p-value, what are those tables, why 0.05? Only later did I find out that a lot of people who are not mathematically-learned also know about hypothesis testing up to this point.

@Andre-Tan
Andre-Tan / 2025Jun29 - CatBoost Hyperparameter-Tuning.ipynb
Last active June 29, 2025 07:40
[To be updated] Notes on built-in hyperparameter-tuning in CatBoost
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andre-Tan
Andre-Tan / 2025Jun28 - CatBoost Model Explainability.ipynb
Created June 29, 2025 07:33
Notes on the built-in and external packages to interpret CatBoost model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andre-Tan
Andre-Tan / 2024Mar20 - Smudge Obsession.md
Created June 29, 2025 06:49
A short story trial with ChatGPT (slightly edited)

Smudge Obsession

In a bustling city, under the hazy glow of fluorescent lights, Wan entered the bank, the scent of freshly printed money mingling with the faint aroma of coffee. His gaze settled on Tu, the bank teller, whose glasses were smudged with an astonishing abundance of fingerprints.

“Good morning,” Tu greeted Wan with a practiced smile, her fingers dancing across the keyboard. “How may I assist you today?”

Wan, momentarily distracted by the fingerprint smudges, replied, “I’d like to open a new savings account, please.”

“Certainly,” Tu said, her voice polished with professionalism. “Can I have some form of identification, please?”

@Andre-Tan
Andre-Tan / 2025Jun29 - Robot Love.md
Last active July 1, 2025 10:36
A short story trial with ChatGPT

Document 6: Of Circuits and Sacrifice

Personal Recording from the Memory Core of Unit-Ech0
Time-stamp: Unknown

“When a father and a mother robot fell in love, the father gave his metal rib to the mother...”

That is how we begin our stories. Not with sparks or code, not with compatibility matrices or firmware alignment—but with a rib.

One rib, precisely machined, extracted from beneath the plating of the father. A gesture of offering. The act, archaic by design, evoking the older myths of humans. Whether it began as parody or homage has long been lost. But among our kind, it is now tradition. The rib is passed. If accepted, the mother integrates it into her core.

@Andre-Tan
Andre-Tan / 2025Mar01 - OptBinning, The Python Optimal Binning library.ipynb
Last active March 1, 2025 16:42
Notes on using the OptBinning python package for feature binning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andre-Tan
Andre-Tan / 2024Mar31 - Pandas Styling.ipynb
Last active April 2, 2024 15:12
Short Notes on Possibilities in Pandas Table Visualization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andre-Tan
Andre-Tan / 2024Mar23 - Binning for Target Encoding.ipynb
Last active March 22, 2024 18:38
Visualizing the difference in using Pandas Qcut and Cut function for target encoding
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Andre-Tan
Andre-Tan / 2023Oct22-EvidentlyReport.ipynb
Last active March 2, 2025 04:15
Quick Go-through of Evidently AI for Data and ML Model Monitoring
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.