<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Senanur Çetin</title>
    <description>The latest articles on DEV Community by Senanur Çetin (@senanurcetin).</description>
    <link>https://dev.to/senanurcetin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4164153%2Fafd11d71-41a8-47b3-95b4-edf8393a880e.jpg</url>
      <title>DEV Community: Senanur Çetin</title>
      <link>https://dev.to/senanurcetin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/senanurcetin"/>
    <language>en</language>
    <item>
      <title>NEXUS Smart Factory: Predictive Maintenance with Python and Flask</title>
      <dc:creator>Senanur Çetin</dc:creator>
      <pubDate>Fri, 20 Nov 2026 00:36:04 +0000</pubDate>
      <link>https://dev.to/senanurcetin/nexus-smart-factory-predictive-maintenance-with-python-and-flask-4k57</link>
      <guid>https://dev.to/senanurcetin/nexus-smart-factory-predictive-maintenance-with-python-and-flask-4k57</guid>
      <description>&lt;p&gt;I am Senanur Cetin, the author and maintainer of the &lt;strong&gt;NEXUS Smart Factory&lt;/strong&gt; project. I built this application and published it as an open-source repository at &lt;a href="https://github.com/senanurcetin/smart-factory-app" rel="noopener noreferrer"&gt;https://github.com/senanurcetin/smart-factory-app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The project focuses on predictive-maintenance analytics, specifically designed for maintenance and reliability teams who need to make data-driven decisions about which assets to inspect first. By turning sensor telemetry into a ranked maintenance work queue, the application helps prioritize equipment that shows the highest risk of failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Prioritizing Maintenance Tasks
&lt;/h2&gt;

&lt;p&gt;In industrial environments, maintenance teams often face a flood of sensor data without a clear way to prioritize their actions. The challenge is to transform raw telemetry into a prioritized list. Reliability engineers need to know which assets are at risk right now. &lt;/p&gt;

&lt;p&gt;The NEXUS Smart Factory project addresses this by using a trained failure-risk model to process sensor data and output a work queue where assets are ranked by their predicted risk level. This is intended for engineers who need to decide which assets to inspect first to prevent downtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Approach: Predictive Analytics and Dashboards
&lt;/h2&gt;

&lt;p&gt;The project utilizes two primary datasets to demonstrate different aspects of predictive maintenance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;UCI AI4I 2020 dataset&lt;/strong&gt;: Used for training a failure-risk model that identifies potential equipment breakdowns.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;NASA C-MAPSS dataset&lt;/strong&gt;: Used for a separate remaining-useful-life (RUL) regression study.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Failure-Risk Model and Dashboard
&lt;/h3&gt;

&lt;p&gt;The core of the application is a model that analyzes sensor telemetry to predict the likelihood of failure. This model powers a plant dashboard built with Flask. Instead of just showing raw numbers, the dashboard presents a ranked maintenance work queue. This allows a user to see exactly which machines require immediate attention based on the model's risk assessment.&lt;/p&gt;

&lt;h3&gt;
  
  
  RUL Regression Study
&lt;/h3&gt;

&lt;p&gt;In addition to failure risk, the project includes a study on Remaining Useful Life (RUL) using the NASA C-MAPSS data. This regression study provides a different perspective on asset health by focusing on the remaining lifespan of the equipment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measured Results
&lt;/h2&gt;

&lt;p&gt;Based on the project documentation at &lt;a href="https://github.com/senanurcetin/smart-factory-app" rel="noopener noreferrer"&gt;https://github.com/senanurcetin/smart-factory-app&lt;/a&gt;, the implementation achieves the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Ranked Maintenance Work Queue&lt;/strong&gt;: The system successfully turns sensor telemetry into a prioritized list for maintenance teams.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Failure-Risk Prediction&lt;/strong&gt;: A trained model identifies assets at risk of failure.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;RUL Regression&lt;/strong&gt;: The project includes a study for predicting remaining useful life using the NASA C-MAPSS dataset.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations and Constraints
&lt;/h2&gt;

