<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Techwithahmedhassan on Medium]]></title>
        <description><![CDATA[Stories by Techwithahmedhassan on Medium]]></description>
        <link>https://medium.com/@techwithahmedhassan?source=rss-6c003debcc57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sYx3V7CpLswHoqJ7</url>
            <title>Stories by Techwithahmedhassan on Medium</title>
            <link>https://medium.com/@techwithahmedhassan?source=rss-6c003debcc57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:51:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@techwithahmedhassan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Buildables Fellowship — Week 6]]></title>
            <link>https://medium.com/@techwithahmedhassan/buildables-fellowship-week-6-f2b22496df16?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2b22496df16</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 10:34:21 GMT</pubDate>
            <atom:updated>2025-11-20T10:34:21.976Z</atom:updated>
            <content:encoded><![CDATA[<h3>Buildables Fellowship — Week 6</h3><p>Ever wonder how Netflix seems to know what you’ll binge next, or how Spotify nails your playlist taste? That’s all thanks to recommendation systems. Simply put, they help suggest the right content to the right user at the right time.</p><p>There are a few ways these systems work:</p><ul><li><strong>Content-Based:</strong> Looks at what you liked before and finds similar stuff. Watched <em>Inception</em>? You might like <em>Interstellar</em>.</li><li><strong>Collaborative Filtering:</strong> Uses patterns from other users. If people like you enjoyed something, it might suggest it to you too. Matrix math like SVD often powers this.</li><li><strong>Hybrid:</strong> Mix of content and collaborative approaches — Netflix uses this.</li><li><strong>Context-Aware:</strong> Takes into account extra info like time, location, or device. Breakfast vs dinner suggestions on a food app, for example.</li></ul><p>To build one, you start with data (user clicks, ratings, item info), clean it, pick a model, evaluate it, and keep improving it based on feedback. Cosine similarity and matrix factorization are just a couple of the math tricks behind the scenes.</p><p>Modern systems even use deep learning to get smarter, but challenges like new users, huge datasets, and fairness still exist.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2b22496df16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Text Summarization Using Transformer Models (T5 & PEGASUS)]]></title>
            <link>https://medium.com/@techwithahmedhassan/text-summarization-using-transformer-models-t5-pegasus-d6ff1124887b?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6ff1124887b</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Mon, 10 Nov 2025 18:12:10 GMT</pubDate>
            <atom:updated>2025-11-15T18:36:03.044Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In today’s world, we face an overwhelming amount of information every day — news articles, research papers, blogs, and reports. Reading all of them completely is not possible for most people.<br> That’s where <strong>text summarization</strong> comes in. It allows us to automatically generate short summaries of long texts while keeping the main meaning intact.</p><p>This project focuses on <strong>automatic text summarization</strong> using <strong>Transformer-based models</strong> — mainly <strong>T5-small</strong> and <strong>PEGASUS</strong>.<br> The goal is to train and evaluate these models on a popular dataset and then deploy one of them for public use.</p><h3>Problem &amp; Motivation</h3><p>The main problem is <strong>information overload</strong> — people have access to too much text, but not enough time to read everything.</p><p>My motivation was to create a system that could:</p><ul><li>Understand the key meaning of an article.</li><li>Generate a short, readable summary automatically.</li><li>Help people save time and effort when reading long content.</li></ul><p>This project also allowed me to explore <strong>Natural Language Processing (NLP)</strong> and <strong>Transformer architectures</strong>, which are the backbone of modern AI language systems.</p><h3>Dataset — CNN/DailyMail</h3><p>For this project, I used the <strong>CNN/DailyMail dataset</strong>, one of the most common benchmarks for summarization.<br> It contains thousands of news articles from <strong>CNN</strong> and <strong>Daily Mail</strong>, each paired with a human-written summary (called “highlights”).</p><p>Each record includes:</p><ul><li><strong>Article:</strong> Full news story text.</li><li><strong>Highlights:</strong> The human-written summary</li></ul><p>I used the Hugging Face datasets library to load it easily and selected smaller subsets for faster training:</p><ul><li><strong>Train set:</strong> 5,000 samples</li><li><strong>Validation set:</strong> 500 samples</li></ul><p>Before training, I performed <strong>data cleaning and exploratory analysis (EDA)</strong> — checked for null values, duplicate articles, and analyzed article lengths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtPZCNwXpsK9HXimlGEaPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJzrUl9EVOZ7GjkNJL_BEw.png" /></figure><h3>Models Used</h3><h3>T5-small</h3><p>T5 (Text-to-Text Transfer Transformer) is a flexible model that converts every NLP task into a <strong>text-to-text</strong> format.<br> For summarization, we simply format input as:</p><blockquote><em>“summarize: [article text]”</em></blockquote><p>and the model learns to produce the summary as output.</p><p>I fine-tuned <strong>T5-small</strong>, which is lightweight and suitable for Google Colab GPUs.<br> Training settings:</p><ul><li>Epochs: 2</li><li>Batch size: 8</li><li>Learning rate: 5e-5</li><li>Optimizer: AdamW</li></ul><h3>PEGASUS</h3><p>PEGASUS was designed by Google specifically for <strong>abstractive text summarization</strong>.<br> It understands sentence-level relationships and produces summaries close to human writing.<br> When I tested PEGASUS, it performed better than T5 in terms of <strong>ROUGE scores</strong>, but its model size (≈2.1 GB) made it difficult to upload to GitHub or deploy easily.</p><p>Therefore, for deployment, I chose <strong>T5-small</strong> due to its small size and decent performance.</p><h3>Results &amp; Evaluation</h3><p>I evaluated both models using <strong>ROUGE metrics</strong> (ROUGE-1, ROUGE-2, ROUGE-L).<br>These metrics measure the similarity between the generated summary and the human-written one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bcF_xqs3hZrdvRk6EAuMXQ.png" /></figure><p><strong>PEGASUS produced better summaries</strong>, but <strong>T5-small</strong> provided a great balance between speed and accuracy.<br> The summaries generated by T5 were short, clear, and captured the main ideas effectively.</p><h3>Deployment</h3><p>I deployed the <strong>T5-small</strong> model using <strong>Flask</strong>, a simple Python library for building ML web interfaces.<br> Users can input a paragraph, and the model instantly generates a short summary.</p><p><strong>GitHub Repository:</strong> <a href="#">https://github.com/ahmedhassan/text-summarization</a><br> <strong>Live Demo:</strong> <a href="https://smart-document-summarizer.streamlit.app/">Try it Here</a></p><h3>Key Learnings</h3><p>Through this project, I learned:</p><ul><li>How to preprocess and clean text data for NLP tasks.</li><li>How transformer-based models like <strong>T5</strong> and <strong>PEGASUS</strong> work.</li><li>The importance of evaluating models using metrics like <strong>ROUGE</strong>.</li><li>How to fine-tune and deploy large NLP models effectively.</li><li>The tradeoff between <strong>model size</strong> and <strong>performance</strong> during deployment.</li></ul><h3>Conclusion</h3><p>This project successfully demonstrated how AI can <strong>automatically summarize text</strong> using transformer-based models.<br> While <strong>PEGASUS</strong> achieved better accuracy, <strong>T5-small</strong> proved more practical for deployment due to its smaller size and faster inference.</p><p>Text summarization is just one of many exciting applications of NLP. With better hardware and datasets, this project can be extended to handle multiple languages or generate topic-based summaries.</p><p><strong>Author:</strong> Ahmed Hassan<br> Data Science &amp; AI Engineer<br> Portfolio | <a href="#">GitHub</a> | <a href="#">Live Demo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6ff1124887b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K-Means vs Hierarchical Clustering: How Data Shapes the Results]]></title>
            <link>https://medium.com/@techwithahmedhassan/k-means-vs-hierarchical-clustering-how-data-shapes-the-results-45934f5792c3?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/45934f5792c3</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 18:19:14 GMT</pubDate>
            <atom:updated>2025-10-21T18:21:52.927Z</atom:updated>
            <content:encoded><![CDATA[<p>Clustering is one of the most fascinating parts of unsupervised learning, it helps us uncover hidden patterns within data without any predefined labels. But not all clustering algorithms behave the same way. Their performance often depends on the nature and structure of the dataset itself.</p><p>Recently, I explored how <strong>K-Means</strong> and <strong>Hierarchical Clustering</strong> perform across different datasets, such as the popular <strong><em>Iris </em></strong><em>dataset</em> and the <strong><em>Wholesale customers</em></strong><em> dataset</em>. The goal was simple: to understand how each algorithm groups data and how dataset characteristics affect the results.</p><p>The findings were interesting. On structured and well-separated data like <em>Iris</em>, K-Means showed slightly better clustering quality, with a higher <strong>Silhouette Score</strong> (≈ 0.55) and a lower <strong>Davies Bouldin Index</strong> (≈ 0.65), indicating clear and distinct clusters. Hierarchical Clustering also performed reasonably well but produced slightly more overlap between clusters.</p><p>On the other hand, for more irregular data such as <em>Wholesale customers</em>, the results flipped a bit. Hierarchical Clustering handled the data’s uneven distribution better, achieving a slightly better <strong>Davies Bouldin Index</strong> (≈ 0.88) compared to K-Means (≈ 0.92).</p><p>In short, there’s no “one-size-fits-all” clustering algorithm. The effectiveness largely depends on the dataset’s structure, scale, and noise level. K-Means is faster and works best for spherical clusters, while Hierarchical Clustering provides more interpretability, especially when you want to visualize the relationships between clusters.</p><p>Understanding your data before choosing a clustering method is key. The better you know your dataset, the smarter your algorithm choice and the clearer your insights will be.</p><p>You can check out my testing and analysis on different datasets here: <a href="https://github.com/TechWithAhmedHassan/Buildables_DataScience_Fellowship/blob/main/Machine%20Learning/Week-09/Task_25_Clustering_Algorithms_III.ipynb">GitHub Repository</a></p><p><strong>#DataScience #MachineLearning #Clustering #KMeans #HierarchicalClustering #Python #UnsupervisedLearning</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45934f5792c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Weekly Update: Learning Deep Learning]]></title>
            <link>https://medium.com/@techwithahmedhassan/my-weekly-update-learning-deep-learning-4ec124123a80?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ec124123a80</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sun, 12 Oct 2025 12:39:26 GMT</pubDate>
            <atom:updated>2025-10-12T12:39:26.018Z</atom:updated>
            <content:encoded><![CDATA[<p>This week was full of learning and new experiences for me.</p><p>I started learning <strong>Deep Learning</strong> from the basics. I’m understanding how neural networks work and how machines can learn from data. It’s really interesting to see how deep learning is used in real-world projects.</p><p>Last week, I also took part in the <strong>NASA International Space Apps Challenge 2025</strong> — the world’s biggest hackathon organized by NASA.<br>In just 48 hours, my team and I built <strong>MeteorSense</strong>, a system that analyzes NASA’s open data to predict meteoroid hazards and help protect our planet. It was a great experience where I learned teamwork, problem-solving, and how to work under time pressure.</p><p>After the hackathon, I started researching ideas for my <strong>final project at Buildables</strong>.<br> After exploring different topics, I selected my project:</p><p><strong>Project Title:</strong> Amazon Product Insight &amp; Recommendation System<br><strong>Description:</strong> This system will automatically collect data from Amazon, study product trends, predict good pricing, and give useful insights to sellers. It will also analyze customer reviews and recommend top products by category and region.</p><p>I’m excited to continue learning and building more in the coming weeks!</p><p>#DeepLearning #NASA #Hackathon #MachineLearning #DataScience #Amazon #Buildables</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ec124123a80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6 Learning Reflection]]></title>
            <link>https://medium.com/@techwithahmedhassan/week-6-learning-reflection-9d4f77f15b72?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d4f77f15b72</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 18:32:25 GMT</pubDate>
            <atom:updated>2025-11-20T10:32:22.255Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>LinkShield — ML Based Phishing URL Detector</strong></h3><p><strong>Project: LinkShield — ML Based Phishing URL Detector</strong></p><p>This week, our team officially began <strong>LinkShield</strong>, a machine learning–based phishing URL detector. We gathered and processed labeled URL datasets, engineered features (e.g. URL length, presence of suspicious substrings like “@”, count of “/”, domain age, use of HTTPS vs HTTP), and experimented with classification models (like logistic regression, random forest, SVM). After tuning and validation, our best model yielded <strong>~97% accuracy</strong>, demonstrating strong performance in identifying phishing links.</p><p>We divided the project tasks across the team:</p><ul><li>One member handled data collection &amp; cleaning</li><li>Another focused on feature extraction &amp; transformation</li><li>One did model training, hyperparameter tuning &amp; evaluation</li><li>Another worked on validation, test splits &amp; reporting</li><li>And one managed documentation &amp; integration</li></ul><p>While <strong>Ali Hassan</strong> had issues with Discord, we switched communications to <strong>WhatsApp</strong> and held regular discussions. All team members remained cooperative, responsive, and engaged in completing their parts.</p><p>This project deepened our grasp of classification algorithms, performance metrics, and real-world application in cybersecurity. A high-accuracy phishing detector like LinkShield can be used by individuals and organizations to flag malicious URLs and reduce security risks online.</p><p>You can check out the code and full implementation in our GitHub repository:<br> <a href="https://github.com/TechWithAhmedHassan/LinkShield-ML-based-Phishing-URL-Detector">LinkShield ML-based Phishing URL Detector</a></p><p>🔖 <strong>Tags</strong><br> #MachineLearning #CyberSecurity #PhishingDetection #DataScience #Teamwork #GitHub #LinkShield #WeeklyReflection</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d4f77f15b72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Feature-Based Approach for Phishing URL Detection Using Random Forest]]></title>
            <link>https://medium.com/@techwithahmedhassan/a-feature-based-approach-for-phishing-url-detection-using-random-forest-482cd5f605a1?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/482cd5f605a1</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sun, 21 Sep 2025 17:28:11 GMT</pubDate>
            <atom:updated>2025-09-21T17:28:11.057Z</atom:updated>
            <content:encoded><![CDATA[<h3>TL;DR</h3><p>We built an explainable phishing detection pipeline that extracts 24 URL- and page-level features, trains a Random Forest classifier, and evaluates it using standard metrics. The dataset (generated by our feature-extraction script) and code live in the project repository.</p><h3>Problem statement</h3><p>Phishing remains one of the most effective cyber-attacks because it preys on human trust. The goal of this project is to build a <strong>lightweight, interpretable model</strong> that flags phishing URLs using <strong>static URL properties and light page analysis</strong> — without requiring heavy NLP or deep learning pipelines.</p><p>This design helps security teams quickly triage suspicious links and can run in near-real-time as part of a larger threat intelligence system. Instead of overwhelming analysts with complex black-box predictions, our pipeline provides <strong>transparent, feature-based insights</strong> into why a given URL might be malicious.</p><h3>Dataset description (source + features)</h3><p><strong>Source:</strong> The dataset used in this study was downloaded from kaggle, from which we later only used the URLs to check and validate our very own feature extraction code. We crawled a mixture of benign sites (top domains, curated lists) and malicious samples from open phishing repositories, and extracted features for each URL.</p><p><strong>eatures (24 total):</strong> Each feature is encoded as <strong>-1, 0, or 1</strong>, depending on its definition. Below is the list of extracted features:</p><ol><li>having_IP_Address</li><li>URL_Length</li><li>Shortening_Service</li><li>having_At_Symbol</li><li>double_slash_redirecting</li><li>Prefix_Suffix (dash in domain)</li><li>having_Sub_Domain</li><li>SSLfinal_State</li><li>Domain_registration_length</li><li>Favicon</li><li>Port</li><li>HTTPS_token</li><li>Request_URL</li><li>URL_of_Anchor</li><li>Links_in_tags</li><li>SFH (Server Form Handler)</li><li>Submitting_to_email</li><li>Abnormal_URL</li><li>Redirect_on_mouseover</li><li>RightClick</li><li>PopUpWindow</li><li>Age_of_domain</li><li>DNS_Record</li></ol><blockquote><strong><em>Note:</em></strong><em> </em><em>-1 may mean either a positive/phishy signal or an unavailable/missing value (WHOIS/third-party API timeouts). We keep </em><em>-1 by design for Random Forest (trees can exploit missingness). For linear models you’d impute or add a missingness flag.</em></blockquote><h3>Approach / Methodology</h3><h3>1. Preprocessing &amp; Normalization</h3><p>Every URL first goes through normalization before any feature is extracted. This step ensures that input strings are consistent:</p><ul><li>Converting the URL to lowercase.</li><li>Removing trailing slashes, extra query parameters, and fragments.</li><li>Standardizing encodings (for example, converting %20 to spaces).</li></ul><p>This makes sure that two URLs pointing to the same page but written slightly differently are treated identically.</p><h3>2. Static Feature Extraction</h3><p>Once normalized, we extract <strong>structural features directly from the URL string</strong>. These checks don’t require downloading the page — making them fast and reliable. Examples include:</p><ul><li>having_IP_Address: Does the URL use an IP instead of a domain?</li><li>Prefix_Suffix: Is there a dash (“-”) in the domain? Phishing domains often use dashes to mimic real brands.</li><li>having_Sub_Domain: Count of subdomains — phishing pages often nest deep into odd subdomains to appear legitimate.</li></ul><p>This step already gives us ~10 features with almost zero runtime cost.</p><h3>3. HTML Parsing</h3><p>Next, we fetch the raw HTML using requests and analyze it with BeautifulSoup.<br>Here we look at:</p><ul><li>Proportion of <strong>external resource requests</strong> (Request_URL).</li><li>Ratio of suspicious <strong>anchor tags</strong> (URL_of_Anchor).</li><li>External scripts in &lt;tags&gt; (Links_in_tags).</li><li>Whether the page <strong>submits forms to mailto:</strong> addresses (Submitting_to_email).</li></ul><p>These indicators capture how the page <em>behaves</em> and how it references other domains.</p><h3>4. Dynamic Feature Checks (Selenium)</h3><p>Some phishing techniques only appear at runtime. For these, we spin up a <strong>headless Chrome browser via Selenium</strong>:</p><ul><li>Detect if the page spawns <strong>pop-up windows</strong>.</li><li>Check for <strong>JavaScript-based redirections</strong> (Redirect_on_mouseover).</li><li>Look for invisible <strong>iframes</strong>, often used to load fake login forms.</li><li>Disable right-click to prevent copying page elements.</li></ul><p>This step is slower but essential for high-confidence detection.</p><h3>5. WHOIS &amp; Metadata</h3><p>Finally, we gather <strong>domain metadata</strong> via the python-whois library:</p><ul><li>Domain age (Domain_registration_length, Age_of_domain).</li><li>Registrar and DNS records (DNS_Record).</li></ul><p>WHOIS often fails due to rate limits or missing info, but instead of discarding those cases we assign -1 to indicate <em>unknown</em>. Random Forest handles this gracefully by treating it as a potential phishy signal.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VIaEJMDTR_TfE697.png" /></figure><h3>Feature Extraction Pipeline</h3><p>The <strong>feature extraction process</strong> is the foundation of this project. Each URL goes through a multi-step pipeline:</p><ol><li><strong>Normalization</strong>: Clean the URL, standardize casing, strip unnecessary parameters.</li><li><strong>Static Feature Checks</strong>: Extract structural properties directly from the URL string (e.g., length, symbols, subdomains).</li><li><strong>HTML Parsing</strong>: Fetch the page HTML (via requests) and parse it with BeautifulSoup. This allows checking anchors, tags, and resources.</li><li><strong>Dynamic Analysis</strong>: For more advanced features, run a headless browser (Selenium with ChromeDriver) to simulate interactions and detect behaviors like pop-ups, iframes, and JavaScript redirections.</li><li><strong>WHOIS and Metadata</strong>: Use the python-whois library to retrieve domain age, registrar, and DNS info.</li></ol><p>This yields a <strong>30-dimensional feature vector</strong> for every URL. Example output:</p><h3>Get Muhammad Ali Hassan’s stories in your inbox</h3><p>Join Medium for free to get updates from this writer.</p><p>Subscribe</p><p>[0, 0, 0, 0, 0, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 0, -1]</p><p>Once feature vectors are generated, we split the dataset into <strong>train/test sets</strong> and apply a <strong>Random Forest Classifier</strong>. This choice balances <strong>interpretability and accuracy</strong>, while handling missing values gracefully.</p><ul><li><strong>Train-test split</strong>: Stratified, to preserve phishing/legit ratios.</li><li><strong>Model</strong>: RandomForestClassifier(n_estimators=100, random_state=42)</li><li><strong>Evaluation</strong>: Accuracy, confusion matrix, precision/recall, F1-score.</li></ul><p>Random Forest provides <strong>feature importances</strong>, which help explain predictions in human terms (e.g., “This URL is suspicious mainly because it uses an IP address and has an abnormal SSL certificate”).</p><p>Here’s the Front end we built:</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M4_BA82bRYr6z3OG.png" /></figure><p>And the result we had by testing the url of facebook.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CH9R2TA2I4aYrA3R.png" /></figure><h3>Key Learnings &amp; Challenges</h3><ul><li><strong>WHOIS unreliability</strong></li><li>WHOIS lookups failed frequently (timeouts, missing registrars, different formats per TLD).</li><li>Instead of cleaning the dataset by dropping these, we kept the value as -1. Surprisingly, the Random Forest model learned that “missing WHOIS info” itself is a strong phishing indicator.</li><li><strong>Flaky APIs</strong></li><li>At first, we included APIs like Alexa rank and Google PageRank. But they either required paid tiers or were deprecated. This forced us to rethink and design the extractor to <em>fail gracefully</em>.</li><li>Lesson: build pipelines that are resilient to missing data — don’t assume external services will always be there.</li><li><strong>Selenium performance hit</strong></li><li>Running Selenium for every URL slowed down extraction dramatically.</li><li>Solution: we applied <strong>two-phase analysis</strong> — run fast static checks on all URLs, and only run Selenium for <em>borderline</em> or suspicious cases. This reduced runtime by ~60% while keeping accuracy high.</li><li><strong>Data imbalance:</strong></li><li>Like most phishing datasets, the majority of URLs are benign.</li><li>If trained naively, the model would just predict “benign” all the time.</li><li>Fix: we used class_weight=&#39;balanced&#39; in Random Forest and performed stratified train-test splits, ensuring both classes were represented proportionally.</li><li><strong>Interpretability vs. complexity</strong></li><li>We considered deep learning approaches (CNNs on URLs, RNNs for sequences), but they were less interpretable.</li><li>Security analysts need <strong>reasons</strong> for flagging a URL.</li><li>Random Forest + feature importances let us say:</li></ul><p>“This URL is flagged because it uses an IP address, has too many subdomains, and the SSL certificate is invalid.”</p><p>That level of explanation is crucial in real SOC (Security Operations Center) workflows.</p><h3>Why Feature Extraction Matters</h3><p>The heart of phishing detection is not the model itself but the <strong>quality of features</strong>. By engineering robust, interpretable features, we make the model:</p><ul><li><strong>Transparent</strong>: Analysts can see <em>why</em> a URL is suspicious.</li><li><strong>Scalable</strong>: Static features can be computed in near-real-time.</li><li><strong>Resilient</strong>: Even if one feature (like WHOIS) fails, others can still guide the model.</li></ul><h3>Conclusion</h3><p>Our phishing detection system demonstrates that <strong>30 lightweight, interpretable features</strong>, combined with a <strong>Random Forest classifier</strong>, can effectively flag malicious URLs. By prioritizing <strong>explainability and efficiency</strong>, the pipeline can be deployed as a standalone tool or integrated into larger enterprise security systems.</p><p>Future work could involve refining dynamic checks, experimenting with ensemble models, and extending the dataset with more diverse phishing samples. But the key takeaway remains: <strong>feature-driven detection is fast, explainable, and highly effective</strong> in combating phishing.</p><h3>NOTE:</h3><p>We ended up removing 6 of our features which went from total 30 to 24 due to the expenditure on API’s, since they were paid.</p><h3>Team Members &amp; Contributions</h3><ul><li><a href="https://www.linkedin.com/in/ahmedhassan731/"><strong>@Ahmed (Team Lead)</strong></a><strong>:</strong> Designed the pipeline architecture, supervised feature extraction, and led model development.</li><li><a href="https://www.linkedin.com/in/m-mohsin-aleem-8a35a8267"><strong>@Mohsin Aleem</strong></a><strong>:</strong> Implemented HTML parsing, Selenium-based dynamic checks, and optimized feature engineering.</li><li><a href="https://www.linkedin.com/in/muhammad-ali-hassan-70a416310/"><strong>Muhammad Ali Hassan</strong></a><strong>:</strong> Worked on preprocessing, WHOIS integration, dataset validation, and article preparation.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=482cd5f605a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 4- Data Science- Buildables]]></title>
            <link>https://medium.com/@techwithahmedhassan/week-4-data-science-buildables-b09cc263b8a2?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/b09cc263b8a2</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sat, 13 Sep 2025 13:19:58 GMT</pubDate>
            <atom:updated>2025-09-13T13:21:54.095Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 4 Learning Reflection</h3><h3>Regression Algorithms</h3><p>This week, I focused on <strong>Regression Algorithms</strong> in machine learning. Using a Jupyter Notebook, I worked with a student performance dataset where I performed data loading, train/test splitting, model fitting with linear regression, predictions, and evaluation using <strong>MSE</strong> and <strong>R²</strong>. I also plotted Actual vs. Predicted values and interpreted coefficients, which helped me understand how regression models explain relationships between variables.</p><h3>Classification Algorithms</h3><p>Alongside regression, I explored <strong>classification algorithms</strong> such as Logistic Regression, Decision Tree, Naive Bayes, Random Forest, Support Vector Machine (SVM), and K-Nearest Neighbors (KNN). I am still working on model evaluation for these algorithms to better compare their performance.</p><h3>Teamwork &amp; Projects</h3><p>Moreover, I completed last week’s mini project on <strong>Monday.com</strong> using our own student feedback data, which gave me practical experience in applying concepts to real datasets. I stayed active on <strong>GitHub</strong>, updated my progress, and engaged with peers by arranging meetings to discuss our project. As the <strong>team leader</strong>, I assigned tasks and coordinated teamwork, which strengthened my leadership and communication skills. I also appreciated our supportive lead, who gave me extra time to correct mistakes and provided useful research data that enriched our project.</p><h3>🔖 Tags</h3><p>#MachineLearning #Regression #Classification #DataScience #StudentProjects #GitHub #Teamwork #Leadership #WeeklyReflection</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b09cc263b8a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Insights from Social Media Engagement Data]]></title>
            <link>https://medium.com/@techwithahmedhassan/unlocking-insights-from-social-media-engagement-data-4fc22566135f?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fc22566135f</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 13:12:42 GMT</pubDate>
            <atom:updated>2025-09-07T13:12:42.399Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, every like, comment, and share tells a story. To explore this, I worked on a mini project called <strong>“Social Media Posts Engagement Dataset”</strong>, where I analyzed engagement trends across Facebook, Instagram, and Twitter.</p><p>The dataset included details such as post type, platform, posting day, likes, comments, shares, and sentiment score. By building an interactive dashboard in Excel, I was able to visualize key insights:</p><ul><li><strong>Instagram</strong> generated the highest number of likes, proving the power of visual-first content.</li><li><strong>Facebook</strong> showed strong performance in shares and discussions, highlighting its role in community building.</li><li><strong>Twitter</strong> had lower engagement but remained useful for quick interactions and real-time conversations.</li><li><strong>Videos and carousel posts</strong> stood out as the most engaging content types, while text and polls performed modestly.</li><li>Sentiment analysis revealed that most reactions were neutral or positive, with very few negative responses.</li></ul><p>This project gave me a deeper understanding of how social media platforms differ in driving engagement and how content strategies can be optimized. The key takeaway? <strong>Invest more in video and visual content, use Facebook for discussions, and leverage Twitter for timely updates.</strong></p><p>Working on this dataset was a valuable step in connecting data analysis with real-world social media strategies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fc22566135f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phishing Website Detection Using Machine Learning]]></title>
            <link>https://medium.com/@techwithahmedhassan/phishing-website-detection-using-machine-learning-97e019a23bfc?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/97e019a23bfc</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 09:58:32 GMT</pubDate>
            <atom:updated>2025-09-07T09:58:32.509Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, phishing attacks are one of the most common ways cybercriminals trick users into giving away sensitive information. For my <strong>Mini Project</strong> in the Buildables Data Science Fellowship, I decided to work on a simple yet impactful idea: <strong>Phishing Website Detection using Machine Learning</strong>.</p><h3>Project Overview</h3><p>The goal of this project was to build a machine learning model that can classify websites as <strong>phishing</strong> or <strong>legitimate</strong> based on their features. I used a publicly available dataset containing attributes like URL length, presence of special characters, HTTPS usage, and domain details.</p><p>By applying supervised learning techniques, the model learns patterns that distinguish phishing websites from safe ones.</p><h3>Key Learnings</h3><ol><li><strong>Data Preprocessing is Crucial:</strong><br> The raw dataset required significant cleaning and transformation. Handling missing values, encoding categorical features, and normalizing numerical ones were key steps.</li><li><strong>Feature Engineering Matters:</strong><br> Simple features like “Does the URL contain @?” or “Is HTTPS present?” turned out to be strong predictors. This showed how domain knowledge can make models more powerful.</li><li><strong>Model Comparison:</strong><br> I experimented with Logistic Regression, Decision Trees, and Random Forests. Random Forest performed the best in terms of accuracy and robustness.</li><li><strong>Evaluation Beyond Accuracy:</strong><br> Accuracy alone was not enough, especially since false negatives (classifying a phishing site as safe) are very risky. Precision, recall, and F1-score provided a clearer picture of performance.</li></ol><h3>Challenges Faced</h3><ul><li><strong>Imbalanced Data:</strong> The dataset had more legitimate websites than phishing ones, which initially biased the model. I had to use techniques like resampling to handle this.</li><li><strong>Overfitting:</strong> Some models performed very well on training data but poorly on test data. Regularization and cross-validation helped mitigate this.</li><li><strong>Feature Selection:</strong> Too many irrelevant features made the model noisy. I had to carefully select which features to keep.</li></ul><h3>Insights &amp; Takeaways</h3><ul><li>Phishing detection is a <strong>real-world problem</strong> where machine learning can add immediate value.</li><li>Balancing model performance with interpretability is important — in security-related tasks, humans must trust and understand AI decisions.</li><li>Even small projects can create awareness about how data science is applied to <strong>cybersecurity challenges</strong>.</li></ul><h3>Final Thoughts</h3><p>This mini project gave me hands-on experience in applying machine learning to a practical, socially relevant problem. More importantly, it taught me how to deal with challenges like data imbalance and model evaluation.</p><p>I look forward to enhancing this project further, maybe by integrating it into a <strong>browser extension</strong> that can warn users in real time.</p><h3>Keywords</h3><p>#BuildablesDataScienceFellowship1 #DataScience #MachineLearning #CyberSecurity #PhishingDetection #MiniProject</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97e019a23bfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feedback Dashboard Insights & Recommendations]]></title>
            <link>https://medium.com/@techwithahmedhassan/the-rise-of-ai-agentic-systems-a-new-era-of-intelligent-autonomy-c5422e0d09a5?source=rss-6c003debcc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5422e0d09a5</guid>
            <dc:creator><![CDATA[Techwithahmedhassan]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 09:53:37 GMT</pubDate>
            <atom:updated>2025-11-20T09:31:48.664Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>DS Fellowship 1 Feedback Dashboard</strong> offers a comprehensive view of participant experiences, preferences, and insights, helping evaluate the effectiveness of the program and guide improvements. Using interactive visualizations on <strong>Monday.com</strong>, we analyzed feedback covering demographics, learning satisfaction, and participant backgrounds, with data current as of <strong>September 05, 2025</strong>.</p><h3>📍 Participant Demographics &amp; Geographic Distribution</h3><p>The fellowship drew participants from <strong>Pakistan (91.7%)</strong> and <strong>Nigeria (8.3%)</strong>, with Islamabad hosting the largest number of participants. Other cities like Rawalpindi, Karachi, Jaranwala, Hyderabad, and Attock had smaller representation.</p><p><strong>Gender Distribution</strong> shows a notable imbalance:</p><ul><li><strong>Male:</strong> 83.3%</li><li><strong>Female:</strong> 16.7%</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUeWvXzi1XeViAOPr5ghwA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLuyxq_QyPsyFE9_LAdtNg.jpeg" /></figure><h3>📚 Student Understanding &amp; Satisfaction</h3><p>Participant feedback highlights strong learning outcomes:</p><ul><li><strong>58.3%</strong> of participants reported understanding the material <strong>“Very clearly”</strong></li><li><strong>41.7%</strong> found it <strong>“Somewhat clear”</strong></li><li><strong>100%</strong> of participants benefited from the learning activities</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXljgbHdmpBIsDNNDaim-w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzsEhFjvSJzj7Rg-eVTK-g.jpeg" /></figure><p>This reflects a well-structured curriculum and engaging delivery by the facilitators.</p><h3>👩‍🎓 Student Backgrounds</h3><p>The fellowship successfully attracted a <strong>diverse mix of academic backgrounds</strong>, including:</p><ul><li>Software Engineering &amp; Data Science (highest representation, 3 participants each)</li><li>Computer Science</li><li>Civil Engineering</li><li>Informatics</li><li>Mathematics</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPVq6uhJGz2yNuv0mMI1vA.jpeg" /></figure><p>Such diversity fosters interdisciplinary collaboration, enriching the learning experience for all participants.</p><h3>👨‍🏫 Facilitator Clarity &amp; Engagement</h3><p>Participants rated the facilitator highly:</p><ul><li>Ratings of <strong>“Good”</strong> and <strong>“Excellent”</strong> were the most common (6 participants each)</li><li>The clarity and engagement trends indicate consistent delivery quality</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BZKtZCyKufpWbc3Yy-_pQ.jpeg" /></figure><h3>🔍 Key Insights</h3><ol><li><strong>Geographic &amp; Gender Disparity</strong><br> The fellowship is heavily concentrated in Islamabad and predominantly male. Expanding outreach is essential for greater diversity.</li><li><strong>High Satisfaction &amp; Understanding</strong><br> Strong participant comprehension and 100% benefit from learning activities confirm the program’s effectiveness.</li><li><strong>Diverse Academic Backgrounds</strong><br> Attracting participants from multiple fields creates an enriched, collaborative environment.</li></ol><h3>💡 Recommendations for Future Iterations</h3><ul><li><strong>Expand Geographic Reach:</strong> Target cities outside Islamabad and countries beyond Pakistan and Nigeria.</li><li><strong>Address Gender Imbalance:</strong> Introduce targeted outreach and scholarships to encourage female participation.</li><li><strong>Leverage Facilitator Strengths:</strong> Share effective facilitator methodologies to maintain high-quality learning experiences.</li><li><strong>Foster Interdisciplinary Collaboration:</strong> Encourage participants from different backgrounds to collaborate on projects.</li></ul><p>The <strong>DS Fellowship 1 Feedback Dashboard</strong> offers valuable lessons for program improvement and future design, ensuring the fellowship remains engaging, inclusive, and impactful.</p><p>Check my progress and projects on <a href="https://github.com/ahmedhassan73/Buildables_DataScience_Fellowship/tree/main/DS%20Fellowship%20Feedback%20Dashboard"><strong>GitHub</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5422e0d09a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>