<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Home on Akanimoh | AfroLogicInsect</title><link>https://akandaniel.netlify.app/</link><description>Recent content in Home on Akanimoh | AfroLogicInsect</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://akandaniel.netlify.app/index.xml" rel="self" type="application/rss+xml"/><item><title>MLOPs: Sentiment Analysis with DISTILBert</title><link>https://akandaniel.netlify.app/projects/second-project/</link><pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/projects/second-project/</guid><description>&lt;h1 id="emotion-classification-api-summary">Emotion Classification API Summary&lt;a class="anchor" href="#emotion-classification-api-summary" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>A production-ready MLOps solution for text emotion classification using a fine-tuned DistilBERT model.&lt;/p>
&lt;h2 id="key-features">Key Features&lt;a class="anchor" href="#key-features" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;ul>
&lt;li>🚀 &lt;strong>FastAPI&lt;/strong> service for low-latency inference&lt;/li>
&lt;li>🤗 &lt;strong>Hugging Face&lt;/strong> model hosting (&lt;a href="https://huggingface.co/AfroLogicInsect/emotionClassifier">AfroLogicInsect/emotionClassifier&lt;/a>)&lt;/li>
&lt;li>🔄 Automated &lt;strong>CI/CD pipeline&lt;/strong> with GitHub Actions&lt;/li>
&lt;li>🐳 &lt;strong>Containerized&lt;/strong> deployment on &lt;a href="https://mlops-sentiment-distilbert.onrender.com/">Render&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="technical-stack">Technical Stack&lt;a class="anchor" href="#technical-stack" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Model&lt;/strong>: DistilBERT fine-tuned for 6 emotions (anger, fear, joy, love, sadness, surprise)&lt;/li>
&lt;li>&lt;strong>Infrastructure&lt;/strong>: Docker, GitHub Actions, Render&lt;/li>
&lt;li>&lt;strong>Monitoring&lt;/strong>: Basic metrics via Render dashboard&lt;/li>
&lt;/ul>
&lt;h2 id="usage-examples">Usage Examples&lt;a class="anchor" href="#usage-examples" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;div class="codeblock">
 &lt;div class="codeblock-bar">
 &lt;span class="codeblock-lang">bash&lt;/span>
 &lt;button type="button" class="copy-btn" aria-label="Copy code to clipboard">Copy&lt;/button>
 &lt;/div>
 &lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># cURL&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl -X POST &lt;span style="color:#e6db74">&amp;#34;https://mlops-sentiment-distilbert.onrender.com/predict&amp;#34;&lt;/span> &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> -H &lt;span style="color:#e6db74">&amp;#34;Content-Type: application/json&amp;#34;&lt;/span> &lt;span style="color:#ae81ff">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ae81ff">&lt;/span> -d &lt;span style="color:#e6db74">&amp;#39;{&amp;#34;text&amp;#34;: &amp;#34;I&amp;#39;&lt;/span>m excited!&lt;span style="color:#e6db74">&amp;#34;}&amp;#39;&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>&lt;div class="codeblock">
 &lt;div class="codeblock-bar">
 &lt;span class="codeblock-lang">python&lt;/span>
 &lt;button type="button" class="copy-btn" aria-label="Copy code to clipboard">Copy&lt;/button>
 &lt;/div>
 &lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-python" data-lang="python">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Python&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">import&lt;/span> requests
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>response &lt;span style="color:#f92672">=&lt;/span> requests&lt;span style="color:#f92672">.&lt;/span>post(&lt;span style="color:#e6db74">&amp;#34;https://mlops-sentiment-distilbert.onrender.com/predict&amp;#34;&lt;/span>, 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> json&lt;span style="color:#f92672">=&lt;/span>{&lt;span style="color:#e6db74">&amp;#34;text&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;I&amp;#39;m excited!&amp;#34;&lt;/span>})
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>print(response&lt;span style="color:#f92672">.&lt;/span>json())&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
 &lt;/div>&lt;h2 id="project-structure">Project Structure&lt;a class="anchor" href="#project-structure" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;div class="codeblock">
 &lt;div class="codeblock-bar">
 &lt;span class="codeblock-lang">text&lt;/span>
 &lt;button type="button" class="copy-btn" aria-label="Copy code to clipboard">Copy&lt;/button>
 &lt;/div>
 &lt;pre tabindex="0">&lt;code>emotion-classifier/
├── app/ # FastAPI application
├── tests/ # Unit tests
├── .github/workflows/ # CI/CD automation
└── Dockerfile # Container config&lt;/code>&lt;/pre>
 &lt;/div>&lt;h2 id="resources">Resources&lt;a class="anchor" href="#resources" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/AkanimohOD19A/mlops-sentiment-distilbert.git">GitHub Repository&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://mlops-sentiment-distilbert.onrender.com/">Live Demo&lt;/a>&lt;/li>
&lt;li>&lt;a href="notebooks/training_notebook.ipynb">Training Notebook&lt;/a> (in repo)&lt;/li>
&lt;li>&lt;a href="https://huggingface.co/AfroLogicInsect/emotionClassifier">Hugging Face Model&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="workflow-diagrams">Workflow Diagrams&lt;a class="anchor" href="#workflow-diagrams" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;ol>
&lt;li>&lt;a href="#flowchart-training-to-deployment">Training to Deployment&lt;/a>&lt;/li>
&lt;li>&lt;a href="#cicd-workflow">CI/CD Pipeline&lt;/a>&lt;/li>
&lt;li>&lt;a href="#model-serving">Model Serving&lt;/a>&lt;/li>
&lt;/ol>
&lt;p>The solution demonstrates complete MLOps implementation from model training to production deployment.&lt;/p></description></item><item><title>ML Micro Services</title><link>https://akandaniel.netlify.app/projects/first-project/</link><pubDate>Fri, 16 Feb 2024 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/projects/first-project/</guid><description>&lt;h4 id="machine-learning-micro-services">Machine Learning Micro-services&lt;a class="anchor" href="#machine-learning-micro-services" aria-label="Link to this section">#&lt;/a>&lt;/h4>
&lt;p>content: Utilizing ML for computer vision to manipulate real-time data.
image: /images/placeholder.jpg
featured:
name: View Project
link: &lt;a href="https://akanimohod19a-transcription-services-app-qi0ntg.streamlit.app/">https://akanimohod19a-transcription-services-app-qi0ntg.streamlit.app/&lt;/a>
badges:
- &amp;ldquo;Python&amp;rdquo;
- &amp;ldquo;Streamlit&amp;rdquo;
- &amp;ldquo;Computer Vision&amp;rdquo;
- &amp;ldquo;Machine Learning&amp;rdquo;
links:
- icon: fa-solid fa-cloud
url: &lt;a href="https://share.streamlit.io/user/akanimohod19a">https://share.streamlit.io/user/akanimohod19a&lt;/a>&lt;/p>
&lt;p>Project description here.&lt;/p></description></item><item><title>Writing in the Work tab: a style guide</title><link>https://akandaniel.netlify.app/work/writing-guide/</link><pubDate>Sun, 29 Nov 2026 08:30:00 +0100</pubDate><guid>https://akandaniel.netlify.app/work/writing-guide/</guid><description>&lt;p>This page is both a guide and a test. Everything below is plain Markdown in a single &lt;code>.md&lt;/code> file. Create a new post with &lt;code>hugo new work/my-post.md&lt;/code>, set &lt;code>draft: false&lt;/code> when it&amp;rsquo;s ready, and push.&lt;/p>
&lt;h2 id="text-and-structure">Text and structure&lt;a class="anchor" href="#text-and-structure" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Body text uses a serif face for comfortable long reading, with &lt;strong>bold&lt;/strong>, &lt;em>italic&lt;/em>, &lt;del>strikethrough&lt;/del>, &lt;code>inline code&lt;/code> and &lt;a href="https://gohugo.io">links&lt;/a>. Hover a heading to reveal its permalink, and the table of contents on the right follows you as you scroll.&lt;/p></description></item><item><title>Building a Free AI Agent Inside Google Workspace</title><link>https://akandaniel.netlify.app/blogs/building-a-free-ai-agent-inside-google-workspace/</link><pubDate>Sun, 29 Nov 2026 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/blogs/building-a-free-ai-agent-inside-google-workspace/</guid><description>&lt;p>I like building things on a zero-cost stack as a discipline, not just a budget. Most of my automation already lives in Google Sheets and Apps Script, so the obvious question was whether the &lt;em>agent&lt;/em> could live there too: a chat interface that can call tools, with no server to host and no platform to subscribe to.&lt;/p>
&lt;p>It can. I called the project &lt;strong>Cheap LLM chatbot&lt;/strong>, and this is how it works.&lt;/p></description></item><item><title>50 Data Science Lesson Cards</title><link>https://akandaniel.netlify.app/blogs/50_data_science_lesson-cards/</link><pubDate>Fri, 13 Mar 2026 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/blogs/50_data_science_lesson-cards/</guid><description>&lt;style>
*{box-sizing:border-box;margin:0;padding:0}
body{background:transparent}
.wrap{padding:16px 0;font-family:'Courier New',monospace}
.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap;gap:8px}
.filters{display:flex;gap:6px;flex-wrap:wrap}
.fb{padding:4px 12px;border-radius:20px;border:1px solid var(--color-border-tertiary);background:var(--color-background-secondary);color:var(--color-text-secondary);cursor:pointer;font-size:11px;font-family:inherit}
.fb.on{background:var(--color-background-info);color:var(--color-text-info);border-color:var(--color-border-info)}
.count{font-size:12px;color:var(--color-text-tertiary)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.card{background:#0d1117;border-radius:12px;padding:20px;cursor:pointer;border:1px solid #21262d;transition:border-color .15s,transform .15s;position:relative;min-height:180px;display:flex;flex-direction:column;gap:10px}
.card:hover{border-color:#388bfd;transform:translateY(-2px)}
.card-top{display:flex;align-items:center;justify-content:space-between}
.tag{padding:3px 9px;border-radius:20px;font-size:10px;font-weight:700;letter-spacing:.5px}
.num{font-size:11px;color:#484f58}
.title{font-size:14px;font-weight:700;color:#e6edf3;line-height:1.4}
.body{font-size:12px;color:#8b949e;line-height:1.6;flex:1}
.code{background:#010409;border-radius:6px;padding:8px 10px;font-size:11px;color:#79c0ff;line-height:1.6;border-left:2px solid #388bfd;white-space:pre;overflow-x:auto}
.tip{font-size:11px;color:#3fb950;margin-top:auto;padding-top:8px;border-top:1px solid #21262d}

.overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);display:flex;align-items:center;justify-content:center;z-index:100;padding:20px}
.modal{background:#0d1117;border:1px solid #30363d;border-radius:16px;padding:32px;max-width:520px;width:100%;position:relative;max-height:90vh;overflow-y:auto}
.modal-tag{display:inline-block;padding:5px 14px;border-radius:20px;font-size:12px;font-weight:700;margin-bottom:14px}
.modal-num{font-size:12px;color:#484f58;margin-bottom:6px}
.modal-title{font-size:22px;font-weight:900;color:#e6edf3;line-height:1.3;margin-bottom:14px}
.modal-body{font-size:14px;color:#8b949e;line-height:1.8;margin-bottom:16px}
.modal-code{background:#010409;border-radius:8px;padding:14px;font-size:13px;color:#79c0ff;line-height:1.7;border-left:3px solid #388bfd;white-space:pre-wrap;margin-bottom:14px}
.modal-tip{font-size:13px;color:#3fb950;padding:10px 14px;background:#0d2113;border-radius:8px;line-height:1.6}
.modal-nav{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:16px;border-top:1px solid #21262d}
.mnav-btn{padding:7px 16px;background:#21262d;color:#8b949e;border:1px solid #30363d;border-radius:8px;cursor:pointer;font-size:12px;font-family:inherit}
.mnav-btn:hover{background:#30363d;color:#e6edf3}
.close{position:absolute;top:14px;right:14px;background:transparent;border:none;color:#484f58;cursor:pointer;font-size:18px;line-height:1}
.close:hover{color:#e6edf3}
.share-note{font-size:11px;color:#484f58;text-align:center;margin-top:8px}
&lt;/style>
&lt;div class="wrap" id="app">&lt;/div>
&lt;script>
const CARDS = [
 {id:1,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"groupby goes on the DataFrame, not the column",body:"A very common mistake: calling .groupby() on a column Series instead of the DataFrame itself.",code:"# WRONG\ndf['sales'].groupby('region').sum()\n\n# RIGHT\ndf.groupby('region')['sales'].sum()",tip:"Think: DataFrame → group → select → aggregate. Always left to right."},
 {id:2,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"Boolean filters need &amp; not 'and'",body:"Python's 'and' is scalar. Pandas needs element-wise &amp; for boolean array operations.",code:"# WRONG — TypeError\ndf[df['sales']>100 and df['region']=='N']\n\n# RIGHT\ndf[(df['sales']>100) &amp; (df['region']=='N')]",tip:"Each condition must be in its own parentheses — &amp; has higher precedence than >."},
 {id:3,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:".dt is the gateway to all datetime parts",body:"Once a column is datetime dtype, you ALWAYS access date parts through the .dt accessor.",code:"df['date'] = pd.to_datetime(df['date'])\n\ndf['month'] = df['date'].dt.month\ndf['year'] = df['date'].dt.year\ndf['weekday'] = df['date'].dt.dayofweek",tip:"These are properties, not methods. Use .dt.month not .dt.month()"},
 {id:4,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"fit() on train only — transform() on both",body:"Fitting a scaler on test data leaks test statistics into training. The scaler must learn only from training data.",code:"scaler = StandardScaler()\n\n# RIGHT\nX_train = scaler.fit_transform(X_train)\nX_test = scaler.transform(X_test) # no fit!\n\n# WRONG\nX_test = scaler.fit_transform(X_test)",tip:"This is one of the most common causes of data leakage in ML pipelines."},
 {id:5,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"transform() keeps the original shape",body:"Unlike agg(), transform() broadcasts the group result back to every row — same index, same length.",code:"# Add each row's region mean as a new column\ndf['region_avg'] = df.groupby('region')['sales']\\\n .transform('mean')\n\n# Now subtract it (no merge needed)\ndf['vs_avg'] = df['sales'] - df['region_avg']",tip:"If you need to add a group-level stat back to every row, transform() is always the answer."},
 {id:6,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"melt() converts wide to long format",body:"Wide format has one column per variable. Long format has one row per observation. melt() reshapes wide → long.",code:"df.melt(\n id_vars='product',\n var_name='quarter',\n value_name='revenue'\n)\n# Turns Q1, Q2, Q3, Q4 columns\n# into a single 'quarter' column",tip:"Long format is what most ML models and ggplot-style charts expect."},
 {id:7,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"left join keeps all rows from the left table",body:"The 4 join types: inner (intersection), left (all left), right (all right), outer (union).",code:"# Keep ALL orders, even without a customer match\norders.merge(customers,\n on='customer_id',\n how='left')\n# Missing customer → NaN, row stays",tip:"Default merge() is inner join — it silently drops unmatched rows. Always specify how=."},
 {id:8,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:".cumsum() for running totals within groups",body:"Sort your data first — cumsum() is order-dependent. The result changes completely if rows are unsorted.",code:"df = df.sort_values(['region', 'date'])\n\ndf['running_total'] = (\n df.groupby('region')['sales']\n .cumsum()\n)",tip:"A missing sort_values() before cumsum() is a silent bug — no error, wrong answer."},
 {id:9,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"np.select() is the clean alternative to nested apply",body:"apply() with a lambda is slow and verbose for conditional logic. np.select() is vectorized and readable.",code:"conditions = [\n df['score'] >= 90,\n df['score'] >= 75,\n df['score'] >= 60,\n]\nchoices = ['A', 'B', 'C']\ndf['grade'] = np.select(conditions, choices, default='F')",tip:"Conditions are evaluated in order. First True match wins."},
 {id:10,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"drop_duplicates() has subset= and keep= params",body:"By default it checks all columns. Use subset= to check specific ones, keep= to control which duplicate survives.",code:"# Keep the LAST purchase per customer\ndf.drop_duplicates(\n subset='customer_id',\n keep='last'\n)",tip:"keep=False drops ALL duplicates — useful when you want only truly unique rows."},
 {id:11,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"rolling() needs a window, then an aggregation",body:".rolling() creates a sliding window object. You still need to call .mean(), .sum(), .std() etc. on it.",code:"# 7-day rolling average\ndf['rolling_avg'] = (\n df['sales'].rolling(window=7).mean()\n)\n# First 6 values will be NaN",tip:"Add min_periods=1 to avoid NaNs at the start: rolling(7, min_periods=1)."},
 {id:12,topic:"Pandas",color:"#1f6feb",bg:"#0d1f3c",title:"fillna() with mean is the baseline imputation strategy",body:"Always compute the mean BEFORE filling — and fit on train data only to avoid leakage.",code:"# Fill with column mean\nmean_val = df['score'].mean()\ndf['score'] = df['score'].fillna(mean_val)\n\n# Or inline\ndf['score'].fillna(df['score'].mean(), inplace=True)",tip:"More advanced: fill with group median, use KNNImputer, or flag missingness as a feature."},

 {id:13,topic:"SQL",color:"#238636",bg:"#0d2113",title:"HAVING filters aggregates — WHERE cannot",body:"WHERE runs before GROUP BY. HAVING runs after. You cannot use SUM(), COUNT() etc. in a WHERE clause.",code:"-- WRONG: WHERE SUM(amount) > 5000\n-- RIGHT:\nSELECT rep_id, SUM(amount) total\nFROM sales\nGROUP BY rep_id\nHAVING SUM(amount) > 5000",tip:"Rule: if your filter references an aggregate function, it's always HAVING."},
 {id:14,topic:"SQL",color:"#238636",bg:"#0d2113",title:"Window functions don't collapse rows",body:"GROUP BY collapses many rows into one. Window functions compute across rows and KEEP all rows.",code:"SELECT sale_id, amount,\n SUM(amount) OVER (\n ORDER BY sale_date\n ) AS running_total\nFROM sales\n-- All rows preserved",tip:"OVER() is what makes it a window function. An empty OVER() applies the function across all rows."},
 {id:15,topic:"SQL",color:"#238636",bg:"#0d2113",title:"PARTITION BY resets the window per group",body:"Think of PARTITION BY as GROUP BY for window functions — it creates separate windows per group.",code:"SELECT *,\n RANK() OVER (\n PARTITION BY category\n ORDER BY revenue DESC\n ) AS rank_in_category\nFROM products\n-- Rank resets for each category",tip:"Without PARTITION BY, you get a single ranking across all rows."},
 {id:16,topic:"SQL",color:"#238636",bg:"#0d2113",title:"RANK vs DENSE_RANK vs ROW_NUMBER",body:"Given scores 100, 100, 90 — the three functions give different results for ties.",code:"ROW_NUMBER → 1, 2, 3 (always unique)\nRANK → 1, 1, 3 (skips 2)\nDENSE_RANK → 1, 1, 2 (no gaps)\n\n-- Use RANK() for sports-style rankings\n-- Use DENSE_RANK() when gaps are confusing",tip:"ROW_NUMBER is useful for deduplication: delete rows WHERE row_num > 1."},
 {id:17,topic:"SQL",color:"#238636",bg:"#0d2113",title:"Self join: join a table to itself with aliases",body:"The classic puzzle — find employees who earn more than their manager. One table, two roles.",code:"SELECT e.name, e.salary\nFROM employees e\nJOIN employees m\n ON e.manager_id = m.employee_id\nWHERE e.salary > m.salary",tip:"Alias the table twice (e = employee, m = manager) then join on the relationship."},
 {id:18,topic:"SQL",color:"#238636",bg:"#0d2113",title:"Filter window functions in an outer query",body:"You cannot use WHERE to filter on a window function result in the same query level — wrap in a subquery.",code:"SELECT * FROM (\n SELECT *,\n RANK() OVER (\n PARTITION BY category\n ORDER BY revenue DESC\n ) AS rnk\n FROM products\n) ranked\nWHERE rnk &lt;= 3",tip:"CTEs (WITH clauses) are cleaner than subqueries for this pattern."},
 {id:19,topic:"SQL",color:"#238636",bg:"#0d2113",title:"LIMIT 2 ≠ top 2 per group",body:"LIMIT gives you the top N overall. For top N per group, you need a window function + subquery.",code:"-- WRONG: top 2 products total\nSELECT * FROM products\nORDER BY revenue DESC LIMIT 2\n\n-- RIGHT: top 2 per category\n-- Use RANK() OVER (PARTITION BY...)",tip:"This is the most commonly failed SQL interview question."},
 {id:20,topic:"SQL",color:"#238636",bg:"#0d2113",title:"CTEs make complex queries readable",body:"A CTE (WITH clause) is a named temporary result set. Use them to break complex queries into readable steps.",code:"WITH high_earners AS (\n SELECT rep_id, SUM(amount) total\n FROM sales\n GROUP BY rep_id\n HAVING SUM(amount) > 5000\n)\nSELECT * FROM high_earners\nJOIN reps USING (rep_id)",tip:"Multiple CTEs are separated by commas. Each can reference the previous one."},
 {id:21,topic:"SQL",color:"#238636",bg:"#0d2113",title:"NULL is not equal to anything — including NULL",body:"NULL = NULL is not TRUE in SQL. Use IS NULL or IS NOT NULL. This trips up every beginner.",code:"-- WRONG: returns nothing\nSELECT * FROM users WHERE email = NULL\n\n-- RIGHT\nSELECT * FROM users WHERE email IS NULL\n\n-- COALESCE replaces NULL with a default\nSELECT COALESCE(email, 'unknown')",tip:"COUNT(*) counts all rows. COUNT(column) skips NULLs. A subtle but critical difference."},
 {id:22,topic:"SQL",color:"#238636",bg:"#0d2113",title:"LAG() and LEAD() access previous/next row values",body:"Two of the most useful window functions — compare a row to its predecessor or successor.",code:"SELECT sale_date, amount,\n LAG(amount, 1) OVER (\n ORDER BY sale_date\n ) AS prev_amount,\n amount - LAG(amount,1) OVER (\n ORDER BY sale_date\n ) AS day_change\nFROM sales",tip:"LAG(col, N) looks back N rows. LEAD(col, N) looks forward N rows."},
 {id:23,topic:"SQL",color:"#238636",bg:"#0d2113",title:"CASE WHEN is SQL's if/else",body:"Use CASE WHEN for conditional logic directly in SELECT, ORDER BY, or aggregations.",code:"SELECT name,\n CASE\n WHEN salary > 100000 THEN 'Senior'\n WHEN salary > 60000 THEN 'Mid'\n ELSE 'Junior'\n END AS level\nFROM employees",tip:"CASE WHEN inside SUM() is a powerful pattern: SUM(CASE WHEN ... THEN 1 ELSE 0 END)."},
 {id:24,topic:"SQL",color:"#238636",bg:"#0d2113",title:"EXPLAIN shows you the query execution plan",body:"Before optimizing a slow query, run EXPLAIN (or EXPLAIN ANALYZE) to see what the database is actually doing.",code:"EXPLAIN SELECT * FROM orders\nWHERE customer_id = 42\n\n-- Look for: Seq Scan (bad on large tables)\n-- Want: Index Scan\n-- Fix: CREATE INDEX ON orders(customer_id)",tip:"Sequential scan on millions of rows is usually the culprit for slow queries."},

 {id:25,topic:"Python",color:"#d29922",bg:"#271d04",title:"Counter is your best friend for frequency counts",body:"Don't write loops to count frequencies. collections.Counter does it in one line and sorts by frequency.",code:"from collections import Counter\n\nwords = ['cat','dog','cat','bird','dog','cat']\nc = Counter(words)\n\nc.most_common(2)\n# [('cat', 3), ('dog', 2)]",tip:"Counter inherits from dict — all dict methods work on it."},
 {id:26,topic:"Python",color:"#d29922",bg:"#271d04",title:"enumerate() replaces range(len(...))",body:"range(len(x)) is a code smell. enumerate() gives you both index and value cleanly.",code:"# UGLY\nfor i in range(len(names)):\n print(i, names[i])\n\n# CLEAN\nfor i, name in enumerate(names):\n print(i, name)\n\n# Start from 1\nfor i, name in enumerate(names, start=1):",tip:"enumerate() is one of the most underused Python builtins."},
 {id:27,topic:"Python",color:"#d29922",bg:"#271d04",title:"zip() iterates multiple lists in parallel",body:"zip() pairs up elements from multiple iterables. Stops at the shortest one.",code:"names = ['Alice', 'Bob', 'Carol']\nscores = [95, 82, 78]\n\nfor name, score in zip(names, scores):\n print(f'{name}: {score}')\n\n# Unzip with: names, scores = zip(*pairs)",tip:"Use itertools.zip_longest() if you want to continue past the shortest list."},
 {id:28,topic:"Python",color:"#d29922",bg:"#271d04",title:"Two Sum: hashmap gives O(n), nested loops give O(n²)",body:"For each element, store its index. Then check if (target - element) is already stored. One pass.",code:"def two_sum(nums, target):\n seen = {}\n for i, n in enumerate(nums):\n complement = target - n\n if complement in seen:\n return [seen[complement], i]\n seen[n] = i",tip:"The hashmap lookup is O(1) — making the whole function O(n) instead of O(n²)."},
 {id:29,topic:"Python",color:"#d29922",bg:"#271d04",title:"List comprehensions are faster than for loops",body:"List comprehensions use optimized C-level iteration. They're typically 35–50% faster than equivalent for loops.",code:"# SLOW\nresult = []\nfor x in data:\n if x > 0:\n result.append(x * 2)\n\n# FAST\nresult = [x*2 for x in data if x > 0]",tip:"Dict and set comprehensions work the same way: {k:v for k,v in d.items()}"},
 {id:30,topic:"Python",color:"#d29922",bg:"#271d04",title:"defaultdict removes the 'key exists?' check",body:"Stop writing if key in dict — defaultdict automatically creates a default value on first access.",code:"from collections import defaultdict\n\n# Grouping without key-exists check\ngroups = defaultdict(list)\nfor item in data:\n groups[item['category']].append(item)\n\n# Counter equivalent with defaultdict(int)",tip:"defaultdict(list), defaultdict(int), defaultdict(set) cover 90% of use cases."},
 {id:31,topic:"Python",color:"#d29922",bg:"#271d04",title:"IQR rule: outliers live beyond 1.5× the interquartile range",body:"Q1 = 25th percentile, Q3 = 75th percentile. IQR = Q3 - Q1. This is the same rule matplotlib boxplots use.",code:"import numpy as np\n\nq1, q3 = np.percentile(data, [25, 75])\niqr = q3 - q1\nlower = q1 - 1.5 * iqr\nupper = q3 + 1.5 * iqr\n\noutliers = [x for x in data\n if x &lt; lower or x > upper]",tip:"More robust than mean ± 3σ when distributions are skewed."},
 {id:32,topic:"Python",color:"#d29922",bg:"#271d04",title:"*args and **kwargs make functions flexible",body:"*args captures extra positional arguments as a tuple. **kwargs captures extra keyword arguments as a dict.",code:"def log(msg, *args, **kwargs):\n level = kwargs.get('level', 'INFO')\n print(f'[{level}] {msg}', *args)\n\nlog('User logged in', 'alice', level='DEBUG')",tip:"The names args/kwargs are convention only — *data and **options work equally well."},
 {id:33,topic:"Python",color:"#d29922",bg:"#271d04",title:"Generators are lazy — they compute on demand",body:"A generator yields one value at a time instead of building the entire list in memory. Essential for large data.",code:"# List: builds all 1M items in memory\nbig_list = [x**2 for x in range(1_000_000)]\n\n# Generator: computes one at a time\nbig_gen = (x**2 for x in range(1_000_000))\n\n# Same syntax with () instead of []",tip:"Use generators when you process data once and don't need random access."},
 {id:34,topic:"Python",color:"#d29922",bg:"#271d04",title:"@lru_cache memoizes expensive function calls",body:"Caches results of pure function calls. If called again with the same arguments, returns the cached result instantly.",code:"from functools import lru_cache\n\n@lru_cache(maxsize=None)\ndef fibonacci(n):\n if n &lt; 2:\n return n\n return fibonacci(n-1) + fibonacci(n-2)\n\n# Recursive fib without cache: O(2ⁿ)\n# With cache: O(n)",tip:"Only use on pure functions (same inputs always give same outputs, no side effects)."},
 {id:35,topic:"Python",color:"#d29922",bg:"#271d04",title:"dataclasses reduce boilerplate for data containers",body:"Instead of writing __init__, __repr__, __eq__ by hand — use @dataclass. One decorator, all the boilerplate gone.",code:"from dataclasses import dataclass\n\n@dataclass\nclass Product:\n name: str\n price: float\n in_stock: bool = True\n\np = Product('Widget', 9.99)\nprint(p) # Product(name='Widget'...)",tip:"Add frozen=True to make instances immutable (hashable, usable as dict keys)."},
 {id:36,topic:"Python",color:"#d29922",bg:"#271d04",title:"Moving average: the slice is data[i-window+1 : i+1]",body:"The hardest part is getting the slice indices right. For a window of size n ending at position i:",code:"def moving_avg(data, window):\n result = []\n for i in range(len(data)):\n if i &lt; window - 1:\n result.append(None) # incomplete window\n else:\n w = data[i - window + 1 : i + 1]\n result.append(sum(w) / window)\n return result",tip:"Pad the start with None (or NaN) — don't compute partial windows unless intended."},

 {id:37,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Accuracy is meaningless on imbalanced datasets",body:"A model that predicts 'not fraud' for every transaction gets 99.9% accuracy but catches zero fraud.",code:"# Better metrics for imbalanced data:\n\nPrecision = TP / (TP + FP)\nRecall = TP / (TP + FN)\nF1 = 2 * P * R / (P + R)\n\n# Best: AUC-PR (precision-recall curve)\n# Not: AUC-ROC (can hide poor minority perf)",tip:"Always ask: what's the cost of a false positive vs a false negative in this domain?"},
 {id:38,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Data leakage: the #1 cause of suspiciously good results",body:"Leakage happens when information from outside the training window contaminates the model. Result: great on paper, terrible in production.",code:"# Classic leakage example:\n# Predicting hospital readmission using\n# 'discharge_notes' — only written AFTER\n# readmission decision was made.\n\n# Ask: would I have this feature\n# at prediction time?",tip:"If your model looks too good to be true, check for leakage before anything else."},
 {id:39,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"The bias-variance tradeoff in plain English",body:"Bias = your model makes wrong assumptions (too simple). Variance = your model memorizes noise (too complex).",code:"Total Error = Bias² + Variance + Noise\n\nHigh bias (underfitting):\n Simple model, wrong on everything\n\nHigh variance (overfitting):\n Complex model, wrong on new data\n\nGoal: find the sweet spot",tip:"Regularization, cross-validation, and ensembles are tools for managing this tradeoff."},
 {id:40,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"AUC-PR > AUC-ROC for imbalanced data",body:"With severe class imbalance, a high AUC-ROC can hide terrible minority class performance. AUC-PR is harder to inflate.",code:"# Model A: AUC-ROC 0.89, AUC-PR 0.43\n# Model B: AUC-ROC 0.84, AUC-PR 0.71\n\n# For fraud detection (0.5% positive):\n# Deploy Model B — it actually finds fraud\n\n# AUC-ROC can look great just by\n# correctly classifying the 99.5%",tip:"Use AUC-PR as your primary metric whenever positives are rare (&lt; 10% of data)."},
 {id:41,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Always split time series by time — never randomly",body:"Shuffling time series data causes future data to leak into training. Your model sees tomorrow while predicting yesterday.",code:"# WRONG: random shuffle on time series\nX_train, X_test = train_test_split(df)\n\n# RIGHT: temporal split\ntrain = df[df['date'] &lt; '2024-01-01']\ntest = df[df['date'] >= '2024-01-01']\n\n# CV: use TimeSeriesSplit",tip:"Walk-forward validation mirrors how the model will actually be used in production."},
 {id:42,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"L1 shrinks weights to zero. L2 shrinks them toward zero.",body:"L1 (Lasso) produces sparse models — useful for feature selection. L2 (Ridge) distributes penalty across all weights.",code:"# L1 (Lasso): sum of |weights|\n# Drives some weights exactly to 0\n# Good for: feature selection\n\n# L2 (Ridge): sum of weights²\n# Shrinks all weights, rarely to 0\n# Good for: correlated features\n\n# ElasticNet: combines both",tip:"When in doubt, start with Ridge. Add Lasso when you need interpretability."},
 {id:43,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Model in production degrading? Check for drift first.",body:"Performance drops without code changes = distribution shift. The real world has changed since you trained the model.",code:"Three types of drift:\n\n1. Covariate shift:\n Input features changed\n\n2. Label shift:\n Target distribution changed\n\n3. Concept drift:\n Feature→target relationship changed",tip:"Monitor feature distributions in production. Alert when they diverge from training distributions."},
 {id:44,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Random Forest vs Gradient Boosting: when to use which",body:"Both are powerful ensemble methods, but they fail differently and have different speed/accuracy tradeoffs.",code:"Random Forest (bagging):\n + Parallel training → fast\n + Robust to noisy data\n + Less hyperparameter tuning\n\nGradient Boosting (sequential):\n + Higher accuracy\n - Slower, more sensitive to params\n - Overfits noisy data easily",tip:"For tabular data competitions: XGBoost/LightGBM. For production with speed needs: Random Forest."},
 {id:45,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"SHAP gives you per-prediction feature importance",body:"Model.feature_importances_ is global. SHAP gives you local (per-prediction) AND global explanations.",code:"import shap\n\nexplainer = shap.TreeExplainer(model)\nshap_values = explainer.shap_values(X_test)\n\n# Why did this one prediction happen?\nshap.force_plot(explainer.expected_value,\n shap_values[0], X_test.iloc[0])",tip:"SHAP is game-theory based — it's the most theoretically sound importance method."},
 {id:46,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"Calibration: does 0.8 confidence mean 80% accuracy?",body:"A model predicting P=0.8 for 100 cases should have ~80 actually positive. Miscalibrated models give unreliable probabilities.",code:"# Check calibration:\nfrom sklearn.calibration import CalibrationDisplay\n\nCalibrationDisplay.from_predictions(\n y_test, y_prob\n)\n# Diagonal = perfect calibration\n\n# Fix: Platt Scaling or\n# Isotonic Regression",tip:"Critical when you're using probabilities to set thresholds or rank customers."},
 {id:47,topic:"ML",color:"#8957e5",bg:"#1a0f2e",title:"The 5 pre-deployment checks every model needs",body:"Before handing off to engineering, run these 5 checks — not just accuracy.",code:"1. Performance on held-out test set\n (once, at the very end)\n\n2. Calibration check\n\n3. Data leakage audit\n\n4. Slice analysis\n (performance across subgroups)\n\n5. Training-serving skew check",tip:"#5 is the most often skipped and the most common cause of production failures."},

 {id:48,topic:"Stats",color:"#e85d04",bg:"#2d0f00",title:"p = 0.04 does NOT mean 96% chance the hypothesis is true",body:"The p-value is the probability of observing results this extreme IF the null hypothesis is true. Not the reverse.",code:"p-value = P(data | H₀ is true)\n\nNOT P(H₀ is false | data)\n\nA p &lt; 0.05 only means:\n'If nothing was happening,\nresults this extreme would\noccur &lt; 5% of the time'",tip:"This misinterpretation is so common it has a name: the 'transposed conditional fallacy'."},
 {id:49,topic:"Stats",color:"#e85d04",bg:"#2d0f00",title:"Type I vs Type II errors — and the tradeoff",body:"Lowering α (significance threshold) reduces false positives but increases false negatives. You can't minimize both simultaneously.",code:"Type I (α): False positive\n Reject a true null\n 'We saw an effect that isn't there'\n\nType II (β): False negative\n Miss a real effect\n 'We missed an effect that is there'\n\nPower = 1 - β",tip:"In medicine, Type II errors (missing a disease) are often more costly than Type I."},
 {id:50,topic:"Stats",color:"#e85d04",bg:"#2d0f00",title:"The Central Limit Theorem: why normal distributions are everywhere",body:"Regardless of the population distribution, the sampling distribution of the mean approaches normal as n grows.",code:"CLT in practice:\n\n- Justifies using normal-based\n confidence intervals\n\n- Works for n ≥ 30 in most cases\n\n- Explains why so many natural\n phenomena look bell-shaped\n\n- Foundation of hypothesis testing",tip:"The CLT is why you can run a t-test even when your raw data isn't normally distributed."},
];

const TOPIC_COLORS = {
 Pandas:{color:"#388bfd",bg:"rgba(56,139,253,.15)"},
 SQL:{color:"#3fb950",bg:"rgba(63,185,80,.15)"},
 Python:{color:"#e3b341",bg:"rgba(227,179,65,.15)"},
 ML:{color:"#bc8cff",bg:"rgba(188,140,255,.15)"},
 Stats:{color:"#ff7b72",bg:"rgba(255,123,114,.15)"},
};

let filter = "All";
let selected = null;

function tagStyle(topic){
 const t = TOPIC_COLORS[topic];
 return `background:${t.bg};color:${t.color};border:1px solid ${t.color}44`;
}

function renderGrid(){
 const app = document.getElementById('app');
 const shown = filter==="All" ? CARDS : CARDS.filter(c=>c.topic===filter);
 
 let html = `&lt;div class="top">
 &lt;div class="filters">
 ${["All","Pandas","SQL","Python","ML","Stats"].map(t=>`
 &lt;button class="fb ${filter===t?'on':''}" onclick="setFilter('${t}')">${t}&lt;/button>
 `).join('')}
 &lt;/div>
 &lt;span class="count">${shown.length} cards&lt;/span>
 &lt;/div>
 &lt;div class="grid">
 ${shown.map(c=>`
 &lt;div class="card" onclick="openCard(${c.id})">
 &lt;div class="card-top">
 &lt;span class="tag" style="${tagStyle(c.topic)}">${c.topic}&lt;/span>
 &lt;span class="num">#${String(c.id).padStart(2,'0')}&lt;/span>
 &lt;/div>
 &lt;div class="title">${c.title}&lt;/div>
 &lt;div class="body">${c.body.substring(0,90)}${c.body.length>90?'…':''}&lt;/div>
 &lt;div class="code">${c.code.split('\n').slice(0,3).join('\n')}${c.code.split('\n').length>3?'\n…':''}&lt;/div>
 &lt;/div>
 `).join('')}
 &lt;/div>`;

 if(selected){
 const c = selected;
 const idx = CARDS.indexOf(c);
 const tc = TOPIC_COLORS[c.topic];
 html += `&lt;div class="overlay" onclick="closeCard(event)">
 &lt;div class="modal" onclick="event.stopPropagation()">
 &lt;button class="close" onclick="closeModal()">✕&lt;/button>
 &lt;div class="modal-num">#${String(c.id).padStart(2,'0')} of 50&lt;/div>
 &lt;div class="modal-tag" style="${tagStyle(c.topic)}">${c.topic}&lt;/div>
 &lt;div class="modal-title">${c.title}&lt;/div>
 &lt;div class="modal-body">${c.body}&lt;/div>
 &lt;div class="modal-code">${c.code}&lt;/div>
 &lt;div class="modal-tip">💡 ${c.tip}&lt;/div>
 &lt;div class="modal-nav">
 &lt;button class="mnav-btn" onclick="navCard(-1)" ${idx===0?'disabled':''}>← Prev&lt;/button>
 &lt;span style="font-size:12px;color:#484f58">${idx+1} / 50&lt;/span>
 &lt;button class="mnav-btn" onclick="navCard(1)" ${idx===CARDS.length-1?'disabled':''}>Next →&lt;/button>
 &lt;/div>
 &lt;div class="share-note">Screenshot this card to share on X or LinkedIn&lt;/div>
 &lt;/div>
 &lt;/div>`;
 }

 app.innerHTML = html;
}

function setFilter(f){ filter=f; renderGrid(); }
function openCard(id){ selected=CARDS.find(c=>c.id===id); renderGrid(); }
function closeModal(){ selected=null; renderGrid(); }
function closeCard(e){ if(e.target.classList.contains('overlay')){ selected=null; renderGrid(); } }
function navCard(dir){
 const idx = CARDS.indexOf(selected);
 const next = CARDS[idx+dir];
 if(next){ selected=next; renderGrid(); }
}

renderGrid();
&lt;/script></description></item><item><title>Building a Production-Ready Speech-to-Text System with Fine-Tuned Whisper</title><link>https://akandaniel.netlify.app/blogs/building_a_productive-ready_speech-to-text_system_with_fine-tuned_whisper/</link><pubDate>Sun, 10 Aug 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/building_a_productive-ready_speech-to-text_system_with_fine-tuned_whisper/</guid><description>&lt;p>&lt;em>A comprehensive guide to developing, optimizing, and deploying a robust speech transcription service&lt;/em>&lt;/p>
&lt;h2 id="overview">Overview&lt;a class="anchor" href="#overview" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>In this technical deep-dive, we&amp;rsquo;ll explore the development of a production-grade Speech-to-Text system built on OpenAI&amp;rsquo;s Whisper model. The project demonstrates advanced ML engineering practices including model fine-tuning, dtype optimization, chunked processing for long-form audio, and deployment via Gradio interface on Hugging Face Spaces.&lt;/p>
&lt;p>&lt;strong>🔗 Live Demo:&lt;/strong> &lt;a href="https://huggingface.co/spaces/AfroLogicInsect/transcribe-speech">Speech Transcription App&lt;/a>&lt;br>
&lt;strong>🤗 Model:&lt;/strong> &lt;a href="https://huggingface.co/AfroLogicInsect/whisper-finetuned-float32">Fine-tuned Whisper Model&lt;/a>&lt;/p></description></item><item><title>Monitoring Behavioral Drift: Building a Local Real-Time ML Model Monitoring System from Scratch</title><link>https://akandaniel.netlify.app/blogs/why_your_ml_models_are_quietly_failing/</link><pubDate>Sun, 10 Aug 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/why_your_ml_models_are_quietly_failing/</guid><description>&lt;h2 id="why-your-ml-models-are-quietly-failing">Why Your ML Models Are Quietly Failing&lt;a class="anchor" href="#why-your-ml-models-are-quietly-failing" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Picture this: You deploy a machine learning model that predicts customer conversions with 85% accuracy. Six months later, you discover it&amp;rsquo;s performing at 65% accuracy, and you have no idea when the decline started or what caused it.&lt;/p>
&lt;p>This scenario plays out daily across organizations worldwide. &lt;strong>Model drift&lt;/strong> - the phenomenon where model performance degrades over time due to changing data patterns - is one of the most critical yet overlooked challenges in production ML systems.&lt;/p></description></item><item><title>My "Full-Stack" MLOps Journey: From Broken Models to Actually Working AI</title><link>https://akandaniel.netlify.app/blogs/full-stack_journey-from_broken_models_to_actually_working_ai/</link><pubDate>Sun, 10 Aug 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/full-stack_journey-from_broken_models_to_actually_working_ai/</guid><description>&lt;p>&lt;em>Or: How I learned to stop worrying and love debugging neural networks&lt;/em>&lt;/p>
&lt;h2 id="the-grand-plan-that-almost-failed-spectacularly">The Grand Plan (That Almost Failed Spectacularly)&lt;a class="anchor" href="#the-grand-plan-that-almost-failed-spectacularly" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>I recently completed what I&amp;rsquo;d call my first &amp;ldquo;full-stack&amp;rdquo; MLOps project – and by &amp;ldquo;full-stack&amp;rdquo; I mean the entire pipeline from raw data to deployed model. The goal was simple: build a sentiment analysis model, train it, and deploy it to Hugging Face. The reality? Well, let&amp;rsquo;s just say my first model was so broken it thought &amp;ldquo;I absolutely loved this movie!&amp;rdquo; was negative sentiment with 99.9% confidence.&lt;/p></description></item><item><title>Building Powerful Ensemble Models in R: A Complete Guide to Stacking and Deployment</title><link>https://akandaniel.netlify.app/blogs/why_ensemble_methods_matter/</link><pubDate>Sun, 06 Jul 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/why_ensemble_methods_matter/</guid><description>&lt;p>&lt;em>Building on our previous exploration of tree-based models (&lt;a href="https://dev.to/afrologicinsect/tree-based-models-for-alzheimers-disease-classification-a-tidymodels-approach-136h)">https://dev.to/afrologicinsect/tree-based-models-for-alzheimers-disease-classification-a-tidymodels-approach-136h)&lt;/a>, let&amp;rsquo;s dive into ensemble methods and see how R makes it incredibly easy to build, deploy, and interact with sophisticated machine learning models.&lt;/em>&lt;/p>
&lt;h2 id="why-ensemble-methods-matter">Why Ensemble Methods Matter&lt;a class="anchor" href="#why-ensemble-methods-matter" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Individual models are great, but ensemble methods often deliver superior performance by combining the strengths of multiple algorithms. In this post, we&amp;rsquo;ll explore &lt;strong>model stacking&lt;/strong> - a powerful ensemble technique that uses a meta-learner to intelligently combine predictions from multiple base models.&lt;/p></description></item><item><title>Generalized Additive Models (GAMs) in R: Handling Non-linearity in Dolphin Behavior Analysis</title><link>https://akandaniel.netlify.app/blogs/generalized_additive_models-gams_in_r-handling_non-linearity_in_doplin_behavior_analysis/</link><pubDate>Sun, 06 Jul 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/generalized_additive_models-gams_in_r-handling_non-linearity_in_doplin_behavior_analysis/</guid><description>&lt;!-- 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyh43zvg9fm232nnd69s.gif) -->
&lt;p>&lt;em>Initially published on May 27, 2025&lt;/em>
GAMs (Generalized Additive Models) handle non-linearity in model development through their flexible approach. The &amp;ldquo;additive&amp;rdquo; in the model implies that the response variable can be modeled as a sum of smooth functions of predictor variables, allowing for non-linear relationships without requiring specific parametric forms.&lt;/p>
&lt;h2 id="understanding-splines-in-gams">Understanding Splines in GAMs&lt;a class="anchor" href="#understanding-splines-in-gams" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>GAMs use what are called &amp;ldquo;splines&amp;rdquo; - these act as smoothing factors for variables that show non-linear tendencies, particularly when dealing with continuous numeric variables. Splines work by dividing the data into segments and fitting polynomial functions to each segment, connected at knots to ensure smoothness.&lt;/p></description></item><item><title>Tree-Based Models for Alzheimer Disease Classification: A tidymodels Approach</title><link>https://akandaniel.netlify.app/blogs/tidymodels-tree-based_models_for_alzheimer_disease_classification/</link><pubDate>Sun, 06 Jul 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/tidymodels-tree-based_models_for_alzheimer_disease_classification/</guid><description>&lt;p>&lt;em>Initially published on May 29, 2025&lt;/em>&lt;/p>
&lt;h2 id="introduction">Introduction&lt;a class="anchor" href="#introduction" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Alzheimer&amp;rsquo;s disease, the most common form of dementia, affects millions worldwide. Early and accurate diagnosis is crucial for treatment and care planning. In this article, I explore how tree-based machine learning models can help classify dementia status using neuroimaging data from the OASIS dataset. What&amp;rsquo;s particularly exciting is how the tidymodels framework in R provides an elegant, consistent interface for implementing and comparing these powerful algorithms.&lt;/p></description></item><item><title>Building Automated Data Reports from Supabase with GitHub Actions and R Markdown</title><link>https://akandaniel.netlify.app/blogs/builidng_automated_data_reports_from_supabase_with_github_actions_and_r_markdown/</link><pubDate>Sun, 06 Apr 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/builidng_automated_data_reports_from_supabase_with_github_actions_and_r_markdown/</guid><description>&lt;h1 id="building-automated-data-reports-from-supabase-with-github-actions-and-r-markdown">Building Automated Data Reports from Supabase with GitHub Actions and R Markdown&lt;a class="anchor" href="#building-automated-data-reports-from-supabase-with-github-actions-and-r-markdown" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Imagine being able to generate professional data reports automatically every week without lifting a finger. In this guide, I&amp;rsquo;ll walk you through creating an automated reporting system that connects to a Supabase database, analyzes data, and publishes the results as a polished PDF report - all using free tools and services.&lt;/p>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfqv6wxpunmp2y7u3nxz.png" alt="Workflow" loading="lazy" decoding="async">
&lt;/p>
&lt;h2 id="what-were-building">What We&amp;rsquo;re Building&lt;a class="anchor" href="#what-were-building" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Let&amp;rsquo;s whiz through how this was created, if you want to go straight to the code, visit here: &lt;a href="https://github.com/AkanimohOD19A/automated-Rmd-outputs">https://github.com/AkanimohOD19A/automated-Rmd-outputs&lt;/a>
We&amp;rsquo;re going to set up a system that:&lt;/p></description></item><item><title>Image Gallery</title><link>https://akandaniel.netlify.app/gallery/</link><pubDate>Sun, 16 Feb 2025 18:35:46 +0530</pubDate><guid>https://akandaniel.netlify.app/gallery/</guid><description/></item><item><title>Building a Drowsiness Detection Web App from scratch - pt1</title><link>https://akandaniel.netlify.app/blogs/pt1-building_a_drowsiness_detection_web_app_from_scratch/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt1-building_a_drowsiness_detection_web_app_from_scratch/</guid><description>&lt;h1 id="pt1---building-a-drowsiness-detection-web-app-from-scratch">Pt1 - Building a Drowsiness Detection Web App from scratch&lt;a class="anchor" href="#pt1---building-a-drowsiness-detection-web-app-from-scratch" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Have you ever wondered how to build a web app that can detect if you are feeling sleepy or alert? Do you want to learn how to use computer vision and machine learning to create a fun and useful project? Then this blog post is for you! In this post, we will see how to build a drowsiness detection web app from scratch, using &lt;em>Python&lt;/em>, &lt;em>LabelImg&lt;/em>, &lt;em>PyTorch&lt;/em> and &lt;em>Streamlit&lt;/em>.&lt;/p></description></item><item><title>Building a Drowsiness Detection Web App from scratch - Pt2</title><link>https://akandaniel.netlify.app/blogs/pt2-building_a_drowsiness_detection_web_app_from_scratch/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt2-building_a_drowsiness_detection_web_app_from_scratch/</guid><description>&lt;h1 id="pt2---building-a-drowsiness-detection-web-app-from-scratch">Pt2 - Building a Drowsiness Detection Web App from scratch&lt;a class="anchor" href="#pt2---building-a-drowsiness-detection-web-app-from-scratch" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Cheers for making it to pt2; You&amp;rsquo;ve learnt how to Import datasets, augment that data and label the images, now we set up for real time predictions using the powerful YOLOv5 model and Google Colaboratory.&lt;/p>
&lt;h2 id="define-directories">Define Directories&lt;a class="anchor" href="#define-directories" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Here, you would confirm the directories, because we would be navigating to them to train our model.
You should have your &lt;code>images&lt;/code> and &lt;code>labels&lt;/code> directory like so:&lt;/p></description></item><item><title>Building a Drowsiness Detection Web App from scratch - pt3</title><link>https://akandaniel.netlify.app/blogs/pt3-building_a_drowsiness_detection_web_app_from_scratch/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt3-building_a_drowsiness_detection_web_app_from_scratch/</guid><description>&lt;h1 id="pt3---building-a-drowsiness-detection-web-app-from-scratch">Pt3 - Building a Drowsiness Detection Web App from scratch&lt;a class="anchor" href="#pt3---building-a-drowsiness-detection-web-app-from-scratch" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>In the final leg of this Tutorial, we start to build a webpage using &lt;strong>Streamlit&lt;/strong> that can perform three things:&lt;/p>
&lt;ol>
&lt;li>Give some description of the Application&lt;/li>
&lt;li>Take an image input&lt;/li>
&lt;li>Provide predictions/output on #2&lt;/li>
&lt;/ol>
&lt;p>Streamlit is an open-source app framework for Machine Learning and Data Science teams. It is a Python-based library specifically designed for machine learning engineers that does this well and given all the resources from our previous work, we can set to build this service - all in python.&lt;/p></description></item><item><title>ChatGPT on Streamlit and monitoring query response, a simple implementation</title><link>https://akandaniel.netlify.app/blogs/chatgpt_on_streamlit_and_monitoring_query_responses-a_simple_implementation/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/chatgpt_on_streamlit_and_monitoring_query_responses-a_simple_implementation/</guid><description>&lt;h1 id="chatgpt-on-streamlit-and-monitoring-query-response-a-simple-implementation">ChatGPT on Streamlit and monitoring query response, a simple implementation&lt;a class="anchor" href="#chatgpt-on-streamlit-and-monitoring-query-response-a-simple-implementation" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>In this blog post, we will explore my approach to creating a prototype or MVP of sorts that demonstrates the use of the ChatGPT API to retrieve responses on queries fed, optimized for certain keywords and also present an exploration of the responses.&lt;/p>
&lt;p>ChatGPT is the immensely popular model built by OpenAI, trained on massive amounts of data to provide human-like responses to prompts, recently the OpenAI team released APIs enabling us to be able to call this immense function from our application.&lt;/p></description></item><item><title>Creating a chatbot with contextual retrieval using Cohere command-r and Streamlit</title><link>https://akandaniel.netlify.app/blogs/creating_a_chatbot_with_contextual_retrieval_using_cohere_command-r_and_streamlit/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/creating_a_chatbot_with_contextual_retrieval_using_cohere_command-r_and_streamlit/</guid><description>&lt;h1 id="creating-a-chatbot-with-contextual-retrieval-using-cohere-command-r-and-streamlit">Creating a chatbot with contextual retrieval using Cohere command-r and Streamlit&lt;a class="anchor" href="#creating-a-chatbot-with-contextual-retrieval-using-cohere-command-r-and-streamlit" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e3c3iwk5mar7zq707t8s.png" alt="Streamlit page" loading="lazy" decoding="async">
&lt;/p>
&lt;h2 id="project-overview">Project Overview&lt;a class="anchor" href="#project-overview" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Chatish is an innovative Streamlit web application that demonstrates the power of contextual retrieval using large language models, specifically Cohere&amp;rsquo;s Command R model. This project showcases how modern AI can transform document interaction through intelligent, context-aware conversations.&lt;/p>
&lt;h2 id="architectural-components">Architectural Components&lt;a class="anchor" href="#architectural-components" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>The application is structured around four primary Python modules:&lt;/p></description></item><item><title>Deploying an Image Segmentation web application with YOLOv8 and Streamlit - pt1</title><link>https://akandaniel.netlify.app/blogs/pt1-deploying_an_image_segmentation_web_application_with_yolov8_and_streamlit/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt1-deploying_an_image_segmentation_web_application_with_yolov8_and_streamlit/</guid><description>&lt;h1 id="pt1---deploying-an-image-segmentation-web-application-with-yolov8-and-streamlit">Pt1 - Deploying an Image Segmentation web application with YOLOv8 and Streamlit&lt;a class="anchor" href="#pt1---deploying-an-image-segmentation-web-application-with-yolov8-and-streamlit" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pvgpuepoh09cat8bbph1.png" alt="Segmented Pieces" loading="lazy" decoding="async">
&lt;/p>
&lt;p>We are going to create an object detecting web app, our goal is to to segment any image, note the distribution of the unique items in it, implement a slider view and ultimately deploy this on a web-application anyone can use.&lt;/p>
&lt;p>First, let us have a basic understanding of the two building components, YOLOv8 is the newest state-of-the-art model developed by &lt;em>Ultralytics&lt;/em>, that can be used for object detection, image classification, and instance segmentation tasks. YOLOv8 is designed to be fast, accurate, and easy to use,
Streamlit is a free and open-source framework to rapidly build and share beautiful machine learning and data science web apps.&lt;/p></description></item><item><title>Effortlessly Link Streamlit to Google Sheets for Real-time Analysis</title><link>https://akandaniel.netlify.app/blogs/effortlessly_link_streamlit_to_google_sheets_for_real-time_analysis/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/effortlessly_link_streamlit_to_google_sheets_for_real-time_analysis/</guid><description>&lt;h1 id="effortlessly-link-streamlit-to-google-sheets-for-real-time-analysis">Effortlessly Link Streamlit to Google Sheets for Real-time Analysis&lt;a class="anchor" href="#effortlessly-link-streamlit-to-google-sheets-for-real-time-analysis" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>As a researcher one major headache is the cost of data gathering, simple solutions can be quite manual or very expensive, however we can create a solution that solves this, that is both simple and free, using your &lt;strong>free&lt;/strong> Google Account and Streamlit, a UI framework that “turns data scripts into shareable web apps in minutes all in pure Python, no front‑end experience required”. In short, with this tutorial we will build one together. As mentioned, we will need two things you Google Apps Sheet Keys and some knowledge of Streamlit. We will be creating a real-time interface between these two.&lt;/p></description></item><item><title>Experiment Tracking: MLOPs with DataTalks: Wk 3</title><link>https://akandaniel.netlify.app/blogs/wk_3-mlops_with_datatalks/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/wk_3-mlops_with_datatalks/</guid><description>&lt;h1 id="wk-3-mlops-with-datatalks">Wk 3: MLOPs with DataTalks&lt;a class="anchor" href="#wk-3-mlops-with-datatalks" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>In this week, the course discusses how to carry out ML experiments, using the &lt;strong>MLflow&lt;/strong> experiment tracking tool. This setup allows you to track and log your machine learning experiments and results.&lt;/p>
&lt;p>For this week&amp;rsquo;s assignment, we have been provided with 4 scripts for us to modify to complete the assignment.&lt;/p>
&lt;p>Here&amp;rsquo;s what the questions are:&lt;/p>
&lt;p>The only setup required now is to install the &lt;strong>mlflow&lt;/strong> library into the our &lt;strong>MLOPS_env&lt;/strong> virtual environment as well as download the 4 scripts.&lt;/p></description></item><item><title>Experiment Tracking: MLOPs with DataTalks: Wk 4</title><link>https://akandaniel.netlify.app/blogs/wk_4-mlops_with_datatalks/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/wk_4-mlops_with_datatalks/</guid><description>&lt;h1 id="wk-4-mlops-with-datatalks">Wk 4: MLOPs with DataTalks&lt;a class="anchor" href="#wk-4-mlops-with-datatalks" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Oh, you made it to the 4th week! Nice!&lt;/p>
&lt;p>Here, we see how to handle Deployment of our derived models, there are two major options for deployment - Stream or Batch Prediction services. &amp;lt;More?&amp;gt;&lt;/p>
&lt;p>However, let&amp;rsquo;s focus on how to get the &lt;a href="https://github.com/DataTalksClub/mlops-zoomcamp/blob/main/cohorts/2024/04-deployment/homework.md">assignment&lt;/a> done with.&lt;/p>
&lt;p>&lt;strong>Q1: Standard deviation - Predicted duration for March 2023&lt;/strong>
We already have the notebook we used in &lt;a href="https://github.com/DataTalksClub/mlops-zoomcamp/tree/main/cohorts/2024/04-deployment/homework">Wk 1&lt;/a> to achieve something like this we are just making adjustments - mainly to acquire the 2023 dataset.&lt;/p></description></item><item><title>From Data to Insights: Building a No-Code Web App for Exploratory Data Analysis</title><link>https://akandaniel.netlify.app/blogs/from_data_to_insights-building_a_no-code_web_app_for_exploratory_data_analysis/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/from_data_to_insights-building_a_no-code_web_app_for_exploratory_data_analysis/</guid><description>&lt;h1 id="from-data-to-insights-building-a-no-code-web-app-for-exploratory-data-analysis">From Data to Insights: Building a No-Code Web App for Exploratory Data Analysis&lt;a class="anchor" href="#from-data-to-insights-building-a-no-code-web-app-for-exploratory-data-analysis" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Hi everyone, welcome! Today we are going to create this awesome &lt;a href="https://auto-eda.streamlit.app/">web-app&lt;/a>: that simply takes your data file and provides first-level analysis or what is commonly known as exploratory data analysis (EDA).&lt;/p>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qlxnqbe9fdb41yl5r7qw.png" alt="EDA Web App" loading="lazy" decoding="async">
&lt;/p>
&lt;p>This web-app is a tool for EDA, which is a process of understanding the data, finding patterns, outliers, correlations, and visualizing the results. EDA is an essential step before building any machine learning model or applying any statistical technique.&lt;/p></description></item><item><title>git init cohere_streamlit - Pt1</title><link>https://akandaniel.netlify.app/blogs/pt1-git_init_cohere_streamlit/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt1-git_init_cohere_streamlit/</guid><description>&lt;h1 id="pt1---git-init-cohere_streamlit">Pt1 - git init cohere_streamlit&lt;a class="anchor" href="#pt1---git-init-cohere_streamlit" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>In this post, we will generally review how to create a web app that generates text based on keywords using Streamlit and Cohere. Streamlit is a framework that lets you create interactive web apps with Python and Cohere is a natural language generation (NLG) platform that lets you generate high-quality text from keywords, prompts, or data from a simple API call.&lt;/p></description></item><item><title>git init cohere_streamlit - Pt2</title><link>https://akandaniel.netlify.app/blogs/pt2-git_init_cohere_streamlit/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt2-git_init_cohere_streamlit/</guid><description>&lt;h1 id="pt2---git-init-cohere_streamlit">Pt2 - git init cohere_streamlit&lt;a class="anchor" href="#pt2---git-init-cohere_streamlit" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;h3 id="setting-up-dependencies">Setting Up Dependencies&lt;a class="anchor" href="#setting-up-dependencies" aria-label="Link to this section">#&lt;/a>&lt;/h3>
&lt;p>After you have installed the required libraries, create a folder called .streamlit in your directory, within this folder create a secrets.toml file and put the following in it.&lt;/p>
&lt;div class="codeblock">
 &lt;div class="codeblock-bar">
 &lt;span class="codeblock-lang">text&lt;/span>
 &lt;button type="button" class="copy-btn" aria-label="Copy code to clipboard">Copy&lt;/button>
 &lt;/div>
 &lt;pre tabindex="0">&lt;code>COHERE_API_KEY=&amp;#34;&amp;lt;YOUR_COHERE_API_KEY&amp;gt;&amp;#34;&lt;/code>&lt;/pre>
 &lt;/div>&lt;p>It is important to note that we would have to do the same when deploying the app on Streamlit within the Advanced Settings option.&lt;/p></description></item><item><title>Let's build your first ML app in Google Cloud Run</title><link>https://akandaniel.netlify.app/blogs/lets_build_your_first_ml_app_in_google_cloud_run/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/lets_build_your_first_ml_app_in_google_cloud_run/</guid><description>&lt;h1 id="lets-build-your-first-ml-app-in-google-cloud-run">Let&amp;rsquo;s build your first ML app in Google Cloud Run&lt;a class="anchor" href="#lets-build-your-first-ml-app-in-google-cloud-run" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Unleash your inner data wizard! This blog is your roadmap to building a real-world machine learning app on Google Cloud Run, even if you&amp;rsquo;re a coding newbie. Let&amp;rsquo;s turn your ideas into intelligent reality.&lt;/p>
&lt;h2 id="getting-started">Getting Started&lt;a class="anchor" href="#getting-started" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Google Cloud Platform (GCP) provides a very befitting Machine Learning solution called &lt;a href="https://cloud.google.com/vertex-ai">Vertex Ai&lt;/a> that handles Google Cloud&amp;rsquo;s unified platform for building, deploying, and managing machine learning (ML) models. Our goal is to build a simple Machine Learning application that optimizes all that GCP provides plus an implementation of continuous integration and continuous development (CI/CD).&lt;/p></description></item><item><title>Local Workflow: Orchestrating Data Ingestion into Airtable</title><link>https://akandaniel.netlify.app/blogs/local_worflow-orchestrating_data_ingestion_into_airtable/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/local_worflow-orchestrating_data_ingestion_into_airtable/</guid><description>&lt;h1 id="local-workflow-orchestrating-data-ingestion-into-airtable">Local Workflow: Orchestrating Data Ingestion into Airtable&lt;a class="anchor" href="#local-workflow-orchestrating-data-ingestion-into-airtable" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smc6a9htjvvlzzq2em94.jpg" alt="Local Workflow" loading="lazy" decoding="async">
&lt;/p>
&lt;h2 id="introduction">Introduction&lt;a class="anchor" href="#introduction" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>The overall data lifecycle starts with generating data and storing it in some way, somewhere. Let&amp;rsquo;s call this the early-stage data lifecycle and we&amp;rsquo;ll explore how to automate data ingestion into &lt;strong>Airtable&lt;/strong> using a local workflow. We&amp;rsquo;ll cover setting up a development environment, designing the ingestion process, creating a batch script, and scheduling the workflow - keeping things simple, local/reproducible and accessible.
First, let&amp;rsquo;s talk about &lt;a href="https://www.airtable.com/solutions/project-management#:~:text=Roll%20up%2C%20drill%20down,programs%2C%20projects%2C%20and%20tasks.">Airtable&lt;/a>. &lt;strong>Airtable&lt;/strong> is a powerful and flexible tool that blends the simplicity of a spreadsheet with the structure of a database. I find it perfect for organizing information, managing projects, tracking tasks, and it has a free tier!&lt;/p></description></item><item><title>MLOPs with DataTalks: Wk 1</title><link>https://akandaniel.netlify.app/blogs/wk_1-mlops_with_datatalks/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/wk_1-mlops_with_datatalks/</guid><description>&lt;h1 id="wk-1-mlops-with-datatalks">Wk 1: MLOPs with DataTalks&lt;a class="anchor" href="#wk-1-mlops-with-datatalks" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Recently joined the &lt;a href="https://github.com/DataTalksClub/mlops-zoomcamp">DataTalks 2024 cohort&lt;/a> to earn a &lt;strong>MLOps&lt;/strong> Certificate and essentially build on Machine Pipeline competencies. To complete the course are assignments that have to be completed every other week.&lt;/p>
&lt;p>This will be a series on how the Author approaches these assignments and serve as solutions to those struggling.&lt;/p>
&lt;p>&lt;strong>Week 1&lt;/strong>
The assignment here is basic, you would have some requisite skill in python, ml libraries and bash scripting to see this through. See the Homework below:&lt;/p></description></item><item><title>Model Selection &amp; Hyper Parameter Tuning in Binary Data Classification (Practical Example)</title><link>https://akandaniel.netlify.app/blogs/model_selection__hyper_parameter_tuning_in_binary_data_classification-practical_example/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/model_selection__hyper_parameter_tuning_in_binary_data_classification-practical_example/</guid><description>&lt;h1 id="model-selection--hyper-parameter-tuning-in-binary-data-classification-practical-example">Model Selection &amp;amp; Hyper Parameter Tuning in Binary Data Classification (Practical Example)&lt;a class="anchor" href="#model-selection--hyper-parameter-tuning-in-binary-data-classification-practical-example" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>How can you identify Fraud using a Dataset on Energy Consumption in a relationship between Service Provider and Energy consumers? To determine the class of Fraud, 0 or 1, where 0 stands for No Instance of Fraud and 1 otherwise.&lt;/p>
&lt;p>This data was recently hosted on &lt;a href="https://zindi.africa/competitions/indabax-nigeria-23">Zindi&lt;/a> for a prediction exercise. Let&amp;rsquo;s see how we can approach this, selecting a Model and Tuning the selected model for the best Parameters which makes the best accuracy score which will in turn make the best predictions. It is in the same vein, that this is not addressed for Exploratory Data Analysis or other forms of Feature Selection or Engineering. The Author has assumed that you had moved past this as well as have partitioned your data in Train (X_train) and Test (X_test) Data in a workflow.&lt;/p></description></item><item><title>Zenml for beautiful beautiful orchestration Pt1</title><link>https://akandaniel.netlify.app/blogs/pt1-zenml_for_beautiful-beautiful_orchestration/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt1-zenml_for_beautiful-beautiful_orchestration/</guid><description>&lt;h1 id="pt1---zenml-for-beautiful-beautiful-orchestration">Pt1 - Zenml for beautiful beautiful orchestration&lt;a class="anchor" href="#pt1---zenml-for-beautiful-beautiful-orchestration" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Let&amp;rsquo;s build this!&lt;/p>
&lt;p>&lt;img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kizs8rrbda3or1czu558.png" alt="Simple ML Pipeline" loading="lazy" decoding="async">
&lt;/p>
&lt;p>To follow, please you must have at least built a Jupyter notebook or familiar with basic machine learning workflows - from data ingesting/wrangling to model deployment.&lt;/p>
&lt;h3 id="zenml">ZenML&lt;a class="anchor" href="#zenml" aria-label="Link to this section">#&lt;/a>&lt;/h3>
&lt;p>Now - ZenML is a beautiful tool I just discovered, thanks to @Ayush/@FreeCodeCamp for this &lt;a href="https://www.youtube.com/watch?v=dPmH3G9NQtY&amp;amp;t=7807s">introductory tutorial&lt;/a>.&lt;/p>
&lt;p>If you visit its webpage, &lt;a href="https://www.zenml.io/">ZenML&lt;/a> is described as &amp;ldquo;The bridge between ML and Ops&amp;rdquo; and it is! I&amp;rsquo;d show you. However, let&amp;rsquo;s review a few concepts to note on ZenML:&lt;/p></description></item><item><title>Zenml for beautiful beautiful orchestration Pt2</title><link>https://akandaniel.netlify.app/blogs/pt2-zenml_for_beautiful-beautiful_orchestration/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/pt2-zenml_for_beautiful-beautiful_orchestration/</guid><description>&lt;h1 id="pt2---zenml-for-beautiful-beautiful-orchestration">Pt2 - Zenml for beautiful beautiful orchestration&lt;a class="anchor" href="#pt2---zenml-for-beautiful-beautiful-orchestration" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>Here&amp;rsquo;s where we take the next step of organizing our single script by transforming it into specific scripts per &lt;em>step&lt;/em> - this makes things tidier. More importantly, we&amp;rsquo;d get to learn more about decorators and &lt;em>Model&lt;/em> objects, for example we get to use &lt;strong>Model&lt;/strong> Objects and how to store model artifacts.&lt;/p>
&lt;p>Since this is sequel to this &lt;a href="https://dev.to/afrologicinsect/zenml-for-beautiful-beautiful-orchestration-46db">post&lt;/a>, we can just continue with the created stack - in the author&amp;rsquo;s example it is called &lt;em>new_stack&lt;/em>. However, before we go ahead, let&amp;rsquo;s update this stack by registering an &lt;em>experiment tracker&lt;/em>, which would be used later on to configure &lt;a href="https://www.bing.com/ck/a?!&amp;amp;&amp;amp;p=8865c0a4693eaf53JmltdHM9MTcyNjg3NjgwMCZpZ3VpZD0zODA4ZWQwNS00YmRlLTYwYjQtMjNhNi1mZWZiNGEwMzYxOWMmaW5zaWQ9NTQ4NQ&amp;amp;ptn=3&amp;amp;ver=2&amp;amp;hsh=3&amp;amp;fclid=3808ed05-4bde-60b4-23a6-fefb4a03619c&amp;amp;psq=mlflow&amp;amp;u=a1aHR0cHM6Ly9tbGZsb3cub3JnL2RvY3MvbGF0ZXN0L3RyYWNraW5nLmh0bWw&amp;amp;ntb=1">&lt;em>MLflow&lt;/em>&lt;/a>.&lt;/p></description></item><item><title>Zenml for beautiful beautiful orchestration Pt3</title><link>https://akandaniel.netlify.app/blogs/deploying_a_local_mlops_solution-the_final_chapter/</link><pubDate>Sun, 16 Feb 2025 07:34:32 +0100</pubDate><guid>https://akandaniel.netlify.app/blogs/deploying_a_local_mlops_solution-the_final_chapter/</guid><description>&lt;h1 id="deploying-a-local-mlops-solution-the-final-chapter">Deploying a Local MLOps Solution: The Final Chapter&lt;a class="anchor" href="#deploying-a-local-mlops-solution-the-final-chapter" aria-label="Link to this section">#&lt;/a>&lt;/h1>
&lt;p>&lt;em>Part 3 of our MLOps Series&lt;/em>
![Orchestration Lineage] (&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfnjb3ylhxfc3c91e0pl.png">https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfnjb3ylhxfc3c91e0pl.png&lt;/a>)&lt;/p>
&lt;p>In the previous parts of this series, we explored the fundamentals of MLOps and set up our local environment. Now, we&amp;rsquo;ll conclude by deploying our solution locally.&lt;/p>
&lt;h2 id="adapting-our-approach-from-zenml-to-mlflow">Adapting Our Approach: From ZenML to MLflow&lt;a class="anchor" href="#adapting-our-approach-from-zenml-to-mlflow" aria-label="Link to this section">#&lt;/a>&lt;/h2>
&lt;p>Model deployment with the MLflow flavor in ZenML proved challenging on Windows. Since our overarching goal is to create a simple solution that can run exclusively on your local machine, we opted for the best alternative: Model Registry using Tags/Aliases on MLflow.&lt;/p></description></item><item><title>About Me</title><link>https://akandaniel.netlify.app/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/about/</guid><description>&lt;p>I am a data scientist passionate about machine learning and data analysis.&lt;/p></description></item><item><title>Play</title><link>https://akandaniel.netlify.app/play/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://akandaniel.netlify.app/play/</guid><description/></item></channel></rss>