&lt;p&gt;While the project provides a functional end-to-end pipeline, there are certain limits to the current implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Dataset Specificity&lt;/strong&gt;: The project is built specifically around the UCI AI4I 2020 and NASA C-MAPSS datasets.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Target Audience&lt;/strong&gt;: The tool is designed for maintenance and reliability teams and engineers reviewing the portfolio project, rather than as a general-purpose data visualization tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Run the Project
&lt;/h2&gt;

&lt;p&gt;To explore the code and run the application, you can set it up to run it locally. The project is structured as a Flask application that serves the plant dashboard.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Access the repository at &lt;a href="https://github.com/senanurcetin/smart-factory-app" rel="noopener noreferrer"&gt;https://github.com/senanurcetin/smart-factory-app&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt; The application uses Python and Flask to serve the dashboard.&lt;/li&gt;
&lt;li&gt; The project includes the necessary logic to process the UCI AI4I 2020 and NASA C-MAPSS datasets to generate the maintenance queue and RUL study.&lt;/li&gt;
&lt;li&gt; Once the environment is ready, you can run it locally to view the ranked maintenance work queue and the predictive analytics interface.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>datascience</category>
      <category>predictivemaintenance</category>
    </item>
    <item>
      <title>My small Python package got its first outside contributions in one evening</title>
      <dc:creator>Senanur Çetin</dc:creator>
      <pubDate>Wed, 18 Nov 2026 19:02:02 +0000</pubDate>
      <link>https://dev.to/senanurcetin/my-small-python-package-got-its-first-outside-contributions-in-one-evening-2fp7</link>
      <guid>https://dev.to/senanurcetin/my-small-python-package-got-its-first-outside-contributions-in-one-evening-2fp7</guid>
      <description>&lt;p&gt;Two weeks ago I published &lt;a href="https://pypi.org/project/jsonl-utf8-guard/" rel="noopener noreferrer"&gt;&lt;code&gt;jsonl-utf8-guard&lt;/code&gt;&lt;/a&gt;, a dependency-free validator for UTF-8 JSONL files. It started as workshop material: a small, offline tool to teach red-to-green regression testing.&lt;/p&gt;

&lt;p&gt;Today it got its first two pull requests from someone I had never talked to. A few hours later they were in v0.2.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Both fixes are about one thing: error messages that tell you what is actually wrong.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# before
Validation failed: Line 1: invalid JSON

# after
Validation failed: Line 1: starts with a UTF-8 byte order mark (BOM)
Validation failed: Line 1: contains a bare carriage return; use LF or CRLF line endings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A BOM is what Windows Notepad and some Excel exports put at the start of a file. A bare carriage return is common in old Mac files and some industrial log exporters. In both cases the JSON itself was fine, and "invalid JSON" sent people looking in the wrong place.&lt;/p&gt;

&lt;p&gt;The files are still rejected, so the behavior is unchanged. Only the message is more specific, and it still never prints record content.&lt;/p&gt;

&lt;h2&gt;
  
  
  What made it work
&lt;/h2&gt;

&lt;p&gt;I didn't do anything clever. Looking back, three things mattered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small issues with a reproduction.&lt;/strong&gt; Each issue had the exact command, the current output, where to look in the code, and a "done when" list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A clear order.&lt;/strong&gt; The contributing guide asks for a failing test first, then the smallest fix. Both PRs followed it without me asking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast, specific review.&lt;/strong&gt; I reviewed within hours and said what I liked, not only what to change. When two people picked the same issue, I thanked the second one, closed their PR and pointed them to another open issue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One honest note: the second PR conflicted with the first after merging, so I resolved the conflict in a separate PR that keeps the contributor's commits and name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Want to try?
&lt;/h2&gt;

