Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ protection*.json
*.patch
outputs/*.png
outputs/*.pdf

# generated metadata (timestamps change on each run)
data/synthetic/*_meta.json
11 changes: 0 additions & 11 deletions data/synthetic/fitness_meta.json

This file was deleted.

10 changes: 9 additions & 1 deletion scripts/ch13_fitness_mixed.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# SPDX-License-Identifier: MIT
import argparse, os
import argparse, os, math
import numpy as np, pandas as pd
import statsmodels.formula.api as smf
import matplotlib; matplotlib.use("Agg")
import matplotlib.pyplot as plt

# --- make Windows console UTF-8 friendly ---
import sys
if os.name == "nt":
try:
sys.stdout.reconfigure(encoding="utf-8")
except Exception:
pass

def hedges_g(a, b):
na, nb = len(a), len(b)
sa, sb = a.var(ddof=1), b.var(ddof=1)
Expand Down