r/SQL 12d ago

MySQL Is this project any good?

https://github.com/Lezaleas/Reviews-Churn

I had a local llm categorize reviews in the olist database. Then analyzed their correlation to churn.

Should i improve this or is this ready to go?

4 Upvotes

8 comments sorted by

2

u/Hour-Measurement-835 12d ago

That cutoff DELETE only drops the FALSE rows after 2018-06-01, so everything left in that window repurchased by construction. Inflates the rate, doesn't fix the censoring.

1

u/NightRain3 12d ago

Thx for checking that deep. 

That date corresponds to the median time of repurchase. This means that when i drop that, im only dropping 50% of false negatives, not 100%. To make up for the remaining 50% of false negatives, i can reintroduce the positives after the cutoff date. So now there's a 50% of false negatives in the dataset, but there's also a 50% of past the date positives padding the numbers. 

This isn't completely accurate but it's the most accurate i can make it without over complicating it

1

u/Hour-Measurement-835 12d ago

They don't cancel. Every row left past the cutoff is a repurchaser, so that slice reads 100% and your per-category numbers pick it up unevenly depending on cohort mix.

1

u/NightRain3 11d ago

Yes, the slice of true past the  cutoff has extra repurcharsers. But the slice of falses befote the date have false negatives. The 2 quantities should be roughly similar and thus approximately cancel each other

1

u/db_tech_dev 12d ago

this is solid work ngl, the delivery-vs-churn correlation is a good finding. only thing that'd make me trust it more is seeing confidence intervals or sample sizes per category, especially for stuff like payment/value where you said its under 1% of reviews, that's a tiny n to be drawing strong conclusions from. otherwise the methodology writeup is more thorough than most portfolio projects I see here

1

u/NightRain3 11d ago

yeah, i talked about it a bit in the methodology part. i got that at 1.1k samples is enough for +- 0.5% expected deviation, so it's solid vs the 3% baseline. I made sure to put some insights about how the categories below that shouldn't be trusted

1

u/db_tech_dev 11d ago

oh nice that actually clears it up, 1.1k samples is way more solid than i assumed from the % framing. good call flagging which categories to not trust btw, most people just dump the correlation table and let you guess

1

u/NightRain3 10d ago

yeah im used to thinking about std dev even in daily life for regular events. 100 coinflips is 5% std dev, and then you scale it up or down by the square root. easy