&lt;p&gt;There are two new starter issues with the same format:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/senanurcetin/offline-jsonl-workshop/issues/40" rel="noopener noreferrer"&gt;Name duplicate keys and NaN/Infinity instead of "invalid JSON"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/senanurcetin/offline-jsonl-workshop/issues/41" rel="noopener noreferrer"&gt;Reject &lt;code&gt;--max-bytes&lt;/code&gt; below 1 as a usage error&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Comment on the issue first so work isn't duplicated. Questions are welcome in &lt;a href="https://github.com/senanurcetin/offline-jsonl-workshop/discussions" rel="noopener noreferrer"&gt;Discussions&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install -U jsonl-utf8-guard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to &lt;a href="https://github.com/P1LOTRX" rel="noopener noreferrer"&gt;@P1LOTRX&lt;/a&gt; for the first contributions.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>github</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My retinopathy model scored QWK 0.91. A classifier that never saw a retina scored 0.65.</title>
      <dc:creator>Senanur Çetin</dc:creator>
      <pubDate>Wed, 18 Nov 2026 16:27:57 +0000</pubDate>
      <link>https://dev.to/senanurcetin/my-retinopathy-model-scored-qwk-091-a-classifier-that-never-saw-a-retina-scored-065-1h6f</link>
      <guid>https://dev.to/senanurcetin/my-retinopathy-model-scored-qwk-091-a-classifier-that-never-saw-a-retina-scored-065-1h6f</guid>
      <description>&lt;p&gt;I trained an EfficientNet-B0 to grade diabetic retinopathy on APTOS 2019. The five-fold ensemble reached QWK 0.909 on the held-out test split. Public solutions go past 0.93, so the score itself was not the interesting part. What I wanted to know was whether the model earned it for reasons that would survive a different clinic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The baseline that should not work
&lt;/h2&gt;

&lt;p&gt;Before trusting the CNN, I trained a RandomForest on file properties only: resolution, aspect ratio, brightness, contrast and file size. It never saw a retinal pixel.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;metadata only&lt;/th&gt;
&lt;th&gt;always predict 0&lt;/th&gt;
&lt;th&gt;CNN ensemble&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;QWK&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.652&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0.000&lt;/td&gt;
&lt;td&gt;0.909&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accuracy&lt;/td&gt;
&lt;td&gt;0.708&lt;/td&gt;
&lt;td&gt;0.493&lt;/td&gt;
&lt;td&gt;0.803&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The reason is acquisition. APTOS was collected across sites with different cameras, and resolution is a camera signature. Of the 974 images at 1050x1050, 92.5% are graded No DR. Across every other resolution the share is 33.6%. Device correlates with disease prevalence, so file properties predict the label.&lt;/p&gt;

&lt;p&gt;Within APTOS I could only narrow this down. Split by resolution, the CNN still beat the metadata model in both strata, but the 1050x1050 test stratum held four diseased eyes, and the other stratum still mixed sixteen resolutions with very different label shares. To actually remove the shortcut I needed a test set from one camera.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing the prediction down first
&lt;/h2&gt;

&lt;p&gt;IDRiD has 455 images, all at 4288x2848, so geometry carries no label information. The prior is also inverted: every APTOS image at that resolution is diseased, while 129 of the 455 IDRiD eyes are healthy.&lt;/p&gt;

&lt;p&gt;Before running anything I wrote down a prediction: if the model leaned on acquisition cues, it would over-call disease on IDRiD and specificity would collapse.&lt;/p&gt;

&lt;p&gt;It did not. Same ensemble, no fine-tuning, APTOS thresholds unchanged:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;APTOS test&lt;/th&gt;
&lt;th&gt;IDRiD&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;QWK&lt;/td&gt;
&lt;td&gt;0.909&lt;/td&gt;
&lt;td&gt;0.805&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Referable sensitivity&lt;/td&gt;
&lt;td&gt;0.956&lt;/td&gt;
&lt;td&gt;0.885&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Referable specificity&lt;/td&gt;
&lt;td&gt;0.917&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.987&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Specificity went up. Missed referrals (true grade 3+ called 0 or 1) were 2 of 148. That rules out exclusive reliance on the resolution proxy, though not every possible acquisition confound.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second external set is where it broke
&lt;/h2&gt;

