<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Niklas Lange</title><link>https://niklas-lange.netlify.app/categories/python/</link><description>Recent content in Python on Niklas Lange</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Tue, 31 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://niklas-lange.netlify.app/categories/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Machine Learning System to Predict Phishing Sites Using HTML, URL &amp; Metadata</title><link>https://niklas-lange.netlify.app/dissertation/</link><pubDate>Tue, 31 Mar 2026 00:00:00 +0000</pubDate><guid>https://niklas-lange.netlify.app/dissertation/</guid><description>&lt;h2 id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;Since the start of the internet, phishing has been a persistent problem, with attempts
becoming more sophisticated and common in recent years. Prevention models are therefore
needed to classify sites correctly as either phishing or legitimate at scale. This paper builds
and compares three ML models — Random Forest, Logistic Regression and K-Nearest
Neighbours — and a CNN model, using URL, metadata and HTML features collected from
phishing and legitimate websites. The models were evaluated on both historical and modern
datasets, with a key finding being that all models experienced significant accuracy
degradation on modern data, with ML models dropping by ~30% and the CNN by ~48%,
despite performing best on historical data.&lt;/p&gt;</description></item><item><title>Hierarchical Reinforcement Learning for Fraud Detection</title><link>https://niklas-lange.netlify.app/projects/hierarchicalfrauddetector/</link><pubDate>Sun, 04 May 2025 00:00:00 +0000</pubDate><guid>https://niklas-lange.netlify.app/projects/hierarchicalfrauddetector/</guid><description>&lt;h2 id="what-is-this"&gt;What is this?&lt;/h2&gt;
&lt;p&gt;This was my final project for CS5841 (Machine Learning), built with three other students while I was studying at Michigan Technological University (MTU). I was the only undergraduate in the group, held my own, and am happy to present the work here.&lt;/p&gt;
&lt;h2 id="the-team"&gt;The team&lt;/h2&gt;
&lt;p&gt;The report and the work are not mine alone — this was a team project, and everyone below deserves equal credit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Amirmehdi Moghadamfarid&lt;/li&gt;
&lt;li&gt;Samuel Raber&lt;/li&gt;
&lt;li&gt;Eric Fosu-Kwabi&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="hierarchical-reinforcement-learning-fraud-detection-hrlfd-an-adaptive-approach"&gt;Hierarchical Reinforcement Learning Fraud Detection (HRLFD): an adaptive approach&lt;/h2&gt;
&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Financial fraud detection is a critical task in the modern digital economy. Traditional supervised methods often struggle with imbalanced datasets, where fraudulent transactions are far less common than legitimate ones. This project explores the use of &lt;strong&gt;reinforcement learning (Q-learning)&lt;/strong&gt; combined with &lt;strong&gt;decision tree classifiers&lt;/strong&gt; to detect fraudulent cases more effectively. The goal was to design and evaluate a hybrid model capable of identifying fraud while minimizing false negatives.&lt;/p&gt;</description></item><item><title>A Two-Year Web Scraping Pipeline</title><link>https://niklas-lange.netlify.app/projects/phcode/</link><pubDate>Sun, 15 Dec 2024 00:00:00 +0000</pubDate><guid>https://niklas-lange.netlify.app/projects/phcode/</guid><description>&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;This project implements an end-to-end pipeline to collect, store, and visualize publicly available video-ranking data from a major online video platform. The aim was to explore geographic differences in popularity, track trends over different time windows (daily, weekly, monthly, yearly, all-time), and build a robust system that runs on a schedule with monitoring and backups.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the project only collected information that is publicly visible on the site, and used rate limiting and scheduling safeguards to avoid putting load on it. See the &lt;em&gt;Ethics, legal &amp;amp; safety&lt;/em&gt; section below for the precautions taken. The pipeline was retired in August 2025, after changes to the site cut the amount of usable data — and the insight that could be drawn from it — significantly.&lt;/p&gt;</description></item></channel></rss>