Skip to content

Instantly share code, notes, and snippets.

@soodoku
soodoku / README.md
Created November 2, 2026 06:14
Adaptive LassoCV: six fixed datasets, 200 independent pairs each; evidence for scikit-learn PR 35288

Adaptive LassoCV: fixed-data reproducibility experiment

This experiment evaluates the library implementation in scikit-learn PR #35288, commit 3ac07a78ca6180035c699ef5f2ea97766431dd1b in the finite-sample fork. It is supporting evidence, not a benchmark added to the upstream source tree.

Protocol

The six prespecified cells cross independent Gaussian features or Toeplitz correlation 0.7**abs(i-j) with strong, weak, or null signals. The coefficient vectors begin with [1, -.8, .6], [.25, -.2, .15], or zeros, respectively; the remaining coefficients are zero. Each cell uses one fixed dataset with 80 training rows, 10 features, independent unit Gaussian noise, and a fixed 2,000-row test set. Dataset seeds are 20261101 + cell.

Each cell has 200 independent pairs (400 executions). Each execution fits ordinary single randomized 5-fold CV, fixed 10/50/100/500 repetitions, and adaptive CV using the actual LassoCV API. Methods within an exec

@soodoku
soodoku / readme.md
Last active September 13, 2025 22:22
Personality Change

Personality Change

Personality psychology reports "moderate stability" of traits across adulthood, but what does this mean for individuals? We simulated how likely someone is to obtain similar Big Five personality test results over a 30-year span, critically accounting for measurement error.

Method: We generated 10,000 individuals with Big Five traits following a multivariate normal distribution with empirical intercorrelations (e.g., Neuroticism with Extraversion: -0.22). We modeled personality at Time 2 using the test-retest formula: New_Score = Old_Score × r + error × √(1-r²), adding measurement error (reliability = 0.82, per Gnambs 2014) at both time points. We defined "meaningful change" as shifts exceeding 0.5 standard deviations. Crucially, we established a baseline scenario with perfect stability (r=1.0) to isolate measurement error effects, finding that 33% appear to change due to measurement error alone. We then examined: Soldz & Vaillant's (1999) 30-year correlations (E: 0.19, N: 0.20, O: 0.3

@soodoku
soodoku / sentiment.py
Last active August 20, 2025 23:37
Ribeiro Style Robustness Checks
# -*- coding: utf-8 -*-
"""sentiment_ribeiro_style_checklist.ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1uyBg9-sidauCSSO6dcztl552HVSAgkUJ
"""
"""
@soodoku
soodoku / empirical-logistic.stan
Last active May 14, 2025 05:52
Wasserstein Prior
data {
int<lower=0> N;
int<lower=0> D;
matrix[N, D] x;
array[N] int<lower=0, upper=1> y;
real<lower=0> h;
int<lower=0> B;
array[B] vector[D] beta0;
@soodoku
soodoku / data.py
Created April 24, 2025 04:24
List all dataverse repos.
#!/usr/bin/env python3
import argparse
import json
import requests
import sys
from urllib.parse import quote
def parse_arguments():
"""Parse command line arguments"""
parser = argparse.ArgumentParser(description="List Dataverse datasets owned by a user and convert to JSON")
@soodoku
soodoku / Continuous Hinger.md
Last active April 15, 2025 21:32
Continuous Hinge Function
@soodoku
soodoku / calibration_plot.png
Last active April 13, 2025 21:09
Vanilla Xgboost miscalibration
calibration_plot.png
@soodoku
soodoku / dataverse.py
Created April 3, 2025 18:59
Dataverse Uploaded
#!/usr/bin/env python3
"""
Dataverse File Uploader
A script to upload files to Harvard Dataverse or other Dataverse instances.
"""
import os
import argparse
import requests
@soodoku
soodoku / tariffs.ipynb
Last active April 3, 2025 17:29
Tariffs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soodoku
soodoku / Readme.md
Last active March 5, 2025 01:05
i4replication scraper

Scraping the abstracts for the discussion papers by i4replication.org.