&lt;p&gt;Messidor-2 is 1,744 gradable images from France, each graded by a panel of three retina specialists who adjudicated disagreements. APTOS labels come from single graders. I committed four predictions before downloading a single image. The first one was referable AUC of at least 0.93.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;APTOS test&lt;/th&gt;
&lt;th&gt;IDRiD&lt;/th&gt;
&lt;th&gt;Messidor-2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Referable AUC&lt;/td&gt;
&lt;td&gt;0.983&lt;/td&gt;
&lt;td&gt;0.984&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.819&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Five-way QWK&lt;/td&gt;
&lt;td&gt;0.909&lt;/td&gt;
&lt;td&gt;0.805&lt;/td&gt;
&lt;td&gt;0.493&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That prediction failed. At the APTOS operating point, referable sensitivity on Messidor-2 was 0.26. The failure sits in one place: 83% of the 347 Moderate eyes were graded below Moderate, against 21% on IDRiD. Grades 3 and 4 were still recognised. Moderate disease with hard exudates near the fovea scored much higher than Moderate disease without them.&lt;/p&gt;

&lt;p&gt;My reading, made after seeing the data, was that this is about the labels rather than the images. APTOS single-grader labels disagree with themselves on 29% of duplicate pairs (43 of 148). A model trained on them learns where single graders put the Mild/Moderate boundary, and an adjudicating panel puts it lower.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing the labels reading
&lt;/h2&gt;

&lt;p&gt;I then tested that reading on an examination-disjoint split of Messidor-2 (872 test eyes, 437 examinations). One arm was fine-tuned on the panel's labels. A control arm was fine-tuned on the same images, but with the unchanged model's own grades as labels, so it got the new camera without the new boundary.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;referable AUC&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Unchanged&lt;/td&gt;
&lt;td&gt;0.8405&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fine-tuned, control labels&lt;/td&gt;
&lt;td&gt;0.8534&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fine-tuned, adjudicated labels&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.9435&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The adjudicated-minus-control difference is +0.090, with a 95% paired bootstrap interval of [+0.061, +0.120]. So most of the gain comes from the labels, not from seeing new images. Messidor-2 had already been inspected by then, so this is exploratory rather than a fresh confirmation. It also had a cost: accuracy on the APTOS test set fell from 80.6% to 64.2%. No fine-tuned model was promoted to the demo.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I took from it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An internal test score tells you how well a model reproduces its training labels' source, cameras and graders included. It does not tell you which of those it learned.&lt;/li&gt;
&lt;li&gt;A shortcut baseline is cheap. If a model that cannot see the content scores 0.65, the headline number needs a second look.&lt;/li&gt;
&lt;li&gt;Writing predictions down before an external run made the results easier to read honestly. One held, one failed, and the failed one taught me more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a research project, not a diagnostic tool. Prospective clinical use, fairness across populations and multi-seed robustness were not evaluated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code, results and audit records: &lt;a href="https://github.com/senanurcetin/APTOS-2019-diabetic-retinopathy" rel="noopener noreferrer"&gt;github.com/senanurcetin/APTOS-2019-diabetic-retinopathy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Research explorer: &lt;a href="https://senanurcetin.github.io/APTOS-2019-diabetic-retinopathy/" rel="noopener noreferrer"&gt;senanurcetin.github.io/APTOS-2019-diabetic-retinopathy&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kaggle notebook: &lt;a href="https://www.kaggle.com/code/senanuretin/aptos-three-predictions-i-wrote-before-the-data" rel="noopener noreferrer"&gt;Three predictions I wrote before the data&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>computervision</category>
      <category>python</category>
    </item>
    <item>
      <title>A laptop GPU trained XGBoost 4.6-9x faster. Data prep was a draw.</title>
      <dc:creator>Senanur Çetin</dc:creator>
      <pubDate>Wed, 11 Nov 2026 17:18:13 +0000</pubDate>
      <link>https://dev.to/senanurcetin/a-laptop-gpu-trained-xgboost-46-9x-faster-data-prep-was-a-draw-23n2</link>
      <guid>https://dev.to/senanurcetin/a-laptop-gpu-trained-xgboost-46-9x-faster-data-prep-was-a-draw-23n2</guid>
      <description>&lt;p&gt;I ran one feature-and-model recipe twice on the same fraud dataset: once on pandas with XGBoost on CPU, once on RAPIDS cuDF with XGBoost on CUDA. Model training was 4.6-9x faster on the GPU. Data preparation took about the same time on both. The numbers, and the limits of this measurement, are below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data: the IEEE-CIS Fraud Detection training set, all 590,540 transactions and 434 features.&lt;/li&gt;
