FC Barcelona Sierra Leone

FC Barcelona Sierra Leone 🇸🇱 Data Scientist | AI Educator | Founder, RiseAfrica Foundation for STEM & Innovation. Learn • Build • Share • Inspire.
(2)

Helping Africans learn AI, Data Science & technology to solve real-world problems.

Your model worked in the notebook and crashed in production. A new city showed up.pd.get_dummies builds columns from wha...
10/08/2026

Your model worked in the notebook and crashed in production. A new city showed up.

pd.get_dummies builds columns from whatever data it sees. Fit a OneHotEncoder(handle_unknown='ignore') on train, inside a Pipeline, so new categories can't break it.

Comment ONEHOT for the notes.

Overall retention looks steady at 40%. Your newest customers are leaving faster.Group customers by signup month and trac...
10/08/2026

Overall retention looks steady at 40%. Your newest customers are leaving faster.

Group customers by signup month and track what % come back in month 1, 2 and 3. A cohort table shows what the blended number hides.

Comment COHORT for the notes.

Your daily revenue chart has 29 points for a 31-day month.GROUP BY order_date only returns days that had orders. Build a...
10/08/2026

Your daily revenue chart has 29 points for a 31-day month.

GROUP BY order_date only returns days that had orders. Build a date spine with generate_series, LEFT JOIN your data onto it, and COALESCE empty days to 0.

Comment SPINE for the notes.

10/08/2026

Is your model stubborn, or is it wild?

The stubborn striker only shoots to the near corner. Same mistake, every game. The wild striker tries a bicycle kick every attack. Different miss, every time.

Your model does the same. Too simple and it misses the pattern. That is bias. Too complex and it memorizes the noise. That is variance.



Which one is your model: stubborn or wild? Tell me in the comments.

Your test set has 200 rows and only 1 fraud case. That's not an evaluation, that's a coin flip.Use stratify=y and Strati...
10/07/2026

Your test set has 200 rows and only 1 fraud case. That's not an evaluation, that's a coin flip.

Use stratify=y and StratifiedKFold so the rare class shows up in every split.

Comment STRATIFY for the notes.

10/07/2026

Most models do not just say yes or no. They give a number. Lesson 33: always ask the model for its confidence, not just its answer. Fifty-one percent is a coin flip wearing a suit.

Draw a line: below seventy percent, a human checks it first. Comment your cutoff.

One $900K salary turns a $63K team into a "$146K average."On skewed data the mean lies. Report the median, plus p25, p75...
10/07/2026

One $900K salary turns a $63K team into a "$146K average."

On skewed data the mean lies. Report the median, plus p25, p75 and p90.

Comment MEDIAN for the notes.

10/07/2026

A model that approves loans for men but rejects women with the same income is not accurate. Lesson 32 is the fairness question: does your model say no to everyone, or just to people like you?

Ninety percent accuracy means nothing until you ask: ninety percent for whom? Comment your answer.

Your pivot shows 5 regions. The company has 6.SUM(CASE WHEN ...) turns rows into columns, but a region with no rows neve...
10/07/2026

Your pivot shows 5 regions. The company has 6.

SUM(CASE WHEN ...) turns rows into columns, but a region with no rows never shows up. Start from the regions table, and use ELSE 0 so empty means 0, not NULL.

Comment PIVOT for the notes.

10/07/2026

Counterfactuals told you what would flip a no to a yes. But some of those answers are useless to you. Lesson 31 is actionable recourse: the same what-if question, with one new rule. Only changes you can actually make.

The model says be ten years younger and you get the loan. You cannot do that. Recourse turns a what-if into a to-do list.

If a model rejected you, what is one change you could actually make? Comment it below.

Address

Somerset
Jersey City, NJ
08873

Website

Alerts

Be the first to know and let us send you an email when FC Barcelona Sierra Leone posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Featured

Share

Category