Yuan Blog

「仰望星空 脚踏实地」

Extreme Programming Essentials

5 most important tips

Below I listed the 5 most important “XP” points for my reference during development: Test First (TDD) Write the test before the code. If it doesn’t fail, don’t write the logic. ...

Rewrite A Class In A Third party Package

From Runtime Replacement To Classpath Shadowing

How to Rewrite a Class in a Third-Party Package You can rewrite a class in a third-party package. The strategy you choose depends heavily on your programming language (dynamic vs. static) and the...

Deep Dive: How Google's TBR Matched Markets Algorithm Searches for Treatments and Controls

searching strategies explained

In Causal Impact analysis (specifically Time-Based Regression or TBR), the hardest part isn’t running the regression—it’s designing the experiment. Finding the perfect combination of Treatment loc...

Magic Methods in Python

with examples

Python Magic Methods (Dunder Methods) “Magic methods” (also known as dunder methods, short for “double underscore”) allow you to define how your custom objects behave with built-in Python operatio...

Statistical Inference of Time Series Prediction Intervals in Linear Regression

Understanding the cihw calculation in Time Based Regression

This document breaks down the statistical logic behind the confidence interval half-width (cihw) formula used in TBR analysis. It explains how the code translates standard OLS prediction variance ...

Python Property Decorator

explained with examples

In Python Class, @ decorator with @property is used to implement encapsulation, meaning that methods are disguised as attributes, so that when the user reads or modifies the data, additional check...

tricks_running_notebooks_in_cloud_clusters

env_long run_etc

Cloud clusters hum, notebooks run, and you just wait the work get done. Run notebook in the background Build a new notebook in the same directly of (NOTEBOOK_TO_RUN), and run it! Click Cell...

Power Analysis for ANOVA

Post hoc ANOVA type 2 and type 3 analysis

Beyond the F-Test: Power’s Echo in Post-Hoc Truths Note: Python codes can be found here( power_analysis_python_readingFromExcel.ipynb ) Note: [Anova – Type I/II/III SS explained]( is...

Combination therapy targeting Alzheimer's disease risk factors is associated with a significant delay in Alzheimer's disease–related cognitive decline

analysis from real world evidence

Old remedies, new songs for memories redeemed Note: The online version of our recent publication is open accessible for more and detailed information: https://alz-journals.onlinelibrary...

SupplyChain Acharya:AI Agent for Retail Challenge

Gen AI Capstone 2025Q1 by Kaggle

Multi-Agent Minds, One Mission. Kaggle Notebook The Kaggle Notebook for this blogpost (including code implementations and demos) could be found at: Note: [SupplyChain Acharya:AI Agent for R...