&lt;li&gt;Recipe: CSV read, identity join, a 0.95 missingness filter on the V columns, categorical encoding, group-by aggregates, then XGBoost (200 trees) on a time-ordered 80/20 split.&lt;/li&gt;
&lt;li&gt;Same code on both engines, because cuDF follows the pandas API.&lt;/li&gt;
&lt;li&gt;Hardware: one laptop with an Intel i7-11800H (16 logical cores) and an NVIDIA RTX 3060 Laptop GPU (6 GB).&lt;/li&gt;
&lt;li&gt;Software: the GPU run used WSL2, Python 3.12, cuDF 26.10 and XGBoost 3.4.1. The CPU run used native Windows, Python 3.11, pandas 3.1.1 and XGBoost 3.2.0, because XGBoost 3.4.1 needs Python 3.12.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;Each cell is the range over a cold and a warm run in the same process. The first GPU run includes one-time kernel compilation. Each step range is taken separately, and the Total row is the measured end-to-end time of each run, so the rows above do not add up exactly to the Total.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step (seconds)&lt;/th&gt;
&lt;th&gt;GPU: cuDF + XGBoost CUDA&lt;/th&gt;
&lt;th&gt;CPU: pandas + XGBoost, 16 threads&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CSV read&lt;/td&gt;
&lt;td&gt;4.72 - 10.64&lt;/td&gt;
&lt;td&gt;16.677 - 30.27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rest of the data preparation&lt;/td&gt;
&lt;td&gt;13.483 - 23.056&lt;/td&gt;
&lt;td&gt;4.584 - 5.661&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XGBoost fit&lt;/td&gt;
&lt;td&gt;26.143 - 28.602&lt;/td&gt;
&lt;td&gt;131.522 - 235.392&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;45.357 - 64.222&lt;/td&gt;
&lt;td&gt;168.874 - 258.751&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Validation ROC-AUC / average precision: 0.9158 / 0.5581 on GPU, 0.9147 / 0.5553 on CPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers say
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Training is where the GPU pays off: 4.6-9x faster here.&lt;/li&gt;
&lt;li&gt;CSV parsing was about 3.5x faster on the GPU when warm.&lt;/li&gt;
&lt;li&gt;The smaller steps (filters, join, encoding, group-bys) were faster on the CPU at this size. Each GPU operation has a fixed cost, so at 590k rows the GPU did not win on data preparation overall.&lt;/li&gt;
&lt;li&gt;Model quality is the same. ROC-AUC differs by about 0.001.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One laptop, one dataset, one recipe. I would not extrapolate to other hardware or to much larger tables.&lt;/li&gt;
&lt;li&gt;The CPU fit time moves with laptop thermals (132-235 s), which is why I report ranges instead of one number.&lt;/li&gt;
&lt;li&gt;A CPU run inside WSL2 was discarded: that WSL instance is capped at 4 GB RAM and 4 cores, and it started swapping.&lt;/li&gt;
&lt;li&gt;The two environments differ in Python and library versions, so this is a practical comparison of two setups, not a controlled test of one variable.&lt;/li&gt;
&lt;li&gt;This XGBoost recipe is a speed benchmark. It is not the LightGBM model published in the same repository, and its AUC is not that model's AUC.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reproduce
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Linux or WSL2 with an NVIDIA GPU; data: train_transaction.csv and train_identity.csv from Kaggle&lt;/span&gt;
pip install --extra-index-url=https://pypi.nvidia.com &lt;span class="s2"&gt;"cudf-cu13"&lt;/span&gt; pandas pyarrow xgboost scikit-learn
python scripts/benchmark_rapids_gpu.py --data &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;dir&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --engine cudf --n-estimators 200 --out results/gpu.json
python scripts/benchmark_rapids_gpu.py --data &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;dir&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --engine pandas --n-estimators 200 --out results/cpu.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script, raw GPU and CPU results, and the full fraud analytics pipeline are in the repository: &lt;a href="https://github.com/senanurcetin/ieee-fraud-detection-analytics" rel="noopener noreferrer"&gt;https://github.com/senanurcetin/ieee-fraud-detection-analytics&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The raw IEEE-CIS files are not included. Get them from Kaggle under the competition's terms.&lt;/p&gt;

</description>
      <category>python</category>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>performance</category>
    </item>
    <item>
      <title>My ensemble scored 0.129 on the leaderboard. Here is what explained the gap</title>
      <dc:creator>Senanur Çetin</dc:creator>
      <pubDate>Mon, 05 Oct 2026 20:03:09 +0000</pubDate>
      <link>https://dev.to/senanurcetin/my-ensemble-scored-0129-on-the-leaderboard-here-is-what-explained-the-gap-5aba</link>
      <guid>https://dev.to/senanurcetin/my-ensemble-scored-0129-on-the-leaderboard-here-is-what-explained-the-gap-5aba</guid>
      <description>&lt;p&gt;My ensemble scored 0.129 on the leaderboard, below the field median. I published it anyway, then tested six explanations for the gap.&lt;/p&gt;

&lt;p&gt;Before submitting I wrote down a forecast: 0.143. The graded scores were 0.128 (single model) and 0.129 (ensemble).&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;804.5M raw market rows reduced to 292 BigQuery features, walk-forward validation with a one-month embargo, six months held out and read exactly once (+0.15171).&lt;/p&gt;

&lt;h2&gt;
  
  
  What I found, without spending another submission
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One hypothesis confirmed: my hold-out sat at the 83rd percentile of period difficulty. De-biasing for that gives +0.14084, within 0.00004 of the walk-forward mean computed a different way.&lt;/li&gt;
&lt;li&gt;Four falsified, including the two I liked most. One unsettled.&lt;/li&gt;
&lt;li&gt;Period difficulty explains 46% of the gap. The rest is documented, not explained away.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Five recorded forecasts, five overshoots, all in the same direction. That points to one cause, not five mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I kept
&lt;/h2&gt;

&lt;p&gt;An internal gain smaller than the fold-to-fold noise tells you which model to prefer, not what a leaderboard will show.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Case study: &lt;a href="https://senanur-cetin.vercel.app/projects/mscapital-market-forecasting?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=w1-mscapital" rel="noopener noreferrer"&gt;MSCapital market forecasting&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Notebook: &lt;a href="https://www.kaggle.com/code/senanuretin/ms-capital-my-hold-out-was-a-lucky-stretch" rel="noopener noreferrer"&gt;My hold-out was a lucky stretch (Kaggle)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>kaggle</category>
      <category>modelevaluation</category>
    </item>
  </channel>
</rss>
