<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Viscioletti</title>
<link>https://viscioletti.com/</link>
<atom:link href="https://viscioletti.com/index.xml" rel="self" type="application/rss+xml"/>
<description>The ideas factory</description>
<generator>quarto-1.9.37</generator>
<lastBuildDate>Fri, 03 Apr 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Ink v1.1.5: Meet Cogito, Your Local-First Writing Companion</title>
  <link>https://viscioletti.com/posts/2026/04/03/ink-v1-1-5-meet-cogito-your-local-first-writing-companion/</link>
  <description><![CDATA[ 





<style>
img.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
</style>
<p><img src="https://viscioletti.com/posts/2026/04/03/ink-v1-1-5-meet-cogito-your-local-first-writing-companion/images/ink-cogito-mode-descartes.png" title="ink, a minimalist Markdown editor" class="cover"></p>
<section id="ink-v1.1.5-meet-cogito-your-local-first-writing-companion" class="level1">
<h1>Ink v1.1.5: Meet Cogito, Your Local-First Writing Companion</h1>
<p><em>Weekly development digest — week of 28 March to 3 April 2026</em></p>
<p>Writing tools have a habit of getting in your way. They autocomplete your sentences, rewrite your paragraphs, and optimise your prose into something that sounds like everyone else. <a href="https://github.com/feddernico/ink">ink</a> — a local-first markdown editor and exporter — has been quietly moving in a different direction, and this week’s release makes that clearest yet.</p>
<p><strong>v1.1.5 introduces Cogito Mode</strong>, and it’s worth understanding what makes it different from every other “AI writing assistant” you’ve seen.</p>
<hr>
<section id="what-is-cogito-mode" class="level3">
<h3 class="anchored" data-anchor-id="what-is-cogito-mode">What Is Cogito Mode?</h3>
<p>Cogito doesn’t write for you. It asks you questions.</p>
<p>Accessible from a new button in the top-right corner of the editor, Cogito opens a side panel that reads your last sentence and generates exactly three follow-up questions — prompts designed to sharpen your thinking, surface assumptions, or push your argument further. You can insert those questions directly into your document as structured block content, essentially scaffolding your own reflection inside the draft itself.</p>
<p>There are two inference modes: <strong>Lite</strong>, for speed, and <strong>Deep</strong>, for heavier reasoning. Both run locally. No data leaves your machine.</p>
<p>The philosophy here is deliberate. Cogito isn’t trying to complete your thoughts — it’s trying to expand and refine them.</p>
<hr>
</section>
<section id="what-changed-since-v1.1.4" class="level3">
<h3 class="anchored" data-anchor-id="what-changed-since-v1.1.4">What Changed Since v1.1.4</h3>
<p>The jump from v1.1.4 (released just two days earlier, on 31 March) to v1.1.5 is surprisingly large for such a short window.</p>
<p>v1.1.4 focused on polish and tooling hygiene: replacing all emoji icons across the application with modern SVG icons from <a href="https://lucide.dev">Lucide Icons</a>, wiring ESLint into pre-commit hooks, and improving the Makefile with a <code>help</code> command. These aren’t flashy changes, but they signal a codebase being prepared for something bigger.</p>
<p>v1.1.5 is that something bigger.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th>v1.1.4</th>
<th>v1.1.5</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>AI features</td>
<td>None</td>
<td>Cogito side panel, Lite/Deep models</td>
</tr>
<tr class="even">
<td>Testing</td>
<td>Pre-existing suite</td>
<td>QUnit + Cypress E2E for Cogito</td>
</tr>
<tr class="odd">
<td>Release pipeline</td>
<td>release-please automation</td>
<td>Build validation + ink-app.html gating</td>
</tr>
<tr class="even">
<td>UI</td>
<td>SVG icons replacing emojis</td>
<td>Cogito button top-right</td>
</tr>
</tbody>
</table>
<hr>
</section>
<section id="why-this-release-matters" class="level3">
<h3 class="anchored" data-anchor-id="why-this-release-matters">Why This Release Matters</h3>
<p>Until now, ink was a very good local markdown editor with solid export capabilities. v1.1.5 marks the beginning of a different identity: a <em>thoughtful writing environment</em> that uses AI not to produce output, but to generate productive friction.</p>
<p>In an era where most AI writing tools are racing toward full automation, Cogito Mode is an interesting counter-argument. It keeps you in the seat. It treats your ideas as worth developing, not replacing.</p>
<p>If that sounds like the kind of tool you’ve been waiting for, <a href="https://github.com/feddernico/ink/releases/tag/v1.1.5">the release is available on GitHub</a> — a single self-contained <code>ink-app.html</code> file you can run in any browser, with no installation required.</p>
<p>You can also <a href="https://viscioletti.com/ink">give it a try here</a></p>
<hr>
<p><em>Follow the project at <a href="https://github.com/feddernico/ink">github.com/feddernico/ink</a>. Built by <a href="https://github.com/feddernico">@feddernico</a>.</em></p>


</section>
</section>

 ]]></description>
  <category>release</category>
  <category>open-source</category>
  <category>productivity</category>
  <category>tools</category>
  <category>markdown</category>
  <category>ai</category>
  <guid>https://viscioletti.com/posts/2026/04/03/ink-v1-1-5-meet-cogito-your-local-first-writing-companion/</guid>
  <pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/2026/04/03/ink-v1-1-5-meet-cogito-your-local-first-writing-companion/images/ink-cogito-mode-descartes.png" medium="image" type="image/png" height="79" width="144"/>
</item>
<item>
  <title>Come un lago di notte</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/come-un-lago-di-notte/</link>
  <description><![CDATA[ 





<div id="card" class="spatial-card">
<img src="https://viscioletti.com/posts/come-un-lago-di-notte/images/stifone-narni-notte.png" alt="Stifone, Narni, nighttime">
<div class="caption">
Stifone, Narni — nighttime
</div>
</div>
<p><br></p>
<div class="poem">
<p>E tu sei come un lago di notte<br> ti vengo a cercare<br> ma ho un taglio sul piede<br> non cammino bene<br> mi fermo a pensare<br> <br> sono rigonfio di rabbia <br><br> mettere ordine nella mia stanza<br> era mettere ordine nella mia vita <br><br> una moltitudine di solitudini <br><br> quanti posti<br> quanti luoghi<br> quanti bicchieri<br> quante persone<br> <br> e noi siamo come i lupi nel plenilunio <br><br> quante ne hai avute, di collisioni?<br> mi mancano le mani per contarle</p>
</div>



 ]]></description>
  <category>poetry</category>
  <guid>https://viscioletti.com/posts/come-un-lago-di-notte/</guid>
  <pubDate>Sun, 29 Mar 2026 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/come-un-lago-di-notte/images/stifone-narni-notte.png" medium="image" type="image/png" height="215" width="144"/>
</item>
<item>
  <title>Introducing ink: A Minimalist Markdown Writing App That Lives in Your Browser</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/introducing-ink-a-minimalist-markdown-writing-app-that-lives-in-your-browser/</link>
  <description><![CDATA[ 





<style>
img.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
</style>
<p><img src="https://viscioletti.com/posts/introducing-ink-a-minimalist-markdown-writing-app-that-lives-in-your-browser/images/ink-post-top-image.png" title="ink, a minimalist Markdown editor" class="cover"></p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p><strong>Recipe for frictionless writing</strong></p>
<p><strong>Reading time:</strong> 3 minutes <br> <strong>Ingredients:</strong> 1 open browser, 1 local folder, zero distractions <br> <strong>Difficulty:</strong> 🔴⚪⚪⚪⚪ <br></p>
<p><strong>Suggested musical pairing:</strong><br>
A quiet lo-fi or ambient track with no vocals — something that stays in the background and lets the words do the work.</p>
<p>Complexity drill-down:</p>
<ul>
<li>🔴 Open the link</li>
<li>⚪ Understand what ink does</li>
<li>⚪ Picture how it fits your own workflow</li>
<li>⚪ Realize your files stay yours</li>
<li>⚪ Reward: a writing app that gets out of the way</li>
</ul>
</div>
</div>
<p>There’s a particular kind of frustration that comes from reaching for a writing tool and finding yourself distracted — by a cluttered interface, a subscription paywall, or a syncing service you didn’t ask for. <a href="https://viscioletti.com/ink"><strong>ink</strong></a> is my answer to that frustration: a free, open-source, minimalist markdown writing app that runs entirely in your browser, with no account, no cloud, and no noise.</p>
<section id="what-is-ink" class="level2">
<h2 class="anchored" data-anchor-id="what-is-ink">What Is ink?</h2>
<p>ink is a single-page webapp built for writing and managing documents in Markdown. You open it, you write. Your files are saved to a local workspace on your own machine using the browser’s native <a href="https://developer.mozilla.org/en-US/docs/Web/API/File_System_API">File System Access API</a>, which means your notes never leave your device unless you choose to export them.</p>
<p>The entire application ships as a <strong>single HTML file</strong> — <code>ink-app.html</code> — with all styles and scripts embedded inline. There’s nothing to install, no server to maintain, and no dependencies to update on your end. You can even download the file and run it offline, if you wish so.</p>
</section>
<section id="why-i-built-it" class="level2">
<h2 class="anchored" data-anchor-id="why-i-built-it">Why I Built It</h2>
<p>Most writing apps fall into one of two traps: they’re either too powerful (and thus too complex), or they’re too simple (and miss features you actually need). ink sits in the space between — functional without being bloated, minimal without being crippled.</p>
</section>
<section id="core-features" class="level2">
<h2 class="anchored" data-anchor-id="core-features">Core Features</h2>
<ul>
<li><strong>Workspace-based organisation</strong> — open a local folder as your workspace and browse all your <code>.md</code> files in a sidebar tree</li>
<li><strong>Markdown writing</strong> — a focused editor with clean, readable typography</li>
<li><strong>Tag/frontmatter support</strong> — notes support YAML frontmatter tags, parsed and indexed automatically</li>
<li><strong>Export options</strong> — export the current note as Markdown, or export all notes at once as a single JSON bundle</li>
<li><strong>Keyboard-first workflow</strong> — everything has a shortcut:</li>
</ul>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Action</th>
<th>Shortcut</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>New note</td>
<td><code>Ctrl/Cmd + E</code></td>
</tr>
<tr class="even">
<td>Open workspace</td>
<td><code>Ctrl/Cmd + Shift + O</code></td>
</tr>
<tr class="odd">
<td>Save note</td>
<td><code>Ctrl/Cmd + S</code></td>
</tr>
<tr class="even">
<td>Refresh workspace</td>
<td><code>Ctrl/Cmd + L</code></td>
</tr>
<tr class="odd">
<td>Export as Markdown</td>
<td><code>Ctrl/Cmd + Shift + M</code></td>
</tr>
<tr class="even">
<td>Export all as JSON</td>
<td><code>Ctrl/Cmd + Shift + S</code></td>
</tr>
</tbody>
</table>
</section>
<section id="how-it-works-under-the-hood" class="level2">
<h2 class="anchored" data-anchor-id="how-it-works-under-the-hood">How It Works Under the Hood</h2>
<p>For the technically curious: ink is written in <strong>TypeScript</strong> and built with <strong>esbuild</strong> and <strong>SASS</strong>, assembled into a single self-contained HTML file. The source is modular — feature responsibilities are split cleanly across <code>app-controller</code>, <code>ui-events</code>, <code>workspace-io</code>, <code>tree-render</code>, <code>dom</code>, <code>fs-api</code>, and <code>types</code>. The project is fully tested, with both <strong>QUnit unit tests</strong> and <strong>Cypress end-to-end tests</strong> covering the core writing workflow.</p>
<p>The use of the File System Access API is a deliberate choice: it bridges the gap between a native app and a web app. You pick a real folder on your disk, ink reads and writes real files, and those files are yours — readable by any text editor, version-controllable with Git, and portable to any other tool.</p>
</section>
<section id="who-is-it-for" class="level2">
<h2 class="anchored" data-anchor-id="who-is-it-for">Who Is It For?</h2>
<p>ink is ideal if you:</p>
<ul>
<li>Take notes in plain Markdown and want a lightweight home for them</li>
<li>Prefer working with local files rather than a cloud service</li>
<li>Value keyboard shortcuts and a fast, snappy interface</li>
<li>Want an app you can inspect, fork, and self-host freely</li>
<li>Simply want to write without being sold something</li>
</ul>
<p>It’s a good fit for developers, writers, researchers, and anyone who thinks their notes should be stored in <code>.md</code> files they actually own.</p>
</section>
<section id="try-it-now" class="level2">
<h2 class="anchored" data-anchor-id="try-it-now">Try It Now</h2>
<p>Head to <a href="https://viscioletti.com/ink"><strong>viscioletti.com/ink</strong></a> to open the app directly in your browser — no sign-up needed. The source code is available and open at <a href="https://github.com/feddernico/ink"><strong>github.com/feddernico/ink</strong></a> under the MIT licence. Contributions and feedback are very welcome.</p>
</section>
<section id="would-you-like-to-contribute" class="level2">
<h2 class="anchored" data-anchor-id="would-you-like-to-contribute">Would You Like To Contribute?</h2>
<p>ink is an open project, and if it turns out to be useful for your own writing or note-taking, I’d love for you to help make it better. Whether that means reporting a bug, suggesting a feature, improving the documentation, refining the design, or opening a pull request, every contribution is welcome. And if you simply want to support the project and encourage its continued development, that support means a great deal too — the best open-source tools grow because people find them valuable enough to use, share, and improve together.</p>


</section>

 ]]></description>
  <category>productivity</category>
  <category>tools</category>
  <category>markdown</category>
  <category>open-source</category>
  <guid>https://viscioletti.com/posts/introducing-ink-a-minimalist-markdown-writing-app-that-lives-in-your-browser/</guid>
  <pubDate>Sat, 21 Mar 2026 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/introducing-ink-a-minimalist-markdown-writing-app-that-lives-in-your-browser/images/ink-post-top-image.png" medium="image" type="image/png" height="80" width="144"/>
</item>
<item>
  <title>Loudenvielle: Dove la fatica incontra la bellezza</title>
  <link>https://viscioletti.com/posts/loudenvielle-pyrenees-family-adventure/</link>
  <description><![CDATA[ 





<style>
img.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
</style>
<p><img class="cover" src="https://viscioletti.com/posts/loudenvielle-pyrenees-family-adventure/images/pyrenees-cover.jpg" title="Loudenvielle, Cap des Hittes"></p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p><strong>Ricetta per il ricordo perfetto</strong></p>
<p><strong>Tempo di lettura:</strong> 2 minuti (se leggi senza interruzioni) <br> <strong>Tempo di preparazione:</strong> 8 giorni di viaggio intenso <br> <strong>Difficoltà:</strong> 🔴🔴🔴🔴⚪ <br></p>
<p>Basato sulla difficoltà del viaggio:</p>
<ul>
<li>🔴 Febbre notturna</li>
<li>🔴 Crisi di sonno per adulti</li>
<li>🔴 Esplosioni emotive dei bambini</li>
<li>🔴 Assenza totale di riposo</li>
<li>⚪ Ricompensa: paesaggi mozzafiato e momenti indimenticabili</li>
</ul>
</div>
</div>
<section id="le-difficoltà" class="level2">
<h2 class="anchored" data-anchor-id="le-difficoltà">Le difficoltà</h2>
<p>È stato forse il viaggio più duro da quando siamo diventati genitori in termini di riorse fisiche e mentali. Le notti si sono sbriciolate in risvegli continui e bisogni di coccole della più piccola. Le giornate scorrevano dentro una logistica senza tregua: addormentare, preparare, pulire, ricominciare. Più che una vacanza, a tratti è sembrata una prova di resistenza domestica trasportata in alta quota. Anche il più grande sta attraversando una fase in cui le emozioni lo travolgono facilmente, trasformandosi in scoppi di collera che si sciolgono solo con molta pazienza e con il conforto dell’immancabile yaya (al secolo il ciuccio).</p>
<p>Durante la vacanza, riuscire a ritagliarsi uno spazio da condividere da soli col proprio partner è stato quasi impossibile, entrambi continuamente assorbiti dalle necessità dei bambini e dalla logistica delle giornate. Tutto assolutamente nella norma della vita con babmini piccoli, ma quando sei nell’occhio del ciclone non riesci a guardare dall’esterno.</p>
</section>
<section id="la-bellezza" class="level2">
<h2 class="anchored" data-anchor-id="la-bellezza">La bellezza</h2>
<p>Eppure, anche dentro quella stanchezza, ci sono stati momenti di bellezza smisurata. Dal Cap des Hittes, a 2400 metri, i Pirenei si aprivano come una corona di pietra e luce, immobili e solenni, appena prima della discesa tra neve fresca, dossi improvvisi e rocce da schivare con attenzione. Sciare mi ha sempre dato una sensazione rara di benessere e libertà: la velocità, il bianco intorno, il corpo che finalmente segue un ritmo diverso da quello della vita quotidiana.</p>
<p>Oppure il rientro lungo il lac di Génos: l’acqua azzurra, quasi cristallina, le case riflesse sulla superficie ferma, il profilo delle montagne sullo sfondo. In quei momenti tutto sembrava ricomporsi, come se la fatica trovasse finalmente una forma, e quindi anche un senso.</p>
</section>
<section id="ciò-che-rimane" class="level2">
<h2 class="anchored" data-anchor-id="ciò-che-rimane">Ciò che rimane</h2>
<p>Alla fine, di Loudenvielle non mi resterà il ricordo di una vacanza riposante, ma quello di giorni pieni, faticosi e bellissimi a modo loro. Giorni che mi hanno ricordato che, anche quando la vita sembra tutta assorbita dalla stanchezza e dalla cura, la bellezza continua a farsi trovare: in una passeggiata, nella neve, in uno scorcio che apre spazio e da respiro nel disordine dei giorni.</p>


</section>

 ]]></description>
  <category>travel</category>
  <category>family</category>
  <category>pyrenees</category>
  <category>france</category>
  <guid>https://viscioletti.com/posts/loudenvielle-pyrenees-family-adventure/</guid>
  <pubDate>Tue, 24 Feb 2026 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/loudenvielle-pyrenees-family-adventure/images/pyrenees-cover.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Prompt Stash: Your Vault For Great Prompts</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/</link>
  <description><![CDATA[ 





<p>In this post I would to introduce you to a new one-page web app I built: <strong><a href="https://viscioletti.com/prompt-stash/">Prompt Stash</a></strong>.</p>
<p>If you work in Data Science, Software Engineering or a related field, or even if you are just passionate about AI, chances are that you are working with multiple LLMs. Each one serves its purpose, but juggling them means your prompts are scattered everywhere, lost across countless tabs and infinite chat threads.</p>
<p><strong>Prompt Stash</strong> is my attempt to fix that.</p>
<section id="the-problem" class="level2">
<h2 class="anchored" data-anchor-id="the-problem">The Problem</h2>
<p>Between work and personal projects, I found myself constantly switching between AI tools. And every time, I’d end up rewriting the same prompts from scratch, trying to remember what had worked before. It felt inefficient—especially when I knew some of these prompts were worth reusing, if only I had saved them somewhere.</p>
<p>I needed a place to save my prompts, organise them, and revisit them later. Something fast and simple to use.</p>
</section>
<section id="the-solution" class="level2">
<h2 class="anchored" data-anchor-id="the-solution">The Solution</h2>
<p>I’m a big fan of <strong>single-purpose, one-page apps</strong> — tiny tools that solve a single problem well (if you are curious I made another one called <a href="https://viscioletti.com/jupyterview-love-a-fast-and-free-jupyter-notebook-viewer/" title="JupyterView">JupyterView</a>). Prompt Stash follows that philosophy: it’s a fully self-contained HTML page built with <strong>HTML5, CSS3, and vanilla JavaScript</strong>. No frameworks, no backend, no nonsense.</p>
<p>It loads instantly, works offline, and is easy to extend and quick to debug.</p>
<p>Without further ado, let me show you around.</p>
<section id="prompt-stash-ui" class="level3">
<h3 class="anchored" data-anchor-id="prompt-stash-ui">Prompt Stash UI</h3>
<p>A clean interface with fields to enter a title, write your prompt, assign tags, and group them into projects.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-11.24.38.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-11.24.38-1024x573.png" class="img-fluid figure-img"></a></p>
<figcaption>Screenshot of the Prompt Stash web application interface, displaying options to add a new prompt with fields for title, prompt content, tags, and project assignment.</figcaption>
</figure>
</div>
<figcaption>
<p>The Prompt Stash UI</p>
</figcaption>
</figure>
</section>
</section>
<section id="current-features" class="level2">
<h2 class="anchored" data-anchor-id="current-features">Current Features</h2>
<p>This is still a work-in-progress, but I want that to be out in the world to gather some feedback and be inspired regarding future useful features.</p>
<p>Here’s what Prompt Stash can already do:</p>
<section id="projects" class="level3">
<h3 class="anchored" data-anchor-id="projects">📁 Projects</h3>
<p>Group your prompts into <strong>Projects</strong> — great if you’re using multiple LLMs on the same task. For example, keep all prompts related to a specific codebase in one project, so they’re always easy to find.</p>
<p>You can create new projects from the sidebar and assign prompts to them as you go, as shown in the two screenshots below.</p>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-14.36.19.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-14.36.19.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>create a new project using the sidebar</p>
</figcaption>
</figure>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-14.38.06.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-14.38.06.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>You can then assign a project when saving a prompt</p>
</figcaption>
</figure>
</section>
<section id="tags" class="level3">
<h3 class="anchored" data-anchor-id="tags">🏷️ Tags</h3>
<p>Add as many comma-separated <strong>tags</strong> as you like to any prompt. Tags help you track recurring themes across projects and make searching easier.</p>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-16.57.54.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-16.57.54.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>You can add comma-separated tags to your prompts</p>
</figcaption>
</figure>
</section>
<section id="markdown-support" class="level3">
<h3 class="anchored" data-anchor-id="markdown-support">📝 Markdown Support</h3>
<p>Prompt Stash supports basic Markdown! You can toggle between the raw Markdown view and a rendered preview. It’s a small touch, but it helps when formatting longer prompts.</p>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-14.44.26.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-14.44.26.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>A prompt written in markdown in its raw format</p>
</figcaption>
</figure>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/07/Screenshot-2025-07-29-at-14.45.04.png"><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/Screenshot-2025-07-29-at-14.45.04.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>The same prompt with its markdown rendered</p>
</figcaption>
</figure>
</section>
<section id="local-storage-only" class="level3">
<h3 class="anchored" data-anchor-id="local-storage-only">🔒 Local Storage Only</h3>
<p><strong>Your data is yours</strong>. Prompt Stash <strong>doesn’t upload anything</strong> — it uses your browser’s local storage only. That means no account required, no server involved… but also: <strong>don’t clear your cookies unless you’ve backed things up</strong>.</p>
<p>I know that’s a limitation, and I’m already planning improvements (see the roadmap below).</p>
</section>
</section>
<section id="a-perpetual-beta" class="level2">
<h2 class="anchored" data-anchor-id="a-perpetual-beta">A perpetual beta</h2>
<p>Prompt Stash proudly carries that <a href="https://en.wikipedia.org/wiki/Perpetual_beta">Web 2.0 “<strong>Beta</strong>” spirit</a>. It works, but it’s growing. I want to evolve it with feedback and turn it into a genuinely helpful tool for anyone crafting prompts regularly.</p>
</section>
<section id="its-open-source" class="level2">
<h2 class="anchored" data-anchor-id="its-open-source">It’s Open Source</h2>
<p>Prompt Stash is part of my <strong>one-page web apps</strong> collection. You can find the source code here:</p>
<p>👉 <a href="https://github.com/feddernico/onepage-webapps">GitHub – feddernico/onepage-webapps</a></p>
<p><img src="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/onepage-webapps.png" class="img-fluid"></p>
<section id="github---feddernicoonepage-webapps-one-page-webapps-created-using-only-html5-css-and-javascript" class="level3">
<h3 class="anchored" data-anchor-id="github---feddernicoonepage-webapps-one-page-webapps-created-using-only-html5-css-and-javascript">GitHub - feddernico/onepage-webapps: One page webapps created using only HTML5, CSS and Javascript</h3>
<p>One page webapps created using only HTML5, CSS and Javascript - feddernico/onepage-webapps</p>
<p>If you’ve got ideas, spot bugs, or want to contribute, please open an issue on GitHub. I’d love to hear from you.</p>
</section>
</section>
<section id="roadmap" class="level2">
<h2 class="anchored" data-anchor-id="roadmap">Roadmap</h2>
<p>A few key features I’m working on:</p>
<ul>
<li><p><strong>Export &amp; Import:</strong> Save all your prompts as a file, and re-import them later to avoid data loss.</p></li>
<li><p><strong>Google Sync:</strong> Login with your Google account to sync prompts to a Google Sheet for easy backup and cross-device access.</p></li>
</ul>
</section>
<section id="let-me-know-what-you-think" class="level2">
<h2 class="anchored" data-anchor-id="let-me-know-what-you-think">Let Me Know What You Think</h2>
<p>Prompt Stash is still in its early days, but I hope it’s already useful. If you try it out, I’d love your feedback—features you’d want, use cases you’ve discovered, or pain points you’ve hit.</p>
<p>Drop me a message, open an issue, or just fork the repo and build your own version.</p>
<p>Happy prompting!</p>


</section>

 ]]></description>
  <category>web-development</category>
  <guid>https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/</guid>
  <pubDate>Wed, 30 Jul 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/prompt-stash-your-vault-for-great-prompts/images/image_2025-07-30_144105698.png" medium="image" type="image/png" height="144" width="144"/>
</item>
<item>
  <title>Lo Stregatto E SearchGPT: A Match Made In Wonderland</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/</link>
  <description><![CDATA[ 





<p>Con questo post inauguro la rubrica di YouTube digest, in cui prendo le live più interessanti che ho visto nelle scorse settimane e cerco di sintetizzare i concetti più importanti espressi nella live stessa. In questo episodio diamo uno sguardo alla live del canale di Piero Savastano dal titolo “Rifacciamo SearchGPT da zero con lo Stregatto”, in cui viene trattata la funzionalità SearchGPT, una funzionalità già implementata da ChatGPT e Perplexity.<br>
Questa tecnica permette di cercare online contenuti inerenti il prompt utente e usarlo per arricchire la base dati dal quale il modello attinge per fornire una risposta.</p>
<section id="introduzione" class="level2">
<h2 class="anchored" data-anchor-id="introduzione">Introduzione</h2>
<p>Lo Stregatto è un progetto open source ideato da Piero Savastano. La sua intuizione è quella di voler costruire per il mondo della generative AI quello che Wordpress rappresenta per il mondo degli sviluppatori web: una piattaforma che aiuti ad astrarre dal livello sottostante (librerie come LangChain) col quale costruire plugin ed applicazioni web LLM based.</p>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/01/image.png"><img src="https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/images/image.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>L’interfaccia dello Stregatto</p>
</figcaption>
</figure>
<p>La live è nasce dall’annuncio di OpenAI dell’introduzione di SearchGPT, la funzionalità che permette a chatGPT di fare ricerche sul web e utilizzare i risultati di tali ricerche all’interno del language model.</p>
<p>La lunga live (oltre 5 ore) è l’occasione di presentare lo Stregatto e dimostrare che con le funzionalità messe a disposizione della piattaforma è possibile ricreare le stesse funzionalità ed avere a disposizione un SearchGPT open source.</p>
</section>
<section id="cronologia-degli-eventi-principali" class="level2">
<h2 class="anchored" data-anchor-id="cronologia-degli-eventi-principali">Cronologia degli Eventi Principali</h2>
<section id="introduzione-e-avvio-della-discussione" class="level3">
<h3 class="anchored" data-anchor-id="introduzione-e-avvio-della-discussione">Introduzione e Avvio della Discussione</h3>
<ul>
<li><p><strong>Inizio della Discussione&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=11640s">Vai al punto sul video</a>:</strong>&nbsp;Si avvia una<br>
conversazione informale tra Piero e Luca. Piero esprime<br>
l’intenzione di rompere gli schemi e mostrare le capacità di<br>
sviluppo di un sistema come ChatGPT Search, menzionando anche<br>
Perplexity come player nel settore. Si introduce l’idea di una<br>
collaborazione e di dimostrare competenze nel campo.</p></li>
<li><p><strong>Differenza tra Language Model e World Model&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=15720s">Vai al punto sul video</a>:</strong>&nbsp;Piero spiega la differenza tra un language model,<br>
addestrato su grandi quantità di testo, e un world model,<br>
sottolineando che il primo non ha una conoscenza del mondo reale in<br>
tempo reale.</p></li>
<li><p><strong>Ringraziamento alla Community del “Gatto”&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=29340s">Vai al punto sul video</a>:</strong>&nbsp;Piero ringrazia la community del “Gatto” per la<br>
disponibilità dell’hardware e riconosce la competenza e<br>
l’importanza della partecipazione di tutti. Critica<br>
l’atteggiamento arrendevole nei confronti delle nuove tecnologie,<br>
specialmente nell’ambito dell’IA.</p></li>
</ul>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/01/image-2.png"><img src="https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/images/image-2-1024x964.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>Le varie componenti dello Stregatto</p>
</figcaption>
</figure>
</section>
<section id="tecniche-e-concetti-chiave-sui-modelli-di-ia" class="level3">
<h3 class="anchored" data-anchor-id="tecniche-e-concetti-chiave-sui-modelli-di-ia">Tecniche e Concetti Chiave sui Modelli di IA</h3>
<ul>
<li><p><strong>Spiegazione del Language Model “Stregatto”&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=66540s">Vai al punto sul video</a>:</strong>&nbsp;Viene spiegato il funzionamento dello Stregatto come un<br>
language model che opera su token in un ciclo continuo per<br>
completare il testo.</p></li>
<li><p><strong>Introduzione del concetto di RAG (Retrieval Augmented<br>
Generation)&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=73440s">Vai al punto sul video</a>:</strong>&nbsp;Si introduce la tecnica RAG come<br>
metodo per migliorare le risposte dei language model, prendendo<br>
spunto dall’esperienza di uno studente che cerca informazioni nelle<br>
proprie conoscenze per rispondere a una domanda.</p></li>
<li><p><strong>Discussione sull’Intelligenza dei Language Model&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=86100s">Vai al punto sul video</a>:</strong>&nbsp;Viene aperto un dibattito sull’intelligenza dei language<br>
model e sulla loro relazione con creatività, ragionamento e verità.<br>
Si parla dell’hype attorno al settore dell’IA e degli investimenti<br>
finanziari.</p></li>
<li><p><strong>Addestramento degli LLM e il Ruolo delle GPU&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=94020s">Vai al punto sul video</a>:</strong>&nbsp;Antonio spiega come vengono addestrati gli LLM con forza<br>
bruta e con l’uso di GPU, sottolineando l’inefficienza<br>
dell’utilizzo di queste ultime per tale scopo. Si ipotizza<br>
l’avvento di hardware dedicato per l’addestramento (esic) come già<br>
successo nel mondo del bitcoin mining.</p></li>
<li><p><strong>Fine Tuning e Inferenza&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=106800s">Vai al punto sul video</a>:</strong>&nbsp;Si spiega la<br>
differenza tra il training di un modello che avviene raramente e il<br>
fine tuning, più frequente e il processo di inferenza ovvero l’uso<br>
dei LLM. Si sottolinea l’inefficienza delle GPU anche per<br>
l’inferenza.</p></li>
</ul>
</section>
<section id="hardware-e-ottimizzazione" class="level3">
<h3 class="anchored" data-anchor-id="hardware-e-ottimizzazione">Hardware e Ottimizzazione</h3>
<ul>
<li><p><strong>NPU (Neural Processing Unit) e Consumo Energetico&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=110040s">Vai al punto sul video</a>:</strong>&nbsp;Si parla delle NPU come alternative più efficienti delle<br>
GPU per l’inferenza, con un significativo risparmio<br>
energetico.</p></li>
<li><p><strong>Modelli a 1 Bit e a Virgola Mobile&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=114540s">Vai al punto sul video</a>:</strong><br>
Viene introdotto il concetto di modelli a 1 bit come alternativa ai<br>
modelli a virgola mobile, con l’obiettivo di ottimizzare<br>
l’efficienza.</p></li>
<li><p><strong>Spiegazione del Cambiamento di Fase delle Reti Neurali<br>
<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=126780s">Vai al punto sul video</a>:</strong>&nbsp;Si discute come la scalabilità delle reti neurali<br>
abbia portato a un cambiamento di fase nel loro comportamento.</p></li>
</ul>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/01/image-4.png"><img src="https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/images/image-4.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>Pannello di Admin delle memorie (RAG)</p>
</figcaption>
</figure>
</section>
<section id="costruzione-di-un-sistema-basato-su-language-model" class="level3">
<h3 class="anchored" data-anchor-id="costruzione-di-un-sistema-basato-su-language-model">Costruzione di un Sistema Basato su Language Model</h3>
<ul>
<li><p><strong>Componenti per Costruire un Sistema simile&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=134940s">Vai al punto sul video</a>:</strong>&nbsp;Luca descrive le principali componenti necessarie per<br>
costruire un sistema basato su language model: speech-to-text,<br>
database (tradizionale o vettoriale), e il modello<br>
linguistico.</p></li>
<li><p><strong>Spiegazione del Database Vettoriale&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=151680s">Vai al punto sul video</a>:</strong><br>
Nicola spiega il concetto di database vettoriale, evidenziando come<br>
memorizza e indicizza il testo attraverso embedding. Vengono<br>
menzionate diverse tipologie di DB vettoriali tra cui<br>
quadrant.</p></li>
<li><p><strong>Confronto tra DB Vettoriali e DB a Grafi&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=161040s">Vai al punto sul video</a>:</strong>&nbsp;Si confrontano le caratteristiche e le problematiche dei<br>
DB vettoriali e dei DB a grafo, sottolineando che l’uno non è<br>
necessariamente meglio dell’altro in tutti i casi.</p></li>
</ul>
</section>
<section id="coinvolgimento-della-community-e-opportunità" class="level3">
<h3 class="anchored" data-anchor-id="coinvolgimento-della-community-e-opportunità">Coinvolgimento della Community e Opportunità</h3>
<ul>
<li><p><strong>Invito a Partecipare e Costruire in Prima Persona&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=172260s">Vai al punto sul video</a>:</strong>&nbsp;Viene ribadita l’importanza di non farsi “prendere in<br>
giro” dalle grandi aziende e di costruire questi sistemi in prima<br>
persona, come un gioco di costruzioni (tipo LEGO), sottolineando il<br>
potenziale di protagonismo anche nel contesto italiano.</p></li>
<li><p><strong>Introduzione della Scuola “Profession AI”&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=181020s">Vai al punto sul video</a>:</strong>&nbsp;Viene menzionata la scuola “Profession AI” come esempio<br>
di realtà che promuove il talento italiano nel settore dell’IA, con<br>
la partecipazione di Giuseppe e lo sviluppo di progetti basati sullo<br>
Stregatto.</p></li>
<li><p><strong>Citazione sul Caso d’Uso dello Stregatto in Ambito<br>
Formativo&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=192420s">Vai al punto sul video</a>:</strong>&nbsp;Giuseppe, proprietario di una scuola<br>
online, descrive come ha utilizzato l’intelligenza artificiale e lo<br>
Stregatto per migliorare l’esperienza formativa degli studenti,<br>
evidenziando la sperimentazione di diversi approcci.</p></li>
</ul>
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2025/01/image-3.png"><img src="https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/images/image-3.png" class="img-fluid figure-img"></a></p>
<figcaption>
<p>I plugin disponibili nello Stregatto</p>
</figcaption>
</figure>
</section>
<section id="coding-live-e-sviluppo-di-plugin-searchgpt" class="level3">
<h3 class="anchored" data-anchor-id="coding-live-e-sviluppo-di-plugin-searchgpt">Coding Live e Sviluppo di Plugin (SearchGPT)</h3>
<ul>
<li><p><strong>Inizio del Coding Live&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=212760s">Vai al punto sul video</a>:</strong>&nbsp;Piero annuncia<br>
l’inizio della sessione di coding live, con l’obiettivo di creare<br>
un setup minimale del gatto con un plugin personalizzato, con la<br>
creazione di un docker.</p></li>
<li><p><strong>Spiegazione e installazione dello Stregatto&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=3982s">Vai al punto sul video</a>:</strong>&nbsp;Piero introduce e installa lo Stregatto, evidenziando la<br>
sua natura di web server e spiegando i suoi endpoint.</p></li>
<li><p><strong>Introduzione ai Plugin dello Stregatto&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=5598s">Vai al punto sul video</a>:</strong>&nbsp;Viene spiegata la struttura dei plugin e il loro<br>
utilizzo come framework per costruire con il linguaggio<br>
naturale.</p></li>
<li><p><strong>Modifica del Plugin per l’Output di Risposta&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=6549s">Vai al punto sul video</a>:</strong>&nbsp;Il plugin viene modificato per sovrascrivere<br>
completamente la risposta del gatto, dimostrando la possibilità di<br>
personalizzare il comportamento del sistema.</p></li>
<li><p><strong>Accesso alla Memoria e al Language Model&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=6663s">Vai al punto sul video</a>:</strong>&nbsp;Vengono spiegate le modalità di accesso alla memoria e<br>
al language model tramite il plugin.</p></li>
<li><p><strong>Test del Plugin Modificato&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=7078s">Vai al punto sul video</a>:</strong>&nbsp;Il<br>
plugin modificato viene testato, dimostrando la sua capacità di<br>
aggiungere una risposta personalizzata a quella originale del<br>
language model.</p></li>
</ul>
</section>
<section id="nuovi-ospiti-e-integrazioni" class="level3">
<h3 class="anchored" data-anchor-id="nuovi-ospiti-e-integrazioni">Nuovi Ospiti e Integrazioni</h3>
<ul>
<li><p><strong>Arrivo di Nuovi Ospiti: Andrea e Silvio&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=10919s">Vai al punto sul video</a>:</strong>&nbsp;Luca e Piero introducono Andrea, autore del primo plugin<br>
ufficiale per lo Stregatto, e Silvio, un personaggio molto noto<br>
nella community italiana.</p></li>
<li><p><strong>Integrazione dell’API di ricerca Google&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=11598s">Vai al punto sul video</a>:</strong>&nbsp;Piero inizia a integrare l’API di ricerca Google<br>
all’interno del plugin.</p></li>
<li><p><strong>Discussione su Come Migliorare il Sistema&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=12086s">Vai al punto sul video</a>:</strong>&nbsp;I partecipanti, Luca, Andrea, Massimo, Marco, Emanuele<br>
discutono come migliorare il sistema, introducendo il tema della<br>
citazione delle fonti e della gestione del contesto.</p></li>
</ul>
</section>
<section id="opportunità-di-business-nellia" class="level3">
<h3 class="anchored" data-anchor-id="opportunità-di-business-nellia">Opportunità di Business nell’IA</h3>
<ul>
<li><p><strong>Intervento di Emiliano sull’Impresa nel Mondo dell’IA<br>
<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=12791s">Vai al punto sul video</a>:</strong>&nbsp;Emiliano discute sulle opportunità di<br>
business nel mondo dell’IA, sottolineando l’importanza della<br>
verticalizzazione e dell’innovazione per non essere sopraffatti dai<br>
grandi player.</p></li>
<li><p><strong>Verticalizzazione dei Tool di IA e Economia dei Dati<br>
<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=13303s">Vai al punto sul video</a>:</strong>&nbsp;Massimo approfondisce la questione della<br>
verticalizzazione degli strumenti di IA e di dove i dati vengono<br>
reperiti, sottolineando l’importanza di un approccio critico e<br>
consapevole nell’utilizzo di dati spesso non pubblici.</p></li>
<li><p><strong>Microsoft Azure e il Vendor Lock-In&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=13808s">Vai al punto sul video</a>:</strong><br>
Si discute l’attrattiva di servizi come Microsoft Azure, ma si<br>
mette in guardia dal rischio di vendor lock-in.</p></li>
<li><p><strong>Strumenti Generalisti vs Soluzioni Verticali&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=13970s">Vai al punto sul video</a>:</strong>&nbsp;Viene evidenziata la differenza tra strumenti<br>
generalisti come ChatGPT e la necessità di soluzioni verticali per<br>
casi specifici.</p></li>
</ul>
</section>
<section id="sviluppo-e-test-del-nuovo-plugin-searchgpt" class="level3">
<h3 class="anchored" data-anchor-id="sviluppo-e-test-del-nuovo-plugin-searchgpt">Sviluppo e Test del Nuovo Plugin SearchGPT</h3>
<ul>
<li><p><strong>Importanza dell’Interfaccia Utente&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=14087s">Vai al punto sul video</a>:</strong><br>
Si sottolinea che l’interfaccia utente è fondamentale per<br>
l’utilizzo degli strumenti di intelligenza artificiale.</p></li>
<li><p><strong>Spiegazione del codice e recupero dei risultati della<br>
query&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=14107s">Vai al punto sul video</a>:</strong>&nbsp;Piero spiega nel dettaglio il codice<br>
che consente di effettuare una query al motore di ricerca e<br>
recuperare i risultati e il testo da essi ricavato.</p></li>
<li><p><strong>Integrazione delle Fonti Nel Prompt&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=14684s">Vai al punto sul video</a>:</strong><br>
Piero integra le fonti ricavate dal motore di ricerca nel prompt del<br>
language model.</p></li>
<li><p><strong>Discussione sulla Qualità della Risposta&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=15514s">Vai al punto sul video</a>:</strong>&nbsp;I partecipanti discutono dei problemi di risposta del<br>
language model.</p></li>
<li><p><strong>Correzione e Test del Nuovo Plugin&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=15802s">Vai al punto sul video</a>:</strong><br>
Piero corregge i problemi nel codice e testa il plugin con il nuovo<br>
prompt, con la partecipazione di Carina.</p></li>
</ul>
</section>
<section id="discussioni-finali-e-conclusioni" class="level3">
<h3 class="anchored" data-anchor-id="discussioni-finali-e-conclusioni">Discussioni Finali e Conclusioni</h3>
<ul>
<li><p><strong>Discussione su un Uso Ansiogeno del Sistema&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=16371s">Vai al punto sul video</a>:</strong>&nbsp;Viene introdotta l’idea di un utilizzo “ansiogeno”<br>
del sistema, in cui la risposta del sistema viene fornita con un<br>
tono un po’ preoccupante e ansioso.</p></li>
<li><p><strong>Dibattito sulla Apertura di un’Agenzia di IA&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=17312s">Vai al punto sul video</a>:</strong>&nbsp;Si discute sulla fattibilità e sulla sostenibilità<br>
economica dell’apertura di una agenzia di IA.</p></li>
<li><p><strong>Analisi dell’Utilizzo della IA in Contesti Specifici<br>
<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=18850s">Vai al punto sul video</a>:</strong>&nbsp;Si discutono vari casi d’uso concreti per<br>
questi sistemi, tra cui il customer support e l’integrazione di<br>
knowledge base specifiche.</p></li>
<li><p><strong>Verticalizzazione, il futuro&nbsp;<a href="https://www.youtube.com/watch?v=WmZAs3NTNz0&amp;t=19268s">Vai al punto sul video</a>:</strong>&nbsp;Viene<br>
sottolineata l’importanza della verticalizzazione e della<br>
customizzazione come strada per non essere spazzati via dai grandi<br>
player e raggiungere contesti specifici.</p></li>
</ul>
</section>
</section>
<section id="chi-è-intervenuto-nella-live" class="level2">
<h2 class="anchored" data-anchor-id="chi-è-intervenuto-nella-live">Chi è intervenuto nella live</h2>
<ul>
<li><p><strong>Piero Savastano:</strong>&nbsp;È l’organizzatore e principale relatore. Guida<br>
la discussione, spiega i concetti tecnici e programma il plugin in<br>
diretta. Appassionato di tecnologia, con un approccio pratico e<br>
orientato all’azione, promuove la costruzione di soluzioni IA<br>
“fatte in casa” e l’importanza della community.</p></li>
<li><p><strong>Luca:</strong>&nbsp;Collaboratore di Piero, contribuisce alla<br>
discussione con punti di vista tecnici e funzionali, ponendo domande<br>
pertinenti e fornendo supporto pratico.</p></li>
<li><p><strong>Nicola:</strong>&nbsp;Esperto di database vettoriali e di tecniche<br>
RAG. Apporta una conoscenza approfondita su questi temi, spiegando i<br>
concetti chiave e le implicazioni pratiche.</p></li>
<li><p><strong>Antonio:</strong>&nbsp;Esperto di elettronica ed hardware, fornisce<br>
una prospettiva sul funzionamento delle reti neurali,<br>
sull’efficienza delle GPU e sulle possibili evoluzioni nel campo<br>
dell’hardware dedicato.</p></li>
<li><p><strong>Giuseppe:</strong>&nbsp;Esperto di programmazione web e educazione<br>
online, descrive come utilizza l’IA e lo Stregatto nei suoi corsi,<br>
fornendo un esempio concreto di applicazione pratica.</p></li>
<li><p><strong>Emiliano:</strong>&nbsp;Imprenditore e divulgatore, condivide una<br>
visione orientata al business e alle opportunità di mercato nel<br>
settore dell’IA, sottolineando l’importanza della<br>
verticalizzazione.</p></li>
<li><p><strong>Massimo:</strong>&nbsp;Appassionato di intelligenza artificiale e<br>
divulgatore, fornisce spunti di riflessione sulle implicazioni<br>
economiche e sulla gestione dei dati nel settore.</p></li>
<li><p><strong>Marco:</strong>&nbsp;Partecipante attivo alla discussione, apporta<br>
punti di vista tecnici e funzionali, offrendo idee per migliorare il<br>
sistema e sottolineando il ruolo della community.</p></li>
<li><p><strong>Andrea:</strong>&nbsp;Autore del primo plugin ufficiale per lo<br>
Stregatto, apporta un contributo tecnico e pratico<br>
all’iniziativa.</p></li>
<li><p><strong>Silvio:</strong>&nbsp;Personaggio noto nella community, si unisce alla<br>
sessione fornendo un contributo dinamico e leggero.</p></li>
<li><p><strong>Carina:</strong>&nbsp;Partecipante che segue la discussione con<br>
entusiasmo, anche se non direttamente coinvolta nello sviluppo,<br>
apporta una prospettiva diversa e stimolante.</p></li>
<li><p><strong>Elvis:</strong>&nbsp;Utente che partecipa alla discussione, portando<br>
una prospettiva più pratica e meno tecnica focalizzata sugli use<br>
case.</p></li>
<li><p><strong>Filippo:</strong>&nbsp;Utente che pone una domanda a Piero e<br>
contribuisce alla discussione.</p></li>
<li><p><strong>Samuele:</strong>&nbsp;Utente che partecipa alla discussione con<br>
spunti e suggerimenti tecnici, evidenziando la sua conoscenza del<br>
progetto.</p></li>
</ul>


</section>

 ]]></description>
  <guid>https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/</guid>
  <pubDate>Thu, 16 Jan 2025 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/lo-stregatto-e-searchgpt-a-match-made-in-wonderland/images/maxresdefault.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>IBM Q2 2024 Earnings Call Summary</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/</link>
  <description><![CDATA[ 





<p>The IBM Q2 2024 earnings call reported strong financial results, demonstrating solid revenue growth, increased profitability, and significant cash-flow generation. Below are the key highlights from the earnings call:</p>
<section id="financial-highlights" class="level3">
<h3 class="anchored" data-anchor-id="financial-highlights">Financial Highlights:</h3>
<ul>
<li><p><strong>Revenue</strong>: $15.8 billion, a 4% increase at constant currency.</p></li>
<li><p><strong>Operating Pre-tax Income</strong>: $2.8 billion, a 17% increase year-over-year.</p></li>
<li><p><strong>Operating Diluted EPS</strong>: $2.43, an 11% increase year-over-year.</p></li>
<li><p><strong>Free Cash Flow</strong>: $4.5 billion in the first half of 2024, the strongest in many years.</p></li>
<li><p><strong>Cash Position</strong>: $16 billion, up $2.5 billion since year-end 2023.</p></li>
</ul>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/07/image-3.png"><img src="https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/images/image-3.png" class="img-fluid figure-img"></a></p>
<figcaption>IBM Q2 2024 Key Financial Metrics Chart</figcaption>
</figure>
</div>
<figcaption>
<p>IBM Q2 2024 Key Financial Metrics Chart</p>
</figcaption>
</figure>
</section>
<section id="ibm-q2-2024-key-financial-metrics" class="level3">
<h3 class="anchored" data-anchor-id="ibm-q2-2024-key-financial-metrics">IBM Q2 2024 Key Financial Metrics</h3>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>Metric</th>
<th>Q2 2024</th>
<th>Year-over-Year Growth</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Revenue</td>
<td>$15.8 billion</td>
<td>+4%</td>
</tr>
<tr class="even">
<td>Operating Pre-tax Income</td>
<td>$2.8 billion</td>
<td>+17%</td>
</tr>
<tr class="odd">
<td>Operating Diluted EPS</td>
<td>$2.43</td>
<td>+11%</td>
</tr>
<tr class="even">
<td>Free Cash Flow (First Half)</td>
<td>$4.5 billion</td>
<td>+$1.1 billion</td>
</tr>
<tr class="odd">
<td>Cash Position</td>
<td>$16 billion</td>
<td>+$2.5 billion</td>
</tr>
</tbody>
</table>
<figcaption>
<p>IBM Q2 2024 Key Financial Metrics Table</p>
</figcaption>
</figure>
</section>
<section id="business-segment-performance" class="level3">
<h3 class="anchored" data-anchor-id="business-segment-performance">Business Segment Performance</h3>
<ul>
<li><p><strong>Software</strong>: 8% revenue growth, driven by strong performance in hybrid platforms and solutions, and transaction processing.</p></li>
<li><p><strong>Infrastructure</strong>: 3% revenue growth, with IBM Z revenue up 8% and strong performance in distributed infrastructure.</p></li>
<li><p><strong>Consulting</strong>: 2% revenue growth, impacted by discretionary spending constraints but offset by strong demand for large engagements in AI and analytics.</p></li>
</ul>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/07/image-4.png"><img src="https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/images/image-4.png" class="img-fluid figure-img"></a></p>
<figcaption>IBM Q2 2024 Key Financial Metrics Chart</figcaption>
</figure>
</div>
<figcaption>
<p>IBM Q2 2024 Segment Performance</p>
</figcaption>
</figure>
</section>
<section id="ibm-q2-2024-segment-performance" class="level3">
<h3 class="anchored" data-anchor-id="ibm-q2-2024-segment-performance">IBM Q2 2024: Segment Performance</h3>
<figure class="figure">
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th>Segment</th>
<th>Revenue Growth</th>
<th>Notable Highlights</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Software</td>
<td>+8%</td>
<td>Driven by hybrid platforms and solutions</td>
</tr>
<tr class="even">
<td>Infrastructure</td>
<td>+3%</td>
<td>Strong performance in IBM Z and distributed systems</td>
</tr>
<tr class="odd">
<td>Consulting</td>
<td>+2%</td>
<td>Impacted by discretionary spending constraints</td>
</tr>
</tbody>
</table>
<figcaption>
<p>IBM Q2 2024 Business Segment Performance Table</p>
</figcaption>
</figure>
</section>
<section id="strategic-initiatives-and-innovations" class="level3">
<h3 class="anchored" data-anchor-id="strategic-initiatives-and-innovations">Strategic Initiatives and Innovations:</h3>
<ul>
<li><p><strong>AI and Hybrid Cloud</strong>: IBM’s AI strategy, including the introduction of watsonx and the generative AI platform, continues to show strong momentum. The AI book of business exceeds $2 billion, with a significant portion in consulting signings.</p></li>
<li><p><strong>Open Source AI Models</strong>: IBM open-sourced its Granite AI models under the Apache 2.0 license, fostering innovation and developer engagement. These models offer significant cost savings and customization potential compared to larger models.</p></li>
<li><p><strong>Partnerships</strong>: New AI partnerships with industry leaders like Adobe, AWS, Microsoft, and others were announced, enhancing IBM’s ecosystem and market reach.</p></li>
</ul>
</section>
<section id="key-takeaways-from-the-qa-session" class="level3">
<h3 class="anchored" data-anchor-id="key-takeaways-from-the-qa-session">Key Takeaways from the Q&amp;A Session:</h3>
<ul>
<li><p><strong>Transaction Processing</strong>: IBM’s transaction processing performance was notably strong, with 13% growth attributed to solid client renewals and large deal performance.</p></li>
<li><p><strong>Consulting Dynamics</strong>: The consulting segment is experiencing a shift in client spending towards AI-related projects, reflecting broader market trends and the early stages of AI adoption.</p></li>
<li><p><strong>M&amp;A Strategy</strong>: IBM remains focused on strategic acquisitions in hybrid cloud and AI, maintaining discipline in valuation and synergy realization. The pending HashiCorp acquisition is expected to enhance IBM’s hybrid cloud capabilities.</p></li>
</ul>
</section>
<section id="future-outlook" class="level3">
<h3 class="anchored" data-anchor-id="future-outlook">Future Outlook:</h3>
<ul>
<li><p><strong>Revenue Growth</strong>: IBM expects full-year constant-currency revenue growth in the mid-single-digit range.</p></li>
<li><p><strong>Free Cash Flow</strong>: Revised upward to greater than $12 billion for the year.</p></li>
<li><p><strong>Segment Growth</strong>:</p></li>
<li><p>Software: High single-digit growth expected.</p></li>
<li><p>Consulting: Low single-digit growth anticipated, with improvements in profit margins.</p></li>
<li><p>Infrastructure: Expected to remain neutral for the year.</p></li>
</ul>
</section>
<section id="ibm-q2-2024-in-pills" class="level3">
<h3 class="anchored" data-anchor-id="ibm-q2-2024-in-pills">IBM Q2 2024 In Pills:</h3>
<p>IBM’s strong performance in Q2 2024 reflects the company’s successful execution of its AI and hybrid cloud strategy. The continued investment in innovation, strategic acquisitions, and robust financial management position IBM well for sustained growth and leadership in the technology sector.</p>
<p>Main</p>
<p><img src="https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/images/featured-transcript-logo-template-2023-01-12.jpg" class="img-fluid"></p>
</section>
<section id="international-business-machines-ibm-q2-2024-earnings-call-transcript-the-motley-fool" class="level3">
<h3 class="anchored" data-anchor-id="international-business-machines-ibm-q2-2024-earnings-call-transcript-the-motley-fool">International Business Machines (IBM) Q2 2024 Earnings Call Transcript | The Motley Fool</h3>
<p>IBM earnings call for the period ending June 30, 2024.</p>


</section>

 ]]></description>
  <category>stocks</category>
  <guid>https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/</guid>
  <pubDate>Thu, 25 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/ibm-q2-2024-earnings-call-summary/images/ibm_q2_2024_earnings_call.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>I am loving Gradio, discover it with me</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/i-am-loving-gradio-discover-it-with-me/</link>
  <description><![CDATA[ 





<ul>
<li>Introduction to Gradio Lite and Its Applications</li>
<li>The Idea</li>
<li>The Webapp</li>
</ul>
<section id="introduction-to-gradio-lite-and-its-applications" class="level2">
<h2 class="anchored" data-anchor-id="introduction-to-gradio-lite-and-its-applications">Introduction to Gradio Lite and Its Applications</h2>
<p>I discovered Gradio by reading a book regarding Kaggle competition, that by the way I totally recommend for whoever wants to improve their skills as a data scientist.</p>
<p><img src="https://viscioletti.com/posts/i-am-loving-gradio-discover-it-with-me/images/81Ef9EiykdL._SL1500_.jpg" class="img-fluid"></p>
<section id="the-kaggle-book-data-analysis-and-machine-learning-for-competitive-data-science" class="level3">
<h3 class="anchored" data-anchor-id="the-kaggle-book-data-analysis-and-machine-learning-for-competitive-data-science">The Kaggle Book: Data Analysis and Machine Learning for Competitive Data Science</h3>
<p>The Kaggle Book: Data Analysis and Machine Learning for Competitive Data Science (Audio Download): Konrad Banachewicz, Luca Massaron, Alex Freeman, Packt Publishing: Amazon.co.uk: Books</p>
<p>I played a bit with it at the beginning, but then I couldn’t find a way I just discovered that you can build web apps in a plain HTML page and integrating python code inside of that. I just thought it was a brilliant idea and I started experimenting with it. This is my first proof of concept.</p>
<p>The idea is to load the heart_disease famous dataset. split the data into train and test set and train a logistic regression model to predict</p>
</section>
</section>
<section id="the-idea" class="level2">
<h2 class="anchored" data-anchor-id="the-idea">The Idea</h2>
</section>
<section id="the-webapp" class="level2">
<h2 class="anchored" data-anchor-id="the-webapp">The Webapp</h2>
<script type="module" crossorigin="" src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"></script>
<p>lightgbm plotly scikit-learn</p>
<p># CSV data as a string csv_data = “““Age,Gender,Cholesterol,Blood Pressure,Heart Rate,Smoking,Alcohol Intake,Exercise Hours,Family History,Diabetes,Obesity,Stress Level,Blood Sugar,Exercise Induced Angina,Chest Pain Type,Heart Disease 75,Female,228,119,66,Current,Heavy,1,No,No,Yes,8,119,Yes,Atypical Angina,1 48,Male,204,165,62,Current,None,5,No,No,No,9,70,Yes,Typical Angina,0 53,Male,234,91,67,Never,Heavy,3,Yes,No,Yes,5,196,Yes,Atypical Angina,1 69,Female,192,90,72,Current,None,4,No,Yes,No,7,107,Yes,Non-anginal Pain,0 62,Female,172,163,93,Never,None,6,No,Yes,No,2,183,Yes,Asymptomatic,0 77,Male,309,110,73,Never,None,0,No,Yes,Yes,4,122,Yes,Asymptomatic,1 64,Female,211,105,86,Former,Heavy,8,Yes,Yes,Yes,2,120,No,Typical Angina,1 60,Female,208,148,83,Never,Moderate,4,No,Yes,Yes,2,113,Yes,Asymptomatic,1 37,Female,317,137,66,Current,Heavy,3,No,Yes,Yes,5,114,No,Non-anginal Pain,0 63,Male,204,141,68,Former,Heavy,8,No,Yes,No,3,107,No,Asymptomatic,1 67,Female,282,108,87,Never,Heavy,3,Yes,No,Yes,9,85,Yes,Typical Angina,1 37,Male,293,148,98,Current,Moderate,6,Yes,No,Yes,10,129,No,Typical Angina,0 67,Male,325,177,81,Never,Moderate,8,Yes,No,Yes,10,192,No,Non-anginal Pain,1 43,Male,155,169,82,Current,Heavy,8,Yes,Yes,No,2,163,No,Typical Angina,0 60,Male,226,168,99,Never,Moderate,8,Yes,Yes,No,10,97,No,Non-anginal Pain,1 44,Female,250,111,66,Former,None,6,Yes,No,Yes,3,121,Yes,Non-anginal Pain,0 43,Female,279,173,81,Current,Moderate,9,Yes,No,No,7,150,No,Asymptomatic,0 46,Female,259,118,76,Never,Heavy,4,No,Yes,Yes,8,76,No,Non-anginal Pain,0 45,Female,246,169,98,Never,Moderate,5,Yes,No,Yes,9,97,No,Typical Angina,0 74,Female,298,148,70,Former,Heavy,9,Yes,Yes,Yes,8,157,Yes,Non-anginal Pain,1 76,Female,226,97,62,Former,None,5,Yes,Yes,No,4,85,No,Non-anginal Pain,1 44,Female,309,95,83,Former,None,4,No,Yes,No,4,139,No,Non-anginal Pain,0 58,Male,297,90,72,Current,None,6,Yes,No,No,10,104,Yes,Atypical Angina,1 67,Male,287,117,64,Current,Moderate,0,Yes,Yes,Yes,1,112,Yes,Atypical Angina,1 67,Female,177,171,87,Never,None,1,No,No,No,5,170,Yes,Typical Angina,0 31,Male,276,110,61,Never,Heavy,8,Yes,Yes,No,7,187,Yes,Non-anginal Pain,0 66,Female,265,159,99,Never,Heavy,4,Yes,Yes,No,7,151,No,Non-anginal Pain,1 63,Male,273,103,64,Never,None,6,Yes,Yes,Yes,9,104,No,Typical Angina,1 77,Female,197,170,61,Current,Moderate,8,No,No,Yes,9,92,No,Non-anginal Pain,0 79,Male,319,115,63,Never,Moderate,0,Yes,No,Yes,9,95,No,Typical Angina,1 32,Female,313,154,70,Former,Moderate,5,No,Yes,Yes,6,176,Yes,Asymptomatic,0 48,Male,179,117,61,Never,None,7,No,No,No,1,166,Yes,Asymptomatic,0 41,Male,234,98,71,Never,Moderate,6,No,No,No,6,73,Yes,Atypical Angina,0 53,Female,228,142,99,Former,Heavy,1,Yes,Yes,Yes,9,75,Yes,Atypical Angina,1 36,Male,227,158,78,Former,Heavy,8,Yes,No,Yes,6,120,No,Asymptomatic,0 57,Male,262,166,73,Never,Moderate,1,No,No,Yes,8,97,Yes,Atypical Angina,1 60,Female,311,159,60,Former,Heavy,4,Yes,Yes,Yes,10,99,No,Non-anginal Pain,1 66,Female,230,150,92,Current,None,2,No,Yes,No,8,111,No,Atypical Angina,1 46,Male,192,139,61,Former,None,0,Yes,No,Yes,2,174,Yes,Asymptomatic,0 72,Female,306,137,72,Current,Moderate,0,Yes,Yes,No,2,122,No,Asymptomatic,1 67,Female,216,137,80,Former,Heavy,0,Yes,No,Yes,8,135,No,Asymptomatic,1 65,Male,189,143,70,Current,None,2,Yes,No,No,5,150,Yes,Non-anginal Pain,0 37,Female,162,126,79,Current,Moderate,1,Yes,Yes,Yes,8,93,No,Non-anginal Pain,0 28,Female,207,162,63,Former,Moderate,4,Yes,No,Yes,3,109,Yes,Non-anginal Pain,0 70,Female,271,159,82,Former,Moderate,8,Yes,No,No,7,87,Yes,Typical Angina,1 36,Female,209,106,84,Former,Heavy,0,No,Yes,Yes,3,137,Yes,Typical Angina,0 51,Male,251,170,71,Current,Heavy,3,No,Yes,No,4,111,No,Non-anginal Pain,1 74,Male,325,95,87,Never,None,3,Yes,No,Yes,10,162,No,Atypical Angina,1 41,Male,268,95,70,Current,Heavy,9,No,No,No,4,176,No,Non-anginal Pain,0 41,Male,286,128,97,Never,None,6,Yes,Yes,No,9,78,No,Non-anginal Pain,0 69,Female,167,157,83,Former,Moderate,4,Yes,Yes,No,2,160,No,Asymptomatic,0 54,Female,348,129,97,Current,Heavy,4,Yes,No,No,9,187,Yes,Atypical Angina,1 52,Female,330,125,68,Current,Moderate,4,No,No,Yes,4,154,No,Non-anginal Pain,1 38,Male,264,120,89,Former,Heavy,5,Yes,No,No,10,172,No,Atypical Angina,0 25,Female,287,148,82,Former,None,8,No,No,No,1,96,Yes,Non-anginal Pain,0 52,Male,207,95,84,Current,Moderate,2,No,No,No,8,180,Yes,Asymptomatic,1 53,Male,252,107,91,Former,Moderate,8,No,No,No,1,124,Yes,Atypical Angina,1 55,Female,232,91,93,Never,None,6,No,No,Yes,10,152,No,Typical Angina,1 61,Male,261,156,97,Former,Heavy,2,Yes,Yes,Yes,7,154,Yes,Atypical Angina,1 30,Male,264,135,99,Former,None,7,Yes,Yes,Yes,9,99,Yes,Typical Angina,0 48,Female,257,171,89,Never,Heavy,2,No,Yes,Yes,3,141,No,Asymptomatic,0 35,Female,339,165,68,Never,None,9,No,No,Yes,5,99,Yes,Asymptomatic,0 42,Male,166,119,97,Never,Moderate,0,No,No,No,10,109,No,Typical Angina,0 56,Female,339,148,60,Never,None,8,Yes,Yes,Yes,3,88,Yes,Asymptomatic,1 47,Male,310,97,72,Current,Heavy,7,No,Yes,Yes,6,96,Yes,Asymptomatic,0 71,Male,192,148,90,Current,None,1,Yes,Yes,No,1,156,No,Asymptomatic,0 68,Female,282,125,92,Current,Heavy,5,No,No,Yes,3,172,No,Typical Angina,1 59,Female,180,127,70,Never,Moderate,4,Yes,Yes,No,2,122,No,Non-anginal Pain,0 25,Female,162,122,77,Current,Heavy,0,No,No,No,1,137,Yes,Non-anginal Pain,0 44,Male,331,169,94,Current,Heavy,3,No,No,No,8,177,No,Asymptomatic,0 64,Male,348,174,64,Current,Moderate,6,Yes,No,Yes,6,170,No,Non-anginal Pain,1 45,Male,307,161,90,Former,Moderate,7,No,No,Yes,3,134,No,Asymptomatic,0 33,Female,271,159,62,Former,None,1,Yes,No,Yes,2,176,Yes,Atypical Angina,0 65,Male,247,140,89,Never,Moderate,8,Yes,Yes,No,8,183,Yes,Typical Angina,1 79,Male,243,121,80,Never,Heavy,1,Yes,Yes,No,3,158,No,Atypical Angina,1 52,Female,290,114,63,Current,None,5,Yes,Yes,No,1,151,No,Typical Angina,1 61,Male,209,144,70,Current,Heavy,5,Yes,Yes,No,8,86,No,Typical Angina,1 78,Male,223,132,68,Current,Heavy,7,Yes,Yes,No,1,82,Yes,Non-anginal Pain,1 69,Female,166,157,92,Former,None,3,No,No,No,2,170,Yes,Atypical Angina,0 28,Female,155,95,67,Former,None,6,No,No,No,2,105,Yes,Asymptomatic,0 77,Female,161,136,83,Current,None,2,No,No,No,5,155,Yes,Non-anginal Pain,0 76,Male,241,101,67,Former,None,4,No,No,Yes,10,74,Yes,Typical Angina,1 30,Female,154,175,87,Former,Heavy,7,Yes,No,No,7,97,No,Typical Angina,0 57,Female,203,156,98,Never,Moderate,7,No,No,No,6,143,Yes,Atypical Angina,1 62,Female,205,127,78,Never,Heavy,3,Yes,Yes,Yes,4,127,No,Typical Angina,1 53,Male,179,162,76,Never,Moderate,1,No,No,No,9,163,Yes,Typical Angina,0 26,Male,264,122,62,Former,Moderate,5,Yes,No,Yes,10,176,No,Non-anginal Pain,0 46,Female,180,109,76,Never,Heavy,6,No,Yes,No,2,176,No,Non-anginal Pain,0 61,Female,184,119,77,Never,None,8,No,Yes,Yes,10,92,Yes,Atypical Angina,0 50,Male,291,172,94,Current,None,5,No,Yes,Yes,6,176,No,Non-anginal Pain,0 51,Female,210,139,81,Current,None,0,Yes,Yes,No,8,145,No,Typical Angina,1 38,Male,215,138,61,Former,Heavy,1,No,Yes,Yes,10,198,Yes,Atypical Angina,0 38,Female,336,97,71,Current,None,8,No,Yes,Yes,10,163,No,Asymptomatic,0 54,Female,242,145,75,Current,None,3,Yes,No,No,8,159,No,Asymptomatic,1 32,Female,320,150,93,Never,Moderate,5,No,Yes,No,10,148,No,Non-anginal Pain,0 46,Male,290,149,77,Never,Moderate,6,Yes,Yes,No,10,157,No,Non-anginal Pain,0 63,Female,262,117,99,Current,Heavy,9,Yes,No,No,2,92,No,Asymptomatic,1 61,Female,284,163,95,Former,Heavy,1,Yes,No,No,10,171,Yes,Typical Angina,1 43,Male,249,117,87,Former,Heavy,7,Yes,No,Yes,1,73,Yes,Non-anginal Pain,0 61,Female,248,100,91,Former,Moderate,3,Yes,Yes,No,3,110,No,Atypical Angina,1 35,Male,331,103,82,Former,Heavy,1,Yes,No,No,2,103,No,Asymptomatic,0 56,Male,226,136,95,Never,None,3,Yes,Yes,No,5,115,No,Typical Angina,1 50,Male,232,158,87,Former,Heavy,0,Yes,Yes,No,4,110,No,Non-anginal Pain,0 51,Female,236,157,81,Current,None,9,Yes,No,No,7,183,No,Atypical Angina,1 64,Male,317,124,94,Former,Heavy,4,No,Yes,No,3,193,No,Atypical Angina,1 47,Female,230,135,97,Former,Heavy,0,No,Yes,Yes,7,99,Yes,Asymptomatic,0 61,Female,311,128,87,Former,None,7,No,No,Yes,1,74,Yes,Asymptomatic,1 68,Male,307,124,82,Current,Heavy,4,No,Yes,No,4,132,Yes,Atypical Angina,1 64,Female,174,115,98,Current,None,8,Yes,No,No,10,110,Yes,Atypical Angina,0 37,Female,226,173,86,Current,Moderate,7,No,Yes,No,2,139,No,Asymptomatic,0 72,Male,210,166,75,Current,Moderate,6,Yes,No,Yes,6,132,No,Asymptomatic,1 27,Male,164,114,98,Never,None,2,Yes,No,No,7,96,Yes,Typical Angina,0 79,Male,296,98,98,Current,Moderate,2,No,Yes,No,2,160,No,Atypical Angina,1 56,Female,278,96,69,Never,Heavy,9,No,Yes,Yes,9,143,No,Atypical Angina,1 54,Male,196,162,89,Never,None,9,Yes,No,No,10,93,Yes,Typical Angina,0 75,Male,298,179,64,Former,Heavy,4,Yes,Yes,No,10,105,Yes,Typical Angina,1 32,Male,272,126,82,Never,Heavy,1,No,Yes,No,9,140,Yes,Typical Angina,0 39,Female,328,173,75,Former,Moderate,0,No,No,Yes,5,72,Yes,Asymptomatic,0 62,Male,176,155,90,Never,None,3,No,Yes,No,3,147,No,Atypical Angina,0 40,Male,327,97,87,Never,Heavy,7,Yes,No,No,10,161,Yes,Atypical Angina,0 78,Female,217,178,98,Never,None,3,No,Yes,No,4,144,Yes,Asymptomatic,1 47,Male,222,128,83,Former,Heavy,0,Yes,Yes,Yes,1,103,Yes,Typical Angina,0 67,Male,328,132,89,Former,Heavy,6,No,Yes,No,5,116,Yes,Asymptomatic,1 68,Female,185,158,78,Never,Moderate,0,No,No,Yes,9,90,Yes,Non-anginal Pain,0 42,Male,201,158,61,Current,None,6,Yes,Yes,No,3,91,Yes,Atypical Angina,0 29,Male,237,110,64,Former,None,7,Yes,No,Yes,5,183,Yes,Typical Angina,0 59,Male,175,152,76,Current,Heavy,9,Yes,Yes,No,8,104,No,Non-anginal Pain,0 51,Female,272,144,86,Current,Moderate,8,Yes,Yes,Yes,3,79,Yes,Non-anginal Pain,1 27,Male,319,146,63,Former,Heavy,6,Yes,No,Yes,8,85,Yes,Typical Angina,0 41,Female,251,106,70,Former,None,2,Yes,No,No,8,150,No,Asymptomatic,0 25,Male,224,119,79,Never,Heavy,3,Yes,Yes,Yes,9,173,Yes,Atypical Angina,0 48,Male,164,100,81,Never,Heavy,8,Yes,Yes,No,10,93,Yes,Asymptomatic,0 30,Male,294,128,76,Former,Heavy,0,No,No,Yes,4,135,Yes,Typical Angina,0 36,Female,238,91,61,Never,None,0,No,Yes,No,3,174,No,Atypical Angina,0 72,Male,348,110,69,Never,None,7,No,No,No,3,77,Yes,Asymptomatic,1 53,Male,270,135,70,Former,Heavy,0,Yes,No,No,3,144,Yes,Typical Angina,1 64,Male,195,105,76,Current,None,7,Yes,Yes,Yes,5,142,Yes,Typical Angina,0 54,Female,184,138,66,Never,Moderate,9,Yes,No,Yes,1,89,Yes,Typical Angina,0 30,Female,281,95,80,Former,None,7,Yes,No,No,1,178,Yes,Atypical Angina,0 76,Male,199,139,75,Former,None,4,Yes,No,No,6,175,Yes,Atypical Angina,0 45,Female,345,174,74,Current,None,7,Yes,No,No,10,154,No,Atypical Angina,0 42,Male,234,155,72,Former,Moderate,8,No,No,Yes,4,105,No,Typical Angina,0 26,Male,241,142,77,Never,Moderate,5,No,Yes,No,2,118,No,Atypical Angina,0 48,Female,208,178,75,Former,Heavy,9,No,No,No,10,140,Yes,Typical Angina,0 51,Female,196,164,87,Never,Moderate,2,No,Yes,Yes,3,158,No,Asymptomatic,0 74,Female,170,126,99,Former,Heavy,7,No,No,No,10,105,Yes,Atypical Angina,0 57,Female,248,112,90,Never,Moderate,1,No,Yes,No,2,90,No,Atypical Angina,1 74,Female,208,117,62,Former,None,5,Yes,No,Yes,3,151,Yes,Typical Angina,1 56,Male,287,177,63,Former,Moderate,9,No,No,No,10,103,No,Atypical Angina,1 65,Female,256,171,67,Never,Moderate,8,No,No,No,6,85,Yes,Non-anginal Pain,1 76,Male,153,145,77,Never,Heavy,0,Yes,No,No,6,172,No,Asymptomatic,0 61,Male,183,167,78,Former,Heavy,9,Yes,Yes,No,2,108,No,Typical Angina,0 76,Female,347,116,69,Current,Heavy,5,Yes,Yes,No,6,149,Yes,Asymptomatic,1 67,Male,221,115,69,Former,Moderate,6,No,Yes,Yes,2,126,No,Non-anginal Pain,1 39,Female,200,98,77,Former,Moderate,0,Yes,Yes,Yes,6,101,No,Non-anginal Pain,0 51,Male,277,153,99,Current,None,0,Yes,No,No,8,163,Yes,Atypical Angina,1 64,Male,250,98,79,Former,None,0,Yes,No,No,4,105,Yes,Typical Angina,1 33,Female,302,121,69,Former,Moderate,1,No,Yes,Yes,4,128,No,Atypical Angina,0 40,Female,169,96,68,Current,Heavy,8,Yes,No,Yes,4,111,No,Asymptomatic,0 75,Female,307,108,65,Never,Heavy,7,No,No,Yes,7,167,No,Asymptomatic,1 27,Female,248,170,60,Current,Moderate,0,No,Yes,No,3,184,No,Asymptomatic,0 77,Female,329,156,65,Former,Heavy,8,No,No,No,5,170,Yes,Non-anginal Pain,1 27,Female,266,171,96,Never,None,2,Yes,No,No,9,179,No,Non-anginal Pain,0 68,Male,198,110,86,Former,Moderate,6,Yes,Yes,No,9,158,No,Asymptomatic,0 52,Male,339,169,88,Never,None,8,Yes,No,No,3,157,No,Atypical Angina,1 73,Male,286,138,66,Current,Heavy,4,Yes,No,Yes,3,103,No,Atypical Angina,1 49,Male,330,158,67,Former,Moderate,9,No,Yes,Yes,2,144,No,Atypical Angina,0 56,Male,261,153,78,Never,None,6,No,No,No,8,197,No,Typical Angina,1 31,Female,309,119,83,Never,None,4,No,Yes,No,8,109,Yes,Non-anginal Pain,0 53,Male,308,178,80,Never,Moderate,5,Yes,Yes,No,9,186,No,Atypical Angina,1 55,Male,174,105,76,Current,Heavy,1,Yes,No,Yes,4,70,No,Atypical Angina,0 42,Male,283,106,99,Current,Heavy,3,Yes,No,Yes,3,192,No,Non-anginal Pain,0 38,Male,254,95,60,Former,Heavy,7,Yes,Yes,No,9,171,No,Non-anginal Pain,0 58,Male,277,153,91,Never,Heavy,0,Yes,Yes,No,4,154,Yes,Non-anginal Pain,1 75,Male,306,114,99,Current,Heavy,1,No,Yes,Yes,5,186,No,Non-anginal Pain,1 68,Female,249,98,92,Former,None,0,No,Yes,No,8,108,Yes,Non-anginal Pain,1 66,Female,343,147,94,Current,Heavy,5,Yes,Yes,Yes,4,103,No,Atypical Angina,1 68,Female,292,167,79,Current,None,1,Yes,No,No,2,134,Yes,Non-anginal Pain,1 32,Male,181,130,72,Former,Moderate,8,Yes,No,No,10,143,No,Atypical Angina,0 35,Female,325,96,70,Current,Heavy,9,No,No,No,9,91,Yes,Asymptomatic,0 41,Male,231,103,63,Former,None,8,No,No,No,9,180,Yes,Typical Angina,0 36,Male,275,168,92,Never,None,5,Yes,Yes,Yes,6,149,No,Asymptomatic,0 48,Male,329,162,70,Current,Heavy,5,No,No,No,2,179,Yes,Asymptomatic,0 28,Male,277,174,71,Former,Heavy,3,Yes,No,Yes,9,146,Yes,Non-anginal Pain,0 26,Female,153,124,63,Never,Heavy,4,No,Yes,No,1,175,Yes,Non-anginal Pain,0 54,Female,238,102,63,Former,Moderate,9,Yes,Yes,No,1,85,No,Typical Angina,1 63,Male,328,119,83,Never,Moderate,5,Yes,No,Yes,1,167,No,Atypical Angina,1 46,Male,168,140,99,Former,Moderate,2,Yes,No,Yes,1,98,No,Asymptomatic,0 53,Male,265,93,82,Current,Heavy,2,No,No,No,7,113,Yes,Asymptomatic,1 49,Female,250,133,75,Current,None,5,Yes,No,Yes,1,104,Yes,Typical Angina,0 26,Female,187,179,97,Never,Moderate,5,No,Yes,Yes,3,84,Yes,Atypical Angina,0 68,Male,323,127,83,Never,Heavy,5,Yes,No,No,6,161,No,Asymptomatic,1 73,Female,184,104,60,Former,Moderate,1,Yes,No,Yes,7,196,No,Non-anginal Pain,0 78,Male,156,148,66,Current,None,9,Yes,Yes,No,6,123,No,Non-anginal Pain,0 73,Female,235,146,91,Never,Heavy,3,No,No,Yes,5,111,No,Asymptomatic,1 58,Female,328,148,97,Never,Moderate,3,No,Yes,No,9,144,No,Asymptomatic,1 66,Male,300,98,65,Never,Moderate,7,No,No,No,6,94,No,Non-anginal Pain,1 58,Male,344,163,92,Current,Heavy,0,Yes,No,No,5,99,Yes,Non-anginal Pain,1 40,Female,156,90,91,Never,None,9,Yes,No,No,4,71,Yes,Typical Angina,0 71,Male,177,147,79,Never,Moderate,6,Yes,No,Yes,8,73,No,Non-anginal Pain,0 57,Male,267,105,75,Current,None,6,No,No,No,3,197,No,Asymptomatic,1 46,Female,249,109,89,Former,None,6,Yes,No,No,8,146,Yes,Typical Angina,0 75,Male,178,125,71,Former,Moderate,3,No,No,Yes,9,149,Yes,Asymptomatic,0 68,Male,159,148,82,Never,Heavy,8,No,No,Yes,3,159,Yes,Non-anginal Pain,0 63,Female,300,166,78,Never,Moderate,3,Yes,No,Yes,9,142,No,Atypical Angina,1 39,Male,209,147,74,Never,None,4,Yes,No,No,5,193,Yes,Asymptomatic,0 26,Female,213,167,76,Current,None,1,Yes,Yes,Yes,5,127,No,Asymptomatic,0 42,Female,237,115,82,Never,Heavy,9,Yes,No,Yes,3,181,No,Asymptomatic,0 58,Male,317,174,65,Never,Heavy,8,No,No,No,6,173,Yes,Atypical Angina,1 32,Female,255,164,85,Former,Moderate,2,No,No,No,8,193,No,Typical Angina,0 61,Male,297,170,79,Current,Heavy,9,Yes,No,No,5,189,Yes,Non-anginal Pain,1 47,Male,285,91,70,Current,None,3,Yes,Yes,No,3,167,No,Non-anginal Pain,0 70,Male,167,125,63,Current,Heavy,7,No,No,No,9,145,No,Non-anginal Pain,0 79,Male,335,109,95,Current,Moderate,1,Yes,No,Yes,2,170,No,Asymptomatic,1 64,Male,200,97,91,Former,Heavy,0,No,No,Yes,4,189,No,Asymptomatic,0 40,Male,238,101,94,Never,None,7,Yes,No,No,1,195,Yes,Atypical Angina,0 48,Male,198,144,77,Never,None,9,Yes,Yes,No,7,184,Yes,Atypical Angina,0 26,Male,252,96,64,Current,Moderate,4,No,No,Yes,10,105,Yes,Typical Angina,0 70,Female,238,117,80,Current,None,9,Yes,Yes,No,7,161,Yes,Typical Angina,1 74,Female,295,151,62,Never,Heavy,8,Yes,No,No,2,170,Yes,Typical Angina,1 25,Male,241,132,92,Never,Heavy,1,No,Yes,Yes,6,79,Yes,Asymptomatic,0 36,Female,158,126,93,Current,Moderate,0,Yes,No,Yes,3,196,No,Asymptomatic,0 52,Male,229,139,63,Never,Heavy,2,Yes,No,Yes,4,90,No,Typical Angina,1 40,Female,176,131,89,Former,None,0,No,Yes,No,4,101,No,Asymptomatic,0 32,Female,349,148,65,Former,Moderate,3,Yes,Yes,Yes,9,88,Yes,Atypical Angina,0 33,Male,315,91,80,Current,None,5,No,Yes,No,2,138,No,Typical Angina,0 26,Male,326,91,69,Former,Moderate,4,No,No,Yes,6,158,Yes,Atypical Angina,0 76,Male,193,100,82,Former,Heavy,4,No,Yes,Yes,1,185,No,Atypical Angina,0 79,Female,242,176,72,Current,None,5,Yes,Yes,Yes,10,84,No,Non-anginal Pain,1 71,Female,175,143,75,Current,Moderate,1,Yes,Yes,No,9,115,Yes,Atypical Angina,0 36,Female,199,163,73,Former,Heavy,7,No,No,Yes,1,129,Yes,Non-anginal Pain,0 46,Male,262,90,69,Current,Heavy,9,No,Yes,Yes,3,167,Yes,Asymptomatic,0 42,Male,201,145,81,Current,Moderate,0,No,No,Yes,9,109,Yes,Typical Angina,0 27,Male,191,95,95,Never,None,5,Yes,Yes,No,7,187,Yes,Typical Angina,0 38,Male,296,97,80,Current,Heavy,1,No,Yes,Yes,5,197,Yes,Non-anginal Pain,0 62,Female,341,91,85,Never,Heavy,1,No,No,Yes,6,106,Yes,Asymptomatic,1 69,Female,228,157,77,Never,Moderate,2,Yes,Yes,No,3,86,No,Typical Angina,1 34,Female,320,140,97,Former,None,2,No,No,Yes,8,120,Yes,Atypical Angina,0 60,Male,281,133,83,Never,None,4,Yes,Yes,Yes,2,175,No,Typical Angina,1 34,Female,274,177,86,Former,None,9,Yes,Yes,Yes,2,95,No,Atypical Angina,0 69,Male,189,167,96,Current,Moderate,8,Yes,Yes,Yes,2,108,Yes,Non-anginal Pain,0 31,Female,267,157,75,Former,Heavy,9,Yes,Yes,No,3,74,Yes,Non-anginal Pain,0 44,Female,209,145,93,Never,None,9,No,No,No,3,195,No,Typical Angina,0 53,Male,295,110,89,Former,Heavy,1,Yes,No,Yes,10,71,No,Non-anginal Pain,1 63,Male,250,154,69,Never,None,3,Yes,No,No,7,170,Yes,Asymptomatic,1 50,Male,308,166,97,Current,None,7,No,No,No,2,116,Yes,Typical Angina,0 33,Female,231,117,70,Current,None,6,Yes,No,No,8,122,Yes,Atypical Angina,0 49,Female,210,99,79,Never,None,3,Yes,Yes,Yes,4,106,No,Typical Angina,0 29,Female,238,172,64,Current,Heavy,6,Yes,No,Yes,5,195,No,Typical Angina,0 49,Female,168,128,79,Never,Moderate,5,No,No,Yes,4,176,No,Non-anginal Pain,0 51,Female,266,102,86,Never,None,2,Yes,Yes,Yes,2,167,Yes,Atypical Angina,1 77,Male,214,100,96,Current,Heavy,8,No,No,No,5,186,No,Asymptomatic,1 60,Male,207,160,83,Current,None,4,No,Yes,No,4,106,No,Asymptomatic,1 71,Female,332,145,75,Current,Moderate,9,Yes,No,Yes,1,157,Yes,Non-anginal Pain,1 77,Male,212,161,98,Former,Moderate,7,Yes,No,Yes,1,128,Yes,Non-anginal Pain,1 54,Male,311,130,62,Current,None,5,Yes,No,No,9,104,No,Typical Angina,1 75,Female,318,179,87,Current,Heavy,2,Yes,No,Yes,7,104,Yes,Atypical Angina,1 26,Female,280,144,60,Never,Heavy,7,Yes,No,No,6,194,No,Atypical Angina,0 62,Male,171,139,72,Former,Heavy,4,Yes,No,No,6,79,No,Non-anginal Pain,0 25,Female,217,117,92,Current,None,0,Yes,Yes,No,4,148,Yes,Atypical Angina,0 65,Female,337,152,81,Former,None,8,No,Yes,No,7,110,No,Typical Angina,1 51,Female,273,163,94,Never,Heavy,9,Yes,No,Yes,9,158,No,Typical Angina,1 73,Female,347,134,97,Former,None,5,No,Yes,No,3,186,No,Asymptomatic,1 68,Female,306,179,77,Current,Heavy,4,No,No,Yes,7,184,Yes,Atypical Angina,1 42,Female,278,158,77,Never,Heavy,4,No,Yes,Yes,4,140,Yes,Typical Angina,0 31,Female,211,127,68,Former,Heavy,1,No,Yes,Yes,4,139,No,Asymptomatic,0 41,Male,219,136,75,Never,Heavy,1,Yes,Yes,Yes,5,198,Yes,Typical Angina,0 51,Female,223,111,64,Former,None,4,Yes,Yes,Yes,9,95,Yes,Asymptomatic,1 75,Female,216,123,79,Former,None,1,No,Yes,No,9,188,Yes,Atypical Angina,1 65,Female,197,167,87,Former,Moderate,8,No,Yes,Yes,1,70,No,Asymptomatic,0 44,Male,197,135,85,Former,Heavy,2,Yes,No,Yes,4,111,Yes,Asymptomatic,0 69,Female,330,110,70,Never,Moderate,1,Yes,No,No,4,178,No,Asymptomatic,1 32,Male,283,169,84,Never,Heavy,8,No,No,No,8,177,No,Atypical Angina,0 71,Female,162,102,89,Former,Moderate,1,Yes,Yes,Yes,3,162,Yes,Atypical Angina,0 48,Male,317,132,96,Never,Moderate,8,No,Yes,No,6,164,No,Asymptomatic,0 55,Male,291,158,87,Current,None,8,No,No,No,7,102,Yes,Typical Angina,1 49,Male,246,135,95,Never,Heavy,2,Yes,No,No,7,108,No,Asymptomatic,0 26,Male,261,176,83,Former,Heavy,3,No,No,No,5,139,No,Non-anginal Pain,0 54,Female,201,112,87,Never,None,7,Yes,Yes,No,5,109,Yes,Asymptomatic,1 34,Male,275,112,73,Never,None,5,No,No,Yes,3,168,Yes,Typical Angina,0 60,Male,297,144,84,Current,None,2,Yes,Yes,Yes,2,79,Yes,Non-anginal Pain,1 35,Male,171,172,70,Former,Heavy,7,Yes,Yes,No,2,107,Yes,Typical Angina,0 48,Male,242,135,86,Former,Moderate,7,Yes,Yes,No,7,129,Yes,Typical Angina,0 27,Male,322,122,77,Former,Heavy,8,Yes,Yes,Yes,6,74,No,Atypical Angina,0 35,Male,179,104,68,Former,Heavy,2,No,Yes,No,4,186,No,Non-anginal Pain,0 54,Female,297,169,88,Current,Heavy,1,No,No,No,5,148,No,Asymptomatic,1 74,Male,299,133,95,Former,None,3,Yes,Yes,No,9,110,No,Atypical Angina,1 65,Female,171,107,92,Former,Moderate,8,No,Yes,Yes,4,169,No,Atypical Angina,0 37,Female,296,175,85,Never,Moderate,9,No,Yes,No,10,72,Yes,Typical Angina,0 67,Female,244,124,60,Former,Moderate,3,No,Yes,Yes,3,166,No,Asymptomatic,1 66,Male,333,131,70,Never,Heavy,0,Yes,No,No,4,106,Yes,Asymptomatic,1 35,Male,336,125,81,Never,Moderate,0,No,No,No,4,149,Yes,Typical Angina,0 59,Female,161,113,85,Current,Heavy,5,Yes,Yes,No,5,78,Yes,Non-anginal Pain,0 37,Male,307,91,90,Never,Moderate,6,No,Yes,Yes,2,127,No,Asymptomatic,0 37,Male,337,134,83,Current,Heavy,8,Yes,No,Yes,3,152,No,Asymptomatic,0 43,Male,212,141,86,Never,Heavy,0,No,Yes,Yes,4,128,Yes,Asymptomatic,0 38,Female,198,161,94,Never,Heavy,8,No,Yes,No,3,167,No,Typical Angina,0 61,Male,186,176,99,Former,Heavy,4,Yes,No,No,9,118,No,Non-anginal Pain,0 25,Female,249,95,99,Former,None,3,No,No,No,2,93,No,Typical Angina,0 49,Female,342,154,92,Current,Moderate,4,Yes,Yes,No,7,151,No,Atypical Angina,0 52,Male,319,123,96,Never,Heavy,2,No,No,Yes,8,117,No,Non-anginal Pain,1 33,Female,175,97,73,Current,Heavy,5,No,No,Yes,1,114,No,Typical Angina,0 61,Female,223,177,74,Former,Heavy,1,Yes,Yes,Yes,7,198,Yes,Atypical Angina,1 75,Female,246,142,66,Never,Moderate,9,Yes,No,Yes,7,103,Yes,Non-anginal Pain,1 34,Male,260,134,71,Never,None,2,Yes,Yes,No,3,135,Yes,Typical Angina,0 76,Female,159,96,65,Never,Moderate,1,No,No,No,2,142,No,Non-anginal Pain,0 49,Male,166,168,68,Former,Heavy,0,Yes,Yes,Yes,2,118,No,Non-anginal Pain,0 41,Female,189,163,90,Former,None,8,Yes,Yes,Yes,6,116,No,Atypical Angina,0 37,Male,232,169,86,Current,Heavy,2,No,No,No,2,168,Yes,Non-anginal Pain,0 58,Male,162,106,74,Never,Moderate,6,No,Yes,No,7,194,Yes,Non-anginal Pain,0 41,Female,289,125,76,Current,Moderate,9,No,Yes,Yes,5,110,No,Non-anginal Pain,0 64,Female,285,169,76,Never,None,0,Yes,No,Yes,9,114,No,Typical Angina,1 70,Male,205,111,63,Current,None,6,No,Yes,Yes,1,135,Yes,Non-anginal Pain,1 32,Female,201,142,65,Never,None,2,No,No,Yes,9,72,Yes,Non-anginal Pain,0 36,Female,278,114,90,Current,Moderate,6,Yes,Yes,Yes,3,123,Yes,Non-anginal Pain,0 70,Male,173,93,81,Former,Moderate,5,Yes,Yes,Yes,10,147,No,Typical Angina,0 75,Female,249,177,97,Never,Moderate,4,Yes,Yes,No,4,160,No,Atypical Angina,1 76,Female,171,126,61,Former,None,2,No,No,Yes,6,165,Yes,Typical Angina,0 57,Male,317,169,76,Current,None,1,Yes,No,Yes,7,157,Yes,Non-anginal Pain,1 43,Male,231,107,94,Current,Heavy,5,Yes,Yes,No,10,120,Yes,Non-anginal Pain,0 37,Male,300,164,80,Former,Moderate,3,No,No,No,4,153,No,Atypical Angina,0 51,Male,324,163,98,Former,Heavy,4,Yes,Yes,Yes,6,116,No,Non-anginal Pain,1 34,Male,238,125,98,Former,Heavy,7,Yes,No,Yes,8,168,Yes,Atypical Angina,0 63,Male,210,136,86,Former,None,8,No,No,No,2,167,No,Non-anginal Pain,1 63,Female,167,133,94,Former,Moderate,9,No,Yes,No,2,87,Yes,Atypical Angina,0 27,Male,344,114,78,Former,Heavy,1,Yes,No,Yes,9,154,No,Atypical Angina,0 41,Male,340,117,72,Former,Moderate,9,Yes,No,Yes,10,191,No,Asymptomatic,0 72,Female,328,140,96,Current,None,0,Yes,Yes,Yes,6,98,No,Typical Angina,1 71,Male,151,171,69,Never,None,5,No,No,Yes,9,123,No,Typical Angina,0 65,Male,281,126,84,Never,Moderate,8,Yes,Yes,No,4,136,Yes,Non-anginal Pain,1 51,Male,290,97,89,Current,None,8,Yes,Yes,Yes,10,135,Yes,Non-anginal Pain,1 55,Male,166,113,84,Former,Heavy,4,Yes,Yes,No,3,169,No,Typical Angina,0 44,Female,320,99,82,Never,Heavy,5,No,No,No,8,101,No,Atypical Angina,0 39,Male,347,154,62,Current,Moderate,0,No,No,No,4,77,No,Asymptomatic,0 40,Female,309,166,72,Current,Moderate,6,Yes,No,Yes,6,165,No,Asymptomatic,0 70,Female,183,158,76,Never,Moderate,7,No,Yes,No,1,135,Yes,Asymptomatic,0 43,Male,168,157,76,Current,Heavy,7,Yes,Yes,No,9,116,Yes,Atypical Angina,0 27,Male,211,140,78,Former,Moderate,8,Yes,No,Yes,3,95,No,Typical Angina,0 43,Female,183,94,72,Current,None,5,Yes,Yes,Yes,9,80,Yes,Atypical Angina,0 35,Male,175,147,96,Former,None,9,Yes,No,Yes,8,169,Yes,Non-anginal Pain,0 42,Male,328,114,60,Former,Moderate,7,No,No,Yes,6,171,No,Non-anginal Pain,0 59,Female,240,171,62,Never,None,2,Yes,No,No,10,137,Yes,Typical Angina,1 55,Male,183,142,92,Former,None,3,Yes,Yes,No,10,133,No,Non-anginal Pain,0 41,Male,161,169,88,Former,Moderate,4,Yes,No,Yes,4,120,No,Atypical Angina,0 49,Male,326,157,63,Never,Heavy,3,Yes,Yes,Yes,10,77,No,Asymptomatic,0 39,Male,333,154,77,Former,Moderate,3,Yes,No,No,7,137,Yes,Asymptomatic,0 69,Male,278,172,96,Never,Heavy,0,Yes,No,Yes,2,104,Yes,Non-anginal Pain,1 59,Female,328,154,93,Current,Heavy,4,Yes,Yes,Yes,6,119,Yes,Typical Angina,1 76,Female,167,176,97,Never,Heavy,8,No,No,No,6,71,Yes,Typical Angina,0 63,Male,255,92,96,Current,Moderate,3,Yes,No,Yes,5,121,Yes,Asymptomatic,1 29,Female,348,159,65,Former,None,0,Yes,Yes,Yes,4,142,Yes,Asymptomatic,0 27,Male,224,135,77,Former,Heavy,5,No,Yes,Yes,7,135,No,Asymptomatic,0 69,Male,168,178,82,Current,Heavy,2,No,Yes,Yes,10,183,No,Asymptomatic,0 39,Male,262,109,95,Current,None,4,Yes,Yes,Yes,1,83,No,Non-anginal Pain,0 60,Female,163,131,67,Current,Heavy,5,Yes,No,Yes,3,168,Yes,Non-anginal Pain,0 76,Male,269,156,69,Never,None,9,Yes,Yes,No,2,189,No,Typical Angina,1 65,Female,220,131,62,Current,Heavy,4,No,Yes,Yes,2,179,No,Non-anginal Pain,1 55,Female,242,146,83,Former,Moderate,8,No,Yes,No,2,137,Yes,Asymptomatic,1 48,Female,188,151,85,Never,None,4,No,No,Yes,5,142,No,Asymptomatic,0 69,Female,188,179,97,Former,Moderate,3,Yes,No,Yes,1,169,Yes,Typical Angina,0 37,Female,200,154,74,Never,None,8,No,No,Yes,7,135,Yes,Asymptomatic,0 76,Male,227,104,68,Former,None,2,No,Yes,No,6,158,No,Asymptomatic,1 56,Female,314,155,65,Former,Heavy,6,No,No,Yes,10,86,Yes,Asymptomatic,1 76,Female,343,90,87,Current,Moderate,4,No,Yes,Yes,10,91,Yes,Atypical Angina,1 46,Male,215,138,63,Never,Heavy,0,No,Yes,No,6,79,No,Non-anginal Pain,0 40,Female,332,144,96,Never,None,1,No,Yes,No,2,99,No,Non-anginal Pain,0 44,Male,272,162,81,Former,Moderate,9,Yes,Yes,Yes,10,105,Yes,Atypical Angina,0 70,Female,197,136,82,Current,Heavy,8,No,Yes,Yes,7,140,Yes,Atypical Angina,0 77,Male,257,177,85,Never,Heavy,8,Yes,Yes,No,2,94,No,Atypical Angina,1 77,Female,306,151,95,Former,Heavy,7,No,Yes,Yes,9,192,No,Typical Angina,1 53,Male,191,150,73,Current,Heavy,7,Yes,No,Yes,6,113,No,Non-anginal Pain,0 44,Female,257,167,98,Current,Heavy,6,No,No,Yes,6,87,Yes,Non-anginal Pain,0 71,Female,338,154,76,Current,Moderate,4,No,No,No,6,123,No,Asymptomatic,1 49,Male,334,124,89,Former,Moderate,0,No,No,No,10,157,Yes,Typical Angina,0 72,Female,331,178,62,Never,None,9,No,Yes,Yes,2,135,Yes,Atypical Angina,1 37,Male,289,141,76,Never,None,7,No,No,No,10,83,No,Atypical Angina,0 79,Female,331,117,93,Never,Moderate,9,Yes,Yes,No,1,108,Yes,Atypical Angina,1 59,Male,339,172,98,Current,Moderate,1,No,Yes,Yes,3,126,No,Typical Angina,1 26,Female,320,109,82,Never,None,2,Yes,Yes,No,8,154,No,Non-anginal Pain,0 46,Male,328,99,85,Never,Moderate,7,No,No,Yes,7,115,Yes,Typical Angina,0 73,Female,342,108,89,Never,Moderate,4,Yes,Yes,Yes,5,144,Yes,Typical Angina,1 68,Male,286,137,63,Never,Heavy,0,Yes,Yes,No,3,143,No,Asymptomatic,1 78,Male,171,104,64,Never,Moderate,6,Yes,No,No,3,93,Yes,Asymptomatic,0 49,Male,177,118,60,Former,Moderate,3,Yes,No,Yes,6,94,Yes,Atypical Angina,0 55,Female,328,122,90,Former,None,4,No,No,Yes,9,86,No,Asymptomatic,1 34,Female,230,142,97,Never,Heavy,4,No,Yes,No,4,103,Yes,Atypical Angina,0 73,Male,257,125,81,Current,Heavy,6,Yes,No,No,4,187,No,Atypical Angina,1 36,Male,151,97,99,Current,Moderate,3,Yes,Yes,No,4,128,No,Non-anginal Pain,0 30,Female,283,141,75,Current,None,8,No,No,No,5,169,Yes,Non-anginal Pain,0 79,Female,324,102,94,Current,Moderate,4,Yes,No,Yes,6,141,Yes,Typical Angina,1 44,Female,211,144,93,Current,Heavy,1,No,Yes,Yes,4,83,Yes,Asymptomatic,0 48,Female,171,103,69,Never,None,4,No,No,Yes,8,72,Yes,Atypical Angina,0 78,Female,199,130,98,Never,None,8,No,Yes,No,3,166,No,Atypical Angina,0 71,Male,340,174,81,Former,Heavy,2,No,No,No,3,138,No,Asymptomatic,1 30,Female,248,90,91,Former,Moderate,6,No,No,Yes,1,115,No,Typical Angina,0 31,Male,177,145,65,Current,None,5,No,No,No,5,110,Yes,Non-anginal Pain,0 56,Male,168,126,94,Former,None,0,Yes,No,No,9,171,No,Atypical Angina,0 26,Female,168,128,85,Never,Heavy,8,Yes,Yes,Yes,3,191,No,Typical Angina,0 55,Male,241,159,67,Former,Heavy,6,No,No,Yes,2,149,No,Non-anginal Pain,1 37,Male,194,147,81,Never,None,0,No,No,Yes,8,173,No,Atypical Angina,0 28,Male,199,144,84,Never,Moderate,0,Yes,Yes,No,8,159,No,Atypical Angina,0 68,Female,336,160,77,Former,Heavy,7,No,No,Yes,10,137,No,Asymptomatic,1 72,Female,320,167,96,Never,Heavy,4,No,No,Yes,8,116,Yes,Typical Angina,1 50,Male,195,164,73,Current,Moderate,6,Yes,No,No,7,98,No,Non-anginal Pain,0 46,Male,298,138,62,Former,None,3,No,Yes,Yes,8,188,No,Non-anginal Pain,0 61,Female,166,171,91,Former,None,6,Yes,No,No,6,146,No,Non-anginal Pain,0 48,Female,349,161,78,Never,Moderate,5,No,No,No,5,154,Yes,Asymptomatic,0 41,Male,247,139,76,Current,None,3,No,Yes,No,6,148,Yes,Non-anginal Pain,0 48,Female,348,137,99,Former,None,1,Yes,Yes,No,7,169,Yes,Typical Angina,0 37,Female,267,117,85,Never,None,8,Yes,No,Yes,4,103,Yes,Typical Angina,0 58,Female,349,96,62,Former,Moderate,7,No,Yes,Yes,8,106,No,Asymptomatic,1 78,Female,213,119,99,Current,Heavy,2,No,No,Yes,3,177,No,Non-anginal Pain,1 58,Male,325,110,95,Never,Moderate,4,Yes,Yes,Yes,8,194,Yes,Atypical Angina,1 57,Female,229,179,63,Never,Heavy,2,No,Yes,No,7,144,No,Atypical Angina,1 26,Male,162,139,71,Former,None,7,Yes,Yes,No,6,113,No,Atypical Angina,0 69,Female,259,101,82,Current,Moderate,8,No,No,Yes,6,160,Yes,Non-anginal Pain,1 50,Female,260,176,82,Current,None,3,No,No,No,7,74,No,Typical Angina,0 53,Female,190,144,97,Current,None,5,No,No,Yes,2,120,No,Non-anginal Pain,0 76,Male,258,142,95,Former,Moderate,2,Yes,Yes,No,3,91,No,Atypical Angina,1 30,Male,318,168,91,Current,Heavy,0,Yes,No,No,2,126,No,Typical Angina,0 77,Female,206,129,74,Former,None,5,Yes,No,No,2,120,No,Atypical Angina,1 60,Male,174,156,66,Former,Heavy,2,No,No,Yes,3,148,Yes,Atypical Angina,0 59,Female,318,125,75,Never,None,1,Yes,No,No,7,136,No,Asymptomatic,1 43,Female,198,149,89,Former,None,9,No,No,Yes,2,199,Yes,Atypical Angina,0 60,Female,266,116,60,Never,None,9,Yes,No,No,4,163,Yes,Non-anginal Pain,1 79,Female,281,145,93,Former,Heavy,8,Yes,No,Yes,8,89,No,Typical Angina,1 79,Male,221,99,91,Current,Moderate,0,Yes,No,No,7,186,No,Typical Angina,1 77,Male,341,177,74,Current,None,8,Yes,No,No,9,135,No,Typical Angina,1 78,Female,318,133,73,Current,Moderate,1,Yes,Yes,No,2,168,No,Asymptomatic,1 32,Male,157,102,82,Former,Heavy,3,No,No,No,8,139,No,Asymptomatic,0 28,Male,168,113,94,Former,Heavy,6,No,Yes,No,9,177,No,Typical Angina,0 35,Male,267,175,60,Current,None,1,Yes,Yes,Yes,7,191,Yes,Typical Angina,0 79,Male,222,150,65,Current,Moderate,6,No,Yes,Yes,1,71,No,Asymptomatic,1 33,Female,231,119,97,Never,Heavy,9,Yes,Yes,Yes,10,175,Yes,Typical Angina,0 29,Male,239,139,89,Never,Moderate,2,Yes,No,No,6,159,No,Non-anginal Pain,0 58,Female,259,148,94,Current,Moderate,6,No,No,No,6,164,Yes,Non-anginal Pain,1 46,Male,161,140,85,Current,Moderate,4,Yes,No,No,8,136,No,Asymptomatic,0 74,Male,266,128,80,Never,None,5,No,Yes,No,5,108,No,Non-anginal Pain,1 69,Female,267,140,72,Current,Heavy,0,Yes,No,Yes,4,169,Yes,Atypical Angina,1 46,Female,281,152,94,Never,None,9,No,Yes,Yes,3,186,No,Typical Angina,0 25,Male,268,155,64,Current,None,9,No,Yes,Yes,6,89,Yes,Asymptomatic,0 69,Female,186,177,98,Former,Heavy,8,Yes,No,Yes,5,70,No,Typical Angina,0 26,Female,245,178,73,Former,Heavy,0,Yes,Yes,No,4,163,No,Asymptomatic,0 49,Male,208,106,98,Never,Moderate,4,Yes,Yes,Yes,9,198,No,Atypical Angina,0 69,Male,233,152,74,Current,None,2,Yes,No,No,9,96,No,Asymptomatic,1 26,Female,207,121,70,Never,Heavy,5,Yes,Yes,Yes,3,123,Yes,Non-anginal Pain,0 71,Female,304,140,81,Never,None,9,Yes,Yes,Yes,9,178,No,Typical Angina,1 66,Female,169,176,82,Never,None,2,No,No,Yes,7,143,No,Atypical Angina,0 51,Male,193,121,91,Never,Heavy,3,Yes,Yes,Yes,4,73,No,Atypical Angina,0 33,Female,243,148,69,Current,None,9,No,No,Yes,6,114,Yes,Asymptomatic,0 49,Male,167,159,76,Current,None,4,No,Yes,No,3,173,No,Non-anginal Pain,0 46,Female,290,131,68,Current,Heavy,1,Yes,No,No,3,121,No,Non-anginal Pain,0 41,Male,300,162,74,Current,None,9,No,Yes,No,6,136,Yes,Atypical Angina,0 71,Female,327,106,62,Current,Heavy,1,Yes,No,No,5,127,No,Atypical Angina,1 68,Male,321,104,71,Current,Moderate,6,Yes,Yes,No,9,161,No,Atypical Angina,1 72,Male,298,138,71,Never,Moderate,5,No,Yes,No,1,172,No,Typical Angina,1 70,Female,321,135,76,Never,None,9,No,Yes,No,5,199,Yes,Non-anginal Pain,1 55,Female,160,162,62,Former,Moderate,9,Yes,No,Yes,2,155,Yes,Asymptomatic,0 37,Female,301,100,93,Former,None,8,No,Yes,Yes,2,98,No,Asymptomatic,0 64,Female,244,129,92,Former,None,6,Yes,No,Yes,7,116,No,Atypical Angina,1 48,Female,279,164,74,Current,None,7,No,Yes,No,2,119,No,Atypical Angina,0 27,Male,262,141,61,Never,Moderate,5,No,Yes,Yes,3,90,Yes,Asymptomatic,0 38,Male,200,94,67,Current,Moderate,9,No,No,No,7,141,No,Asymptomatic,0 48,Male,154,160,84,Never,None,5,No,Yes,No,2,135,No,Non-anginal Pain,0 38,Female,270,162,92,Former,Heavy,5,Yes,No,No,3,199,No,Asymptomatic,0 39,Female,223,148,63,Never,Heavy,0,Yes,Yes,Yes,9,117,No,Asymptomatic,0 33,Male,322,173,73,Current,None,8,Yes,Yes,No,6,109,No,Atypical Angina,0 25,Female,165,127,69,Former,None,5,No,Yes,No,8,198,Yes,Asymptomatic,0 48,Male,310,162,84,Current,None,0,No,No,Yes,5,182,Yes,Asymptomatic,0 78,Male,259,96,99,Former,Heavy,1,No,No,No,6,165,No,Asymptomatic,1 58,Female,257,171,73,Never,Moderate,2,Yes,Yes,Yes,6,70,No,Atypical Angina,1 52,Female,196,113,60,Former,None,0,Yes,No,No,7,135,No,Atypical Angina,0 36,Female,288,164,67,Never,Moderate,1,No,No,No,7,70,No,Typical Angina,0 35,Male,204,97,95,Current,Heavy,4,Yes,Yes,Yes,5,117,Yes,Atypical Angina,0 64,Female,156,90,67,Never,Heavy,6,No,No,Yes,1,167,Yes,Non-anginal Pain,0 27,Female,323,145,63,Current,Heavy,0,Yes,No,Yes,7,127,Yes,Non-anginal Pain,0 46,Female,345,175,61,Former,Heavy,9,Yes,No,No,10,88,Yes,Non-anginal Pain,0 66,Male,152,175,95,Never,None,9,Yes,No,No,2,73,Yes,Non-anginal Pain,0 42,Male,318,118,87,Current,Moderate,2,Yes,No,Yes,8,121,Yes,Atypical Angina,0 47,Male,169,133,74,Former,Moderate,8,Yes,No,Yes,1,95,Yes,Typical Angina,0 47,Female,185,109,94,Current,None,1,No,No,No,6,122,No,Atypical Angina,0 59,Female,166,139,64,Former,Heavy,9,Yes,Yes,Yes,3,145,No,Atypical Angina,0 44,Female,296,99,63,Never,Heavy,6,Yes,Yes,No,7,185,Yes,Asymptomatic,0 72,Male,328,117,63,Never,None,4,Yes,No,No,9,138,No,Non-anginal Pain,1 51,Male,318,168,92,Former,Moderate,3,No,No,Yes,9,164,Yes,Asymptomatic,1 51,Female,303,97,76,Current,None,8,Yes,Yes,No,6,119,Yes,Non-anginal Pain,1 64,Female,168,135,73,Current,Moderate,0,No,Yes,No,9,88,No,Typical Angina,0 54,Female,188,163,80,Current,Moderate,7,Yes,Yes,No,3,106,No,Atypical Angina,0 64,Male,194,100,78,Current,Heavy,6,Yes,Yes,Yes,3,189,No,Non-anginal Pain,0 76,Male,179,94,85,Current,Heavy,8,Yes,No,No,4,179,Yes,Non-anginal Pain,0 32,Male,262,123,99,Never,Moderate,0,No,No,No,2,100,No,Asymptomatic,0 74,Female,185,129,86,Never,None,0,Yes,Yes,Yes,6,171,Yes,Non-anginal Pain,0 50,Female,328,158,71,Never,Heavy,8,Yes,No,Yes,10,82,No,Atypical Angina,0 34,Female,291,107,72,Never,Heavy,3,No,Yes,Yes,3,177,Yes,Asymptomatic,0 52,Female,184,122,84,Current,None,2,No,Yes,No,7,133,No,Typical Angina,0 42,Female,241,139,69,Former,None,4,No,Yes,Yes,1,116,No,Asymptomatic,0 44,Female,213,97,88,Never,Heavy,8,No,No,No,1,176,Yes,Non-anginal Pain,0 28,Male,226,167,60,Current,None,3,Yes,No,Yes,2,185,No,Atypical Angina,0 75,Male,254,111,95,Current,None,7,Yes,No,No,2,83,Yes,Atypical Angina,1 36,Male,235,154,92,Never,None,2,Yes,No,Yes,6,177,Yes,Non-anginal Pain,0 59,Male,236,152,62,Never,Moderate,5,Yes,No,Yes,9,177,Yes,Non-anginal Pain,1 26,Female,193,134,60,Current,None,5,No,Yes,Yes,6,146,Yes,Typical Angina,0 64,Female,191,178,75,Never,Moderate,9,Yes,No,No,5,97,No,Asymptomatic,0 45,Male,306,160,84,Current,Moderate,1,No,Yes,No,6,124,No,Atypical Angina,0 27,Male,198,147,81,Current,Heavy,3,No,Yes,No,7,123,No,Typical Angina,0 34,Female,178,133,89,Current,Heavy,1,No,No,Yes,6,151,Yes,Non-anginal Pain,0 37,Male,310,94,84,Current,None,5,Yes,No,No,9,93,Yes,Typical Angina,0 75,Male,283,139,96,Former,Moderate,6,No,Yes,No,3,98,Yes,Typical Angina,1 67,Male,282,153,77,Current,None,7,No,Yes,No,9,85,Yes,Typical Angina,1 38,Male,245,119,80,Never,Moderate,7,Yes,No,No,10,192,Yes,Atypical Angina,0 79,Male,279,98,97,Former,Moderate,9,No,No,No,1,148,Yes,Typical Angina,1 64,Female,298,169,94,Current,Heavy,0,Yes,Yes,Yes,4,129,Yes,Typical Angina,1 50,Female,268,159,78,Current,None,4,No,Yes,Yes,5,189,Yes,Asymptomatic,0 43,Male,285,154,80,Never,None,6,No,Yes,Yes,5,115,Yes,Non-anginal Pain,0 56,Male,270,176,75,Former,Heavy,7,Yes,Yes,No,9,136,Yes,Non-anginal Pain,1 46,Female,195,93,92,Former,Moderate,8,Yes,Yes,Yes,1,121,Yes,Atypical Angina,0 68,Female,206,104,65,Never,Heavy,9,Yes,No,Yes,8,102,No,Atypical Angina,1 37,Female,329,96,65,Current,None,1,Yes,No,Yes,4,192,Yes,Atypical Angina,0 71,Male,269,119,74,Never,Moderate,4,Yes,No,No,10,100,No,Asymptomatic,1 61,Female,341,142,92,Never,Moderate,7,No,Yes,No,8,123,No,Typical Angina,1 62,Female,300,125,99,Current,None,8,No,No,No,10,128,Yes,Typical Angina,1 77,Female,248,96,72,Current,Moderate,2,No,Yes,Yes,9,97,No,Asymptomatic,1 37,Female,252,164,99,Former,Heavy,6,No,No,No,1,166,Yes,Typical Angina,0 44,Male,251,94,77,Former,Heavy,9,Yes,No,Yes,2,94,No,Atypical Angina,0 48,Female,187,132,72,Former,Heavy,1,Yes,Yes,Yes,3,198,No,Non-anginal Pain,0 70,Male,238,144,74,Never,None,1,No,Yes,Yes,6,126,No,Atypical Angina,1 26,Male,224,107,89,Current,Heavy,5,No,Yes,Yes,6,171,Yes,Typical Angina,0 41,Male,159,124,71,Never,Heavy,0,Yes,Yes,No,4,193,No,Typical Angina,0 38,Female,202,178,93,Former,Moderate,7,Yes,Yes,Yes,5,183,Yes,Asymptomatic,0 59,Female,295,167,88,Current,None,9,No,No,No,10,187,Yes,Atypical Angina,1 63,Female,299,110,90,Former,None,0,No,Yes,Yes,9,162,No,Asymptomatic,1 66,Female,241,112,98,Current,Moderate,1,No,Yes,No,4,169,No,Atypical Angina,1 42,Male,297,144,77,Never,Moderate,2,No,No,Yes,9,194,No,Non-anginal Pain,0 63,Female,158,160,67,Former,Heavy,6,Yes,Yes,Yes,9,134,Yes,Asymptomatic,0 60,Male,289,144,81,Never,Heavy,5,No,Yes,No,1,145,No,Typical Angina,1 38,Female,340,176,98,Current,Heavy,5,No,No,No,1,155,Yes,Non-anginal Pain,0 70,Female,287,143,69,Current,Moderate,2,No,Yes,Yes,3,140,Yes,Non-anginal Pain,1 55,Male,271,166,69,Former,None,3,No,No,Yes,5,199,Yes,Non-anginal Pain,1 35,Male,176,90,69,Former,Heavy,9,Yes,Yes,No,7,81,Yes,Typical Angina,0 34,Male,234,112,90,Current,Moderate,8,Yes,No,Yes,9,171,No,Non-anginal Pain,0 62,Male,278,137,61,Current,Heavy,7,No,Yes,Yes,7,101,No,Asymptomatic,1 70,Female,331,178,93,Never,Moderate,4,No,Yes,Yes,6,111,Yes,Non-anginal Pain,1 76,Male,244,139,79,Former,Moderate,5,Yes,Yes,No,2,71,Yes,Non-anginal Pain,1 59,Male,246,128,98,Never,Heavy,9,Yes,Yes,Yes,3,158,Yes,Atypical Angina,1 58,Male,163,111,64,Former,Moderate,3,No,Yes,No,6,136,No,Typical Angina,0 70,Female,346,103,81,Never,None,4,No,Yes,No,6,135,Yes,Atypical Angina,1 51,Female,287,165,86,Former,None,3,No,No,Yes,4,73,No,Non-anginal Pain,1 29,Female,207,113,81,Never,Heavy,3,No,Yes,Yes,6,188,Yes,Atypical Angina,0 54,Female,339,130,61,Never,Moderate,9,Yes,Yes,No,3,185,Yes,Asymptomatic,1 63,Female,321,165,64,Former,Moderate,0,No,Yes,No,6,131,Yes,Typical Angina,1 38,Male,180,136,84,Current,None,2,No,Yes,Yes,7,162,No,Asymptomatic,0 49,Male,213,134,83,Never,None,2,Yes,Yes,Yes,7,149,No,Typical Angina,0 54,Male,212,121,61,Current,Heavy,9,No,No,Yes,7,182,Yes,Non-anginal Pain,1 62,Female,297,111,87,Never,None,3,No,Yes,No,7,70,No,Atypical Angina,1 71,Female,204,134,72,Current,Heavy,4,No,No,Yes,5,160,No,Asymptomatic,1 29,Female,166,132,82,Current,Moderate,2,No,No,No,4,107,Yes,Atypical Angina,0 53,Male,222,119,91,Current,Moderate,8,No,No,No,5,199,Yes,Typical Angina,1 34,Male,338,104,83,Never,Heavy,9,Yes,Yes,Yes,7,105,No,Non-anginal Pain,0 67,Male,169,127,90,Never,None,8,No,Yes,Yes,8,171,Yes,Asymptomatic,0 63,Male,218,158,76,Current,None,4,No,Yes,Yes,2,95,Yes,Non-anginal Pain,1 47,Female,254,174,68,Former,Heavy,4,No,No,No,10,168,No,Non-anginal Pain,0 75,Female,157,96,89,Never,None,1,Yes,Yes,Yes,1,140,Yes,Asymptomatic,0 27,Male,296,129,67,Former,Heavy,5,Yes,No,No,10,119,Yes,Non-anginal Pain,0 73,Male,240,178,81,Former,None,1,Yes,Yes,No,9,113,Yes,Atypical Angina,1 52,Female,278,170,71,Never,Heavy,2,Yes,No,No,3,85,No,Non-anginal Pain,1 39,Female,278,174,74,Former,Heavy,9,No,No,Yes,10,119,Yes,Non-anginal Pain,0 26,Female,240,174,62,Former,Heavy,2,No,Yes,Yes,6,196,Yes,Typical Angina,0 54,Female,250,159,95,Current,Heavy,9,Yes,Yes,No,7,178,No,Asymptomatic,1 70,Male,168,114,99,Former,Heavy,7,Yes,Yes,No,2,196,No,Atypical Angina,0 35,Male,325,163,99,Never,None,3,Yes,No,Yes,6,83,Yes,Asymptomatic,0 77,Male,163,91,73,Former,None,3,No,Yes,Yes,8,145,No,Non-anginal Pain,0 35,Male,159,154,67,Current,None,5,No,Yes,No,4,147,No,Asymptomatic,0 42,Male,248,94,92,Former,None,0,No,Yes,No,4,145,No,Asymptomatic,0 75,Male,244,103,72,Current,Heavy,2,No,No,No,8,131,No,Atypical Angina,1 59,Male,316,96,66,Former,None,2,No,No,No,5,198,Yes,Atypical Angina,1 45,Male,169,150,98,Former,Heavy,5,No,Yes,No,8,182,No,Atypical Angina,0 35,Male,272,130,85,Former,Moderate,2,Yes,No,No,6,166,No,Typical Angina,0 73,Male,338,140,62,Current,Moderate,8,Yes,No,Yes,10,113,Yes,Non-anginal Pain,1 54,Male,276,103,63,Never,Heavy,1,No,Yes,Yes,8,86,No,Atypical Angina,1 71,Male,345,132,71,Never,None,9,No,No,Yes,3,117,No,Non-anginal Pain,1 27,Female,253,96,65,Never,Moderate,6,No,Yes,Yes,2,189,No,Non-anginal Pain,0 66,Male,157,153,89,Former,Moderate,3,No,No,Yes,8,107,Yes,Atypical Angina,0 62,Female,225,119,96,Former,None,8,No,No,Yes,9,138,Yes,Typical Angina,1 28,Female,293,127,88,Never,None,5,Yes,No,No,3,156,Yes,Asymptomatic,0 37,Female,153,171,76,Former,Heavy,6,Yes,Yes,No,7,129,Yes,Typical Angina,0 78,Male,236,166,74,Never,Heavy,8,No,No,No,2,130,Yes,Asymptomatic,1 50,Female,195,159,67,Current,Heavy,5,No,Yes,No,7,77,Yes,Typical Angina,0 56,Male,203,129,86,Former,Moderate,6,No,No,Yes,8,195,No,Typical Angina,1 40,Female,339,179,71,Former,Heavy,4,No,No,Yes,7,179,No,Asymptomatic,0 37,Male,274,174,65,Current,None,1,Yes,Yes,Yes,10,175,Yes,Typical Angina,0 59,Male,265,173,87,Current,Moderate,5,No,Yes,No,2,91,No,Typical Angina,1 61,Male,192,104,75,Never,Heavy,2,No,Yes,No,4,199,Yes,Typical Angina,0 48,Male,214,158,83,Former,Moderate,8,Yes,Yes,No,8,106,Yes,Asymptomatic,0 54,Male,331,173,89,Never,Heavy,8,Yes,No,Yes,7,79,Yes,Non-anginal Pain,1 52,Female,156,117,63,Never,Moderate,5,No,No,Yes,7,116,No,Non-anginal Pain,0 40,Male,164,90,90,Former,None,1,No,No,No,10,144,No,Asymptomatic,0 35,Female,269,161,65,Never,Heavy,1,Yes,Yes,Yes,5,171,Yes,Asymptomatic,0 39,Female,196,171,61,Current,None,9,No,No,No,3,178,Yes,Typical Angina,0 55,Male,280,165,62,Current,Moderate,4,Yes,No,Yes,7,165,Yes,Asymptomatic,1 39,Female,334,139,71,Never,Moderate,5,No,Yes,No,6,141,No,Atypical Angina,0 74,Female,348,167,74,Current,Moderate,5,No,Yes,No,1,147,No,Atypical Angina,1 36,Male,265,90,69,Former,None,8,Yes,Yes,Yes,6,105,No,Asymptomatic,0 26,Female,345,122,91,Former,Heavy,3,No,No,No,9,99,No,Asymptomatic,0 56,Male,274,105,79,Current,Moderate,3,No,No,Yes,5,174,No,Non-anginal Pain,1 66,Female,290,115,63,Current,None,3,Yes,Yes,No,1,175,No,Typical Angina,1 36,Female,258,131,95,Never,None,6,No,No,No,8,112,Yes,Non-anginal Pain,0 61,Female,152,179,95,Current,Moderate,9,No,No,Yes,4,104,Yes,Typical Angina,0 28,Male,212,116,96,Former,None,5,No,Yes,No,2,118,No,Asymptomatic,0 27,Male,328,172,97,Never,None,1,No,No,No,1,179,No,Asymptomatic,0 43,Male,187,172,80,Current,None,8,Yes,Yes,No,1,163,No,Typical Angina,0 34,Female,240,162,62,Former,None,8,No,No,No,8,116,No,Typical Angina,0 28,Female,213,133,68,Never,Moderate,1,No,Yes,Yes,4,137,No,Non-anginal Pain,0 27,Male,254,139,91,Former,Heavy,1,Yes,Yes,Yes,6,196,Yes,Asymptomatic,0 41,Male,167,114,82,Current,None,8,No,Yes,Yes,5,180,Yes,Non-anginal Pain,0 34,Female,313,166,68,Current,Heavy,5,Yes,Yes,Yes,9,86,Yes,Non-anginal Pain,0 49,Male,238,90,71,Former,Moderate,7,No,No,Yes,3,116,Yes,Atypical Angina,0 77,Male,180,126,77,Former,Heavy,0,No,No,No,7,146,No,Atypical Angina,0 31,Male,204,165,75,Never,Moderate,7,No,No,Yes,5,192,Yes,Non-anginal Pain,0 72,Female,279,162,94,Current,Moderate,7,No,Yes,Yes,2,157,Yes,Asymptomatic,1 59,Male,306,150,89,Former,Moderate,6,Yes,Yes,No,2,75,Yes,Atypical Angina,1 69,Male,320,120,64,Never,Heavy,9,No,Yes,Yes,10,153,No,Non-anginal Pain,1 54,Female,287,95,75,Never,Heavy,9,Yes,Yes,Yes,5,94,No,Asymptomatic,1 61,Female,323,143,64,Current,None,3,No,Yes,Yes,9,124,Yes,Typical Angina,1 59,Male,276,168,85,Never,Heavy,2,No,Yes,Yes,9,134,No,Atypical Angina,1 52,Female,265,155,69,Never,Heavy,9,No,Yes,No,9,106,No,Atypical Angina,1 58,Female,181,135,83,Never,Heavy,0,No,No,Yes,2,105,No,Typical Angina,0 49,Female,214,130,60,Former,None,7,No,Yes,Yes,3,87,No,Non-anginal Pain,0 70,Female,188,154,86,Current,Moderate,2,No,No,Yes,4,109,No,Asymptomatic,0 73,Male,211,170,90,Current,Moderate,1,Yes,No,Yes,5,141,No,Atypical Angina,1 31,Female,234,160,60,Former,None,8,Yes,No,Yes,8,165,Yes,Atypical Angina,0 68,Female,332,125,74,Current,Moderate,8,No,Yes,No,6,103,No,Non-anginal Pain,1 62,Male,347,136,84,Never,None,5,Yes,Yes,No,1,91,Yes,Typical Angina,1 48,Male,231,159,87,Never,Moderate,0,No,No,No,2,126,No,Asymptomatic,0 49,Female,211,103,73,Former,None,4,No,No,Yes,9,127,Yes,Atypical Angina,0 45,Female,162,108,85,Current,Heavy,3,Yes,No,Yes,7,112,Yes,Non-anginal Pain,0 28,Male,297,111,94,Never,Heavy,1,Yes,Yes,No,2,183,No,Atypical Angina,0 78,Female,150,101,62,Current,Moderate,0,Yes,Yes,Yes,1,119,No,Non-anginal Pain,0 78,Female,192,146,61,Current,Heavy,2,No,Yes,No,10,88,No,Typical Angina,0 38,Male,325,134,67,Never,None,2,No,Yes,Yes,8,128,Yes,Asymptomatic,0 47,Male,186,161,69,Current,Moderate,0,No,No,No,2,122,No,Non-anginal Pain,0 32,Female,269,151,68,Former,None,9,No,Yes,No,9,199,Yes,Atypical Angina,0 45,Female,333,163,64,Former,None,4,No,Yes,No,9,73,No,Atypical Angina,0 42,Female,288,161,82,Former,Heavy,1,Yes,No,Yes,7,71,No,Asymptomatic,0 46,Male,294,109,97,Current,Moderate,6,No,No,Yes,8,127,No,Asymptomatic,0 45,Male,204,145,60,Never,None,5,Yes,No,Yes,9,92,Yes,Non-anginal Pain,0 69,Male,242,108,65,Never,Moderate,2,No,Yes,No,10,188,Yes,Asymptomatic,1 37,Male,229,95,74,Former,None,2,Yes,Yes,No,4,175,Yes,Typical Angina,0 31,Female,202,178,91,Current,None,2,No,Yes,No,4,80,No,Atypical Angina,0 76,Male,228,112,82,Current,Moderate,7,Yes,No,Yes,10,110,Yes,Typical Angina,1 61,Female,224,174,80,Current,Moderate,2,No,No,No,6,177,No,Atypical Angina,1 28,Male,237,136,62,Never,Moderate,2,Yes,Yes,Yes,5,89,Yes,Typical Angina,0 78,Male,210,100,99,Current,Heavy,5,Yes,Yes,Yes,9,120,Yes,Typical Angina,1 75,Male,263,113,73,Former,None,6,No,Yes,Yes,10,178,Yes,Atypical Angina,1 74,Female,334,158,81,Current,Heavy,9,No,No,Yes,1,150,Yes,Asymptomatic,1 76,Female,159,143,83,Never,Heavy,5,No,Yes,Yes,9,96,No,Asymptomatic,0 71,Female,216,110,79,Current,Heavy,1,Yes,No,Yes,2,140,No,Asymptomatic,1 59,Female,298,125,92,Never,None,6,No,Yes,Yes,10,134,No,Atypical Angina,1 40,Female,183,134,73,Never,Heavy,2,No,Yes,Yes,6,167,No,Atypical Angina,0 59,Female,264,121,99,Former,Heavy,4,No,No,No,2,115,No,Atypical Angina,1 49,Male,277,155,85,Former,Heavy,0,Yes,No,No,3,83,No,Typical Angina,0 40,Female,288,101,84,Never,Heavy,9,Yes,Yes,No,7,153,Yes,Non-anginal Pain,0 48,Female,257,148,65,Never,Moderate,3,No,No,No,1,102,No,Non-anginal Pain,0 49,Male,212,140,75,Never,Heavy,9,Yes,No,No,9,139,No,Atypical Angina,0 39,Female,283,157,73,Former,None,5,No,Yes,No,6,107,No,Typical Angina,0 43,Male,231,97,62,Current,Heavy,9,No,No,No,7,190,Yes,Asymptomatic,0 37,Female,215,157,78,Former,None,3,No,No,Yes,6,138,No,Typical Angina,0 75,Male,225,145,87,Never,None,4,Yes,Yes,No,5,125,Yes,Atypical Angina,1 48,Female,190,144,86,Current,Moderate,7,No,Yes,Yes,10,138,No,Non-anginal Pain,0 72,Male,343,113,89,Current,Moderate,2,No,No,Yes,10,166,No,Non-anginal Pain,1 49,Male,234,105,70,Former,Heavy,9,No,Yes,No,8,170,Yes,Atypical Angina,0 74,Male,187,129,94,Current,None,4,No,No,Yes,1,196,No,Typical Angina,0 72,Female,323,103,91,Never,Moderate,1,Yes,Yes,Yes,6,153,No,Typical Angina,1 64,Male,218,114,90,Current,Moderate,4,No,Yes,No,3,147,Yes,Asymptomatic,1 55,Female,321,167,88,Former,Moderate,0,No,No,No,5,83,Yes,Asymptomatic,1 26,Male,160,104,67,Former,Heavy,7,No,Yes,Yes,10,167,No,Non-anginal Pain,0 79,Female,292,100,67,Current,Moderate,6,Yes,Yes,Yes,2,140,No,Non-anginal Pain,1 41,Male,192,131,87,Current,Heavy,5,Yes,Yes,Yes,5,126,Yes,Asymptomatic,0 74,Male,279,92,86,Former,Moderate,3,No,Yes,Yes,7,189,Yes,Typical Angina,1 40,Female,188,117,62,Former,Heavy,3,No,Yes,Yes,9,188,No,Asymptomatic,0 32,Male,313,119,98,Never,Heavy,9,Yes,No,Yes,5,88,Yes,Asymptomatic,0 75,Female,328,111,71,Former,None,5,No,Yes,Yes,4,95,No,Atypical Angina,1 49,Female,280,175,90,Never,Heavy,3,Yes,Yes,No,6,82,No,Asymptomatic,0 34,Male,319,98,84,Current,None,3,No,No,No,7,181,No,Atypical Angina,0 75,Male,155,142,86,Former,None,1,No,No,Yes,6,100,No,Non-anginal Pain,0 41,Male,228,98,96,Former,Heavy,4,Yes,Yes,No,1,194,No,Atypical Angina,0 39,Male,212,177,99,Current,Heavy,5,Yes,Yes,No,8,85,Yes,Atypical Angina,0 75,Male,310,101,81,Current,None,5,Yes,No,Yes,10,139,No,Asymptomatic,1 76,Female,191,120,78,Never,None,3,Yes,No,No,6,103,No,Typical Angina,0 26,Male,157,176,67,Current,Moderate,4,No,Yes,No,8,165,No,Typical Angina,0 39,Female,318,129,67,Never,Heavy,7,Yes,No,No,7,95,Yes,Typical Angina,0 77,Male,307,166,95,Former,Moderate,1,No,Yes,Yes,3,186,No,Asymptomatic,1 66,Male,342,145,97,Current,Moderate,8,Yes,Yes,Yes,3,166,Yes,Typical Angina,1 45,Female,256,126,65,Former,None,3,Yes,Yes,Yes,6,121,Yes,Non-anginal Pain,0 52,Female,336,167,94,Never,None,2,No,No,No,7,73,Yes,Asymptomatic,1 34,Female,231,152,68,Former,None,9,No,No,No,4,89,No,Non-anginal Pain,0 62,Male,213,141,93,Current,Moderate,2,No,Yes,No,6,158,Yes,Non-anginal Pain,1 63,Male,256,172,72,Current,Heavy,3,Yes,No,No,3,119,Yes,Atypical Angina,1 76,Male,156,91,80,Former,None,0,No,Yes,No,7,74,Yes,Non-anginal Pain,0 37,Female,209,99,99,Never,Moderate,0,Yes,No,Yes,4,85,No,Asymptomatic,0 43,Male,307,116,78,Former,None,7,Yes,Yes,Yes,1,161,No,Non-anginal Pain,0 55,Male,301,117,63,Current,Heavy,2,Yes,Yes,Yes,7,95,No,Typical Angina,1 43,Male,303,171,72,Current,None,3,Yes,Yes,Yes,2,199,No,Asymptomatic,0 47,Female,305,99,70,Former,Moderate,5,No,Yes,No,6,145,Yes,Non-anginal Pain,0 68,Female,211,131,81,Never,Heavy,0,No,Yes,No,7,95,Yes,Non-anginal Pain,1 26,Female,280,147,63,Former,Moderate,0,No,No,No,6,71,Yes,Typical Angina,0 73,Male,346,124,80,Former,Moderate,0,Yes,Yes,Yes,8,90,No,Typical Angina,1 75,Female,201,121,71,Never,None,3,No,No,No,7,83,No,Non-anginal Pain,1 66,Male,320,147,74,Never,None,2,Yes,Yes,Yes,8,120,No,Typical Angina,1 66,Male,227,143,82,Current,None,4,No,Yes,Yes,3,79,No,Asymptomatic,1 65,Female,344,94,80,Former,Heavy,6,No,Yes,Yes,7,91,Yes,Typical Angina,1 42,Female,298,114,69,Current,Heavy,0,Yes,Yes,No,3,156,No,Non-anginal Pain,0 49,Female,226,103,75,Former,None,8,Yes,Yes,Yes,10,74,No,Atypical Angina,0 61,Female,165,100,84,Current,Heavy,0,No,No,Yes,6,140,Yes,Atypical Angina,0 76,Male,299,178,62,Current,Moderate,1,No,Yes,Yes,8,157,No,Atypical Angina,1 25,Male,176,116,90,Current,Moderate,6,No,Yes,Yes,6,129,No,Typical Angina,0 26,Male,152,165,61,Current,Heavy,8,No,Yes,No,2,186,Yes,Typical Angina,0 29,Male,332,116,97,Former,None,3,No,Yes,No,7,84,Yes,Asymptomatic,0 33,Female,333,108,68,Never,None,5,Yes,No,No,2,88,Yes,Asymptomatic,0 43,Female,152,99,75,Current,Heavy,9,No,Yes,Yes,3,169,No,Non-anginal Pain,0 49,Female,240,154,71,Current,None,8,Yes,Yes,Yes,10,165,Yes,Asymptomatic,0 28,Female,280,151,77,Never,Moderate,7,No,No,Yes,9,167,Yes,Asymptomatic,0 30,Male,150,165,72,Former,None,8,Yes,No,Yes,9,70,No,Non-anginal Pain,0 63,Female,331,127,99,Former,None,8,No,Yes,No,1,73,Yes,Asymptomatic,1 57,Female,178,113,93,Never,Heavy,4,Yes,Yes,Yes,9,81,Yes,Non-anginal Pain,0 32,Male,237,172,83,Current,None,2,No,No,No,9,198,No,Atypical Angina,0 69,Male,272,165,81,Former,Moderate,9,Yes,Yes,Yes,2,156,No,Non-anginal Pain,1 37,Male,267,100,97,Current,Moderate,0,Yes,Yes,No,10,158,Yes,Non-anginal Pain,0 36,Male,285,135,81,Current,Heavy,7,Yes,No,Yes,5,127,No,Atypical Angina,0 47,Female,189,129,69,Former,None,8,No,Yes,Yes,4,90,No,Non-anginal Pain,0 30,Female,340,171,91,Current,None,3,Yes,Yes,Yes,3,159,No,Asymptomatic,0 76,Male,253,128,78,Current,Moderate,4,Yes,Yes,No,8,182,Yes,Typical Angina,1 47,Male,177,166,97,Current,Heavy,5,Yes,Yes,Yes,1,82,No,Non-anginal Pain,0 40,Female,323,117,80,Never,Heavy,9,Yes,Yes,No,1,187,No,Non-anginal Pain,0 73,Female,216,117,81,Current,None,6,Yes,No,Yes,1,96,No,Atypical Angina,1 69,Male,329,142,83,Former,Heavy,3,No,No,Yes,8,90,No,Asymptomatic,1 46,Female,215,111,88,Current,Moderate,9,Yes,Yes,Yes,7,162,No,Typical Angina,0 66,Female,278,176,75,Current,None,6,Yes,Yes,Yes,2,89,No,Asymptomatic,1 42,Male,293,143,80,Never,None,6,Yes,No,Yes,10,127,No,Non-anginal Pain,0 69,Male,329,150,78,Former,None,7,No,No,Yes,10,140,Yes,Non-anginal Pain,1 53,Male,218,140,94,Never,Moderate,9,Yes,No,Yes,6,140,Yes,Asymptomatic,1 42,Female,206,127,97,Current,None,2,Yes,Yes,Yes,4,163,No,Typical Angina,0 58,Male,333,103,70,Never,Moderate,1,No,No,Yes,4,146,No,Non-anginal Pain,1 27,Female,288,127,90,Current,Heavy,8,No,No,No,10,158,Yes,Typical Angina,0 41,Female,286,91,65,Former,None,0,Yes,Yes,Yes,6,189,No,Atypical Angina,0 51,Male,325,153,94,Never,None,6,No,No,No,2,161,Yes,Non-anginal Pain,1 60,Female,208,170,70,Never,Heavy,4,No,No,No,6,147,No,Atypical Angina,1 75,Female,193,142,80,Never,Moderate,1,No,Yes,Yes,9,96,No,Non-anginal Pain,0 36,Male,341,93,87,Current,Heavy,3,No,Yes,No,2,117,Yes,Typical Angina,0 50,Male,286,144,94,Former,None,6,No,Yes,No,5,149,No,Typical Angina,0 66,Male,154,128,69,Former,Heavy,1,No,No,Yes,3,169,Yes,Non-anginal Pain,0 25,Female,345,105,98,Former,Heavy,7,No,No,Yes,10,125,No,Non-anginal Pain,0 74,Male,235,146,85,Never,Moderate,7,Yes,No,Yes,10,146,No,Atypical Angina,1 25,Male,200,176,85,Current,Moderate,4,Yes,No,Yes,6,160,Yes,Typical Angina,0 73,Male,282,165,60,Never,None,7,No,Yes,No,8,76,Yes,Non-anginal Pain,1 72,Female,155,172,69,Current,Heavy,8,Yes,No,Yes,4,100,No,Non-anginal Pain,0 45,Female,296,99,95,Never,None,2,No,No,Yes,7,120,Yes,Atypical Angina,0 70,Male,295,135,88,Former,Moderate,0,Yes,Yes,No,7,147,Yes,Asymptomatic,1 78,Male,212,161,87,Former,Moderate,4,Yes,No,No,9,121,Yes,Typical Angina,1 47,Male,236,151,92,Current,Heavy,0,No,Yes,Yes,1,139,No,Asymptomatic,0 71,Female,161,175,78,Never,Heavy,1,No,Yes,Yes,2,114,No,Non-anginal Pain,0 47,Female,233,164,79,Former,None,3,Yes,Yes,No,7,134,Yes,Typical Angina,0 50,Female,255,155,68,Former,Heavy,6,No,No,No,10,128,Yes,Atypical Angina,0 40,Male,159,142,78,Former,Heavy,2,No,No,No,6,138,No,Atypical Angina,0 50,Female,317,148,71,Current,Moderate,1,No,No,Yes,4,116,Yes,Typical Angina,0 57,Female,288,104,71,Never,Moderate,6,No,Yes,Yes,2,81,No,Typical Angina,1 36,Male,189,177,63,Never,Heavy,5,Yes,No,No,4,113,Yes,Non-anginal Pain,0 25,Male,314,142,61,Former,None,7,Yes,No,No,10,190,No,Typical Angina,0 40,Female,193,174,92,Never,Heavy,0,Yes,No,No,9,92,No,Non-anginal Pain,0 68,Male,251,124,98,Never,Heavy,3,No,Yes,No,5,101,No,Asymptomatic,1 70,Male,240,144,61,Never,Moderate,0,Yes,Yes,No,3,125,No,Non-anginal Pain,1 32,Male,179,98,69,Former,Moderate,6,No,Yes,No,4,119,No,Non-anginal Pain,0 53,Male,165,160,90,Never,Heavy,1,Yes,Yes,No,2,191,Yes,Typical Angina,0 62,Male,284,122,65,Never,None,2,No,Yes,No,8,153,Yes,Non-anginal Pain,1 63,Female,272,96,78,Current,None,4,Yes,No,Yes,7,101,Yes,Typical Angina,1 67,Male,240,139,61,Never,Moderate,2,No,No,No,7,185,Yes,Asymptomatic,1 44,Male,269,99,77,Former,Heavy,6,Yes,No,No,6,196,No,Typical Angina,0 71,Male,168,138,88,Never,None,7,Yes,Yes,Yes,4,127,Yes,Asymptomatic,0 50,Female,198,156,60,Current,None,7,No,No,Yes,10,76,No,Non-anginal Pain,0 59,Female,333,90,75,Current,Moderate,3,No,Yes,No,6,177,No,Asymptomatic,1 72,Female,280,139,62,Current,None,0,No,Yes,Yes,10,156,Yes,Typical Angina,1 64,Male,232,144,79,Former,Heavy,5,No,No,Yes,7,104,No,Asymptomatic,1 49,Male,201,172,75,Current,Heavy,2,Yes,No,Yes,5,162,No,Asymptomatic,0 76,Female,225,97,72,Never,None,4,No,Yes,Yes,9,171,Yes,Non-anginal Pain,1 54,Female,333,101,75,Current,Moderate,9,Yes,Yes,Yes,5,173,Yes,Typical Angina,1 76,Male,231,93,77,Current,Moderate,0,No,No,Yes,9,184,No,Typical Angina,1 74,Female,187,150,73,Never,None,9,No,No,No,1,111,No,Atypical Angina,0 66,Female,321,168,95,Former,Heavy,2,No,Yes,Yes,4,199,Yes,Atypical Angina,1 62,Female,200,170,66,Current,None,5,No,No,No,1,86,Yes,Asymptomatic,0 62,Female,244,127,68,Current,None,4,Yes,Yes,No,10,137,Yes,Asymptomatic,1 67,Female,333,92,86,Never,Heavy,8,No,No,No,5,117,Yes,Asymptomatic,1 31,Male,343,144,62,Current,Moderate,3,Yes,No,Yes,9,165,Yes,Non-anginal Pain,0 49,Female,259,143,94,Never,Moderate,5,Yes,No,Yes,1,172,No,Typical Angina,0 27,Male,282,146,89,Never,Moderate,8,No,Yes,Yes,2,146,No,Typical Angina,0 59,Female,164,104,70,Current,Heavy,9,Yes,No,Yes,7,195,Yes,Typical Angina,0 70,Female,200,95,74,Former,None,8,Yes,Yes,Yes,5,107,No,Non-anginal Pain,0 54,Male,346,90,82,Never,None,8,Yes,Yes,No,8,159,No,Asymptomatic,1 66,Male,318,133,79,Current,Moderate,1,Yes,Yes,No,7,180,No,Atypical Angina,1 37,Male,233,170,76,Current,None,0,Yes,Yes,No,9,196,Yes,Asymptomatic,0 74,Female,270,163,61,Former,Moderate,0,No,No,Yes,3,99,Yes,Typical Angina,1 74,Female,184,147,80,Current,Moderate,7,Yes,No,No,5,149,Yes,Atypical Angina,0 33,Female,330,142,98,Current,Heavy,8,Yes,Yes,No,3,75,Yes,Atypical Angina,0 43,Female,342,107,86,Current,Heavy,3,No,No,No,4,98,Yes,Atypical Angina,0 49,Male,343,106,89,Former,Heavy,3,Yes,No,Yes,10,70,No,Asymptomatic,0 31,Female,279,154,63,Current,None,0,No,No,No,8,79,Yes,Atypical Angina,0 48,Male,342,158,71,Never,Heavy,6,Yes,Yes,Yes,7,138,No,Atypical Angina,0 26,Female,319,131,85,Current,None,9,No,No,No,5,171,Yes,Typical Angina,0 46,Male,169,125,74,Never,Moderate,4,Yes,Yes,Yes,7,111,Yes,Typical Angina,0 51,Male,338,175,75,Never,Moderate,9,No,Yes,Yes,4,102,Yes,Typical Angina,1 66,Male,297,178,75,Never,None,9,Yes,No,No,9,98,Yes,Atypical Angina,1 77,Male,248,136,74,Current,Moderate,9,Yes,Yes,No,4,126,Yes,Atypical Angina,1 58,Female,342,175,89,Former,None,4,No,Yes,No,1,194,Yes,Typical Angina,1 68,Male,289,176,70,Former,Moderate,0,No,No,Yes,6,129,Yes,Typical Angina,1 62,Female,198,133,93,Former,Moderate,2,No,No,No,2,78,Yes,Atypical Angina,0 25,Male,304,177,82,Current,Moderate,5,Yes,No,No,9,170,Yes,Asymptomatic,0 45,Male,305,160,77,Current,Heavy,9,No,No,Yes,3,135,No,Typical Angina,0 37,Female,340,118,97,Current,Moderate,0,Yes,No,Yes,5,123,Yes,Non-anginal Pain,0 68,Male,166,103,88,Never,Heavy,1,Yes,No,Yes,5,182,No,Typical Angina,0 45,Female,187,115,86,Former,Heavy,0,No,Yes,No,7,157,No,Non-anginal Pain,0 44,Female,185,148,64,Former,Moderate,9,Yes,Yes,No,3,120,No,Atypical Angina,0 40,Female,194,159,83,Never,None,0,Yes,Yes,Yes,10,111,No,Atypical Angina,0 30,Female,321,95,97,Former,None,7,No,No,Yes,8,135,Yes,Typical Angina,0 59,Female,281,154,80,Never,None,0,Yes,Yes,No,6,177,No,Non-anginal Pain,1 51,Male,273,179,71,Current,Heavy,4,No,Yes,No,10,71,No,Atypical Angina,1 31,Female,226,163,69,Never,Moderate,7,Yes,Yes,No,10,110,No,Asymptomatic,0 54,Female,313,108,79,Never,Moderate,7,No,No,Yes,8,122,No,Non-anginal Pain,1 63,Female,284,120,71,Never,Moderate,7,No,No,No,2,74,No,Typical Angina,1 67,Female,207,126,87,Former,None,9,No,No,No,1,88,Yes,Atypical Angina,1 67,Female,296,90,82,Never,None,9,Yes,No,No,2,123,No,Atypical Angina,1 49,Female,330,94,66,Former,None,0,Yes,Yes,No,4,129,Yes,Atypical Angina,0 78,Male,331,169,86,Current,None,5,Yes,No,No,6,189,Yes,Atypical Angina,1 32,Female,216,132,75,Never,Moderate,6,No,Yes,No,7,185,No,Atypical Angina,0 43,Male,272,107,76,Current,Moderate,6,Yes,No,Yes,7,94,Yes,Atypical Angina,0 49,Female,294,112,72,Never,Moderate,7,No,No,Yes,6,118,No,Typical Angina,0 45,Male,171,174,93,Former,Moderate,6,Yes,No,Yes,7,118,Yes,Asymptomatic,0 42,Male,182,138,74,Current,Moderate,0,No,Yes,No,1,192,Yes,Non-anginal Pain,0 57,Female,289,123,99,Never,Moderate,1,Yes,No,Yes,6,189,Yes,Atypical Angina,1 57,Female,185,126,94,Never,Moderate,1,No,Yes,No,5,106,No,Typical Angina,0 56,Female,262,116,89,Former,Moderate,4,No,Yes,No,1,196,Yes,Non-anginal Pain,1 29,Female,309,149,64,Former,Moderate,5,No,No,Yes,10,159,No,Atypical Angina,0 73,Male,205,102,80,Former,Moderate,3,Yes,No,No,3,161,Yes,Non-anginal Pain,1 52,Male,175,162,78,Current,None,8,Yes,No,No,8,132,Yes,Typical Angina,0 64,Female,241,171,81,Current,None,6,Yes,No,No,7,176,No,Non-anginal Pain,1 61,Female,228,124,97,Never,Moderate,8,Yes,No,No,3,179,Yes,Atypical Angina,1 31,Female,333,168,93,Current,Moderate,4,No,No,No,6,184,No,Asymptomatic,0 59,Female,178,110,93,Former,None,7,Yes,No,Yes,2,89,Yes,Typical Angina,0 55,Female,187,117,75,Never,Moderate,5,Yes,No,Yes,8,172,No,Non-anginal Pain,0 51,Male,150,91,79,Never,None,9,Yes,No,Yes,8,130,No,Atypical Angina,0 79,Male,158,110,73,Never,Moderate,3,No,No,No,3,71,No,Atypical Angina,0 76,Female,220,171,91,Former,None,3,Yes,Yes,Yes,5,135,Yes,Asymptomatic,1 69,Female,272,122,97,Current,None,1,Yes,No,No,5,118,No,Atypical Angina,1 60,Male,150,131,79,Current,None,3,No,Yes,No,5,169,No,Atypical Angina,0 66,Male,297,130,72,Current,None,2,Yes,No,Yes,7,175,Yes,Typical Angina,1 64,Female,243,124,77,Former,None,0,No,Yes,No,10,133,Yes,Typical Angina,1 61,Female,163,101,93,Former,Heavy,6,Yes,Yes,No,6,163,No,Non-anginal Pain,0 44,Female,297,155,70,Former,Heavy,1,No,No,No,5,111,Yes,Typical Angina,0 69,Male,215,109,93,Current,Heavy,4,No,Yes,Yes,6,192,No,Typical Angina,1 50,Female,167,115,79,Current,Heavy,5,No,Yes,Yes,10,91,No,Typical Angina,0 67,Male,342,146,70,Former,Moderate,2,No,No,No,7,136,No,Asymptomatic,1 51,Male,225,170,88,Former,Moderate,4,No,Yes,Yes,3,173,No,Typical Angina,1 62,Male,229,155,97,Former,Heavy,5,No,No,No,5,101,Yes,Typical Angina,1 31,Female,194,131,91,Never,Moderate,1,Yes,Yes,No,10,186,Yes,Non-anginal Pain,0 42,Male,253,104,82,Former,Heavy,3,No,No,No,6,172,Yes,Non-anginal Pain,0 46,Male,218,140,65,Former,Heavy,5,Yes,No,No,7,186,No,Asymptomatic,0 53,Female,151,158,78,Current,None,9,No,No,Yes,8,122,No,Non-anginal Pain,0 71,Female,269,120,63,Never,Heavy,7,Yes,No,Yes,3,116,No,Asymptomatic,1 64,Male,328,178,72,Current,Heavy,9,No,Yes,No,6,144,Yes,Typical Angina,1 28,Female,261,139,90,Never,Moderate,4,No,Yes,Yes,7,170,Yes,Atypical Angina,0 63,Female,316,120,77,Current,Moderate,8,No,No,No,7,116,No,Typical Angina,1 66,Female,215,116,66,Current,None,0,Yes,Yes,No,10,116,No,Asymptomatic,1 51,Male,198,137,69,Never,Heavy,2,No,No,No,6,173,Yes,Asymptomatic,0 29,Female,218,93,78,Never,Heavy,2,No,Yes,Yes,1,110,Yes,Typical Angina,0 70,Male,254,157,76,Current,None,1,Yes,Yes,Yes,7,131,No,Asymptomatic,1 52,Male,339,124,77,Former,Moderate,0,No,Yes,Yes,7,95,Yes,Typical Angina,1 55,Female,265,109,83,Current,Moderate,7,Yes,No,No,10,183,Yes,Asymptomatic,1 38,Female,224,93,67,Former,None,3,No,Yes,Yes,1,154,No,Typical Angina,0 48,Male,163,128,93,Former,Moderate,2,No,No,No,8,117,Yes,Asymptomatic,0 25,Female,167,137,93,Former,Heavy,9,Yes,No,No,5,87,No,Atypical Angina,0 34,Male,308,94,64,Current,Moderate,3,Yes,Yes,Yes,7,183,No,Non-anginal Pain,0 50,Male,222,91,90,Current,Moderate,7,Yes,Yes,Yes,4,99,No,Typical Angina,0 31,Male,341,130,89,Current,None,9,No,No,Yes,6,127,No,Typical Angina,0 25,Female,190,152,76,Current,Heavy,6,Yes,Yes,Yes,3,152,No,Asymptomatic,0 59,Female,154,114,99,Former,None,6,No,No,Yes,7,182,Yes,Atypical Angina,0 68,Female,223,170,71,Former,Moderate,4,No,Yes,No,7,104,No,Asymptomatic,1 56,Male,243,115,71,Former,Heavy,3,No,Yes,Yes,2,72,No,Typical Angina,1 59,Male,265,147,72,Never,Heavy,4,Yes,No,Yes,5,109,Yes,Asymptomatic,1 28,Male,283,139,65,Never,Moderate,3,No,No,Yes,6,159,No,Non-anginal Pain,0 79,Male,287,97,72,Never,Moderate,7,Yes,No,No,2,83,Yes,Atypical Angina,1 63,Female,202,113,82,Current,Moderate,3,No,Yes,Yes,4,168,No,Typical Angina,1 72,Female,314,103,92,Current,Heavy,7,No,Yes,Yes,2,81,Yes,Typical Angina,1 39,Female,227,142,81,Former,None,9,No,Yes,Yes,7,139,No,Atypical Angina,0 37,Female,283,115,80,Former,Moderate,6,Yes,Yes,No,4,86,No,Atypical Angina,0 46,Male,189,112,71,Never,Heavy,6,No,No,Yes,3,129,Yes,Typical Angina,0 53,Male,257,112,69,Former,Moderate,5,Yes,No,Yes,3,93,Yes,Atypical Angina,1 27,Female,246,160,75,Never,None,2,No,Yes,Yes,5,94,No,Typical Angina,0 50,Female,219,152,88,Current,Moderate,2,Yes,No,No,10,193,Yes,Atypical Angina,0 62,Male,312,133,73,Never,Heavy,2,Yes,No,No,10,187,No,Non-anginal Pain,1 72,Male,247,156,94,Never,None,8,Yes,No,Yes,5,119,Yes,Non-anginal Pain,1 73,Female,317,171,79,Never,Moderate,9,No,No,Yes,8,139,Yes,Asymptomatic,1 66,Male,164,154,85,Former,Heavy,2,No,Yes,Yes,9,71,No,Typical Angina,0 57,Female,198,116,66,Former,None,9,No,No,No,9,111,No,Asymptomatic,0 29,Female,324,174,77,Never,Heavy,2,Yes,Yes,No,3,99,No,Non-anginal Pain,0 52,Male,198,142,68,Never,Heavy,0,No,Yes,No,4,136,Yes,Atypical Angina,0 56,Male,191,172,70,Former,Heavy,5,Yes,Yes,No,10,148,Yes,Non-anginal Pain,0 25,Female,201,111,72,Never,None,5,No,Yes,Yes,4,161,No,Atypical Angina,0 36,Female,160,136,95,Former,None,5,No,Yes,Yes,4,116,Yes,Non-anginal Pain,0 58,Female,165,166,65,Former,None,7,No,Yes,No,2,171,No,Asymptomatic,0 44,Female,343,174,83,Never,None,9,No,Yes,No,7,146,Yes,Typical Angina,0 28,Male,323,113,72,Former,Heavy,0,Yes,Yes,Yes,8,82,No,Non-anginal Pain,0 37,Female,298,179,62,Current,Heavy,9,Yes,No,No,9,82,No,Typical Angina,0 56,Male,247,113,76,Never,Heavy,1,Yes,No,No,9,86,Yes,Asymptomatic,1 41,Female,328,96,69,Former,Moderate,0,No,Yes,No,8,190,Yes,Atypical Angina,0 70,Female,180,168,72,Former,None,3,No,No,No,6,104,Yes,Non-anginal Pain,0 79,Male,264,142,70,Current,None,4,Yes,Yes,No,6,111,No,Atypical Angina,1 65,Male,182,157,94,Former,Heavy,0,No,No,No,1,184,Yes,Asymptomatic,0 53,Female,193,164,89,Current,Moderate,4,No,No,Yes,10,152,No,Typical Angina,0 37,Female,309,98,88,Current,Moderate,6,No,No,No,9,175,No,Asymptomatic,0 78,Male,308,139,69,Never,Heavy,2,No,Yes,No,2,80,Yes,Asymptomatic,1 40,Female,236,162,88,Former,Heavy,4,Yes,No,Yes,10,177,No,Non-anginal Pain,0 64,Female,203,92,75,Current,Heavy,8,No,No,No,1,183,No,Non-anginal Pain,1 55,Male,300,121,99,Never,Heavy,2,Yes,Yes,No,10,116,No,Atypical Angina,1 53,Male,209,130,81,Former,Moderate,3,Yes,Yes,Yes,8,99,Yes,Typical Angina,1 33,Female,273,104,87,Former,None,0,Yes,Yes,Yes,9,106,Yes,Atypical Angina,0 54,Male,294,168,63,Never,Heavy,0,No,Yes,Yes,2,175,No,Asymptomatic,1 47,Female,285,118,95,Never,Moderate,5,Yes,Yes,Yes,6,163,Yes,Asymptomatic,0 40,Female,177,95,70,Former,Moderate,2,Yes,Yes,Yes,6,158,No,Typical Angina,0 73,Female,252,175,80,Current,Heavy,6,Yes,No,Yes,7,192,Yes,Typical Angina,1 52,Male,301,179,99,Current,Heavy,3,No,No,Yes,7,115,No,Atypical Angina,1 65,Male,231,151,83,Never,None,3,No,No,No,3,103,No,Atypical Angina,1 73,Male,184,107,81,Former,Moderate,9,No,No,Yes,4,140,Yes,Non-anginal Pain,0 57,Male,320,99,83,Former,Heavy,8,Yes,Yes,No,9,184,No,Asymptomatic,1 63,Female,302,134,98,Never,Heavy,4,Yes,Yes,Yes,4,167,No,Atypical Angina,1 76,Female,309,116,70,Never,None,8,Yes,Yes,No,7,191,No,Typical Angina,1 58,Female,242,95,63,Never,None,1,No,No,Yes,10,168,No,Typical Angina,1 42,Female,343,102,87,Never,Moderate,9,Yes,Yes,Yes,8,196,Yes,Asymptomatic,0 30,Male,315,161,92,Never,None,9,No,Yes,Yes,4,133,Yes,Typical Angina,0 35,Male,328,148,79,Former,Moderate,2,Yes,No,Yes,8,128,Yes,Atypical Angina,0 30,Male,159,98,65,Current,Moderate,4,Yes,Yes,No,6,174,No,Non-anginal Pain,0 51,Female,218,114,62,Current,Moderate,2,No,Yes,Yes,7,176,No,Atypical Angina,1 48,Female,339,164,63,Former,Heavy,0,No,No,Yes,2,98,No,Asymptomatic,0 65,Male,151,107,64,Former,Moderate,4,Yes,Yes,Yes,10,70,No,Typical Angina,0 64,Female,333,113,63,Current,None,2,Yes,Yes,No,3,95,Yes,Asymptomatic,1 42,Female,261,122,92,Never,None,0,No,No,No,6,128,No,Atypical Angina,0 42,Male,156,111,95,Current,Heavy,9,Yes,Yes,Yes,7,152,Yes,Asymptomatic,0 48,Male,221,116,64,Never,Heavy,0,Yes,No,No,4,92,Yes,Asymptomatic,0 26,Female,241,120,67,Current,None,5,No,Yes,Yes,6,172,No,Non-anginal Pain,0 76,Male,216,139,64,Current,None,2,Yes,No,Yes,2,182,No,Asymptomatic,1 36,Female,341,104,90,Never,Moderate,0,No,No,No,8,179,Yes,Typical Angina,0 33,Male,212,120,78,Former,Heavy,9,Yes,Yes,No,2,150,Yes,Atypical Angina,0 51,Male,227,147,61,Former,None,9,Yes,Yes,No,1,111,Yes,Non-anginal Pain,1 68,Male,265,90,89,Never,Heavy,5,Yes,No,No,8,107,No,Asymptomatic,1 45,Female,157,115,75,Current,Heavy,2,Yes,Yes,No,10,175,No,Asymptomatic,0 58,Female,312,134,79,Current,Heavy,3,Yes,No,No,7,198,Yes,Atypical Angina,1 35,Female,162,102,82,Never,None,5,No,Yes,No,8,149,No,Atypical Angina,0 48,Female,231,153,65,Current,None,8,No,No,No,2,72,No,Atypical Angina,0 33,Female,198,178,67,Current,Heavy,3,No,No,Yes,3,97,No,Non-anginal Pain,0 65,Male,282,150,69,Never,Moderate,4,No,No,Yes,4,189,Yes,Typical Angina,1 50,Female,227,161,95,Current,Moderate,9,Yes,Yes,Yes,10,97,No,Typical Angina,0 34,Male,186,134,82,Current,Heavy,5,Yes,No,No,1,132,No,Atypical Angina,0 37,Male,162,130,78,Former,Heavy,7,No,No,No,4,106,Yes,Atypical Angina,0 62,Male,206,177,83,Former,Moderate,5,Yes,Yes,Yes,5,110,Yes,Non-anginal Pain,1 33,Male,274,140,82,Former,None,5,Yes,No,No,7,147,Yes,Typical Angina,0 41,Female,320,159,61,Former,Moderate,6,No,Yes,Yes,7,144,Yes,Asymptomatic,0 37,Male,334,166,72,Current,None,9,No,No,Yes,10,82,No,Atypical Angina,0 64,Female,152,145,87,Never,None,2,Yes,Yes,Yes,7,97,No,Atypical Angina,0 41,Male,228,162,72,Current,None,4,Yes,No,No,4,139,Yes,Atypical Angina,0 46,Male,341,158,73,Former,Moderate,8,No,No,Yes,8,193,Yes,Typical Angina,0 29,Male,252,144,84,Never,Heavy,2,No,Yes,Yes,8,170,Yes,Typical Angina,0 42,Male,347,141,61,Never,Heavy,7,No,Yes,No,1,155,No,Non-anginal Pain,0 55,Male,305,110,62,Never,Heavy,9,No,No,Yes,5,163,Yes,Asymptomatic,1 50,Female,281,120,92,Current,Heavy,7,No,Yes,Yes,6,106,Yes,Non-anginal Pain,0 72,Male,242,175,71,Former,None,5,No,No,Yes,9,132,No,Non-anginal Pain,1 55,Female,219,166,89,Former,None,5,Yes,No,No,8,113,No,Atypical Angina,1 45,Male,284,91,71,Current,None,8,Yes,Yes,No,5,106,Yes,Non-anginal Pain,0 65,Female,303,162,74,Never,Heavy,5,No,Yes,Yes,10,135,No,Typical Angina,1 70,Female,253,138,61,Former,Moderate,0,No,No,Yes,9,179,No,Non-anginal Pain,1 58,Female,166,161,70,Never,Heavy,1,No,No,No,1,150,Yes,Typical Angina,0 74,Male,255,112,99,Former,Moderate,8,Yes,Yes,No,8,84,No,Non-anginal Pain,1 63,Female,187,178,69,Current,Heavy,4,No,No,No,5,128,No,Non-anginal Pain,0 25,Female,305,100,76,Current,Heavy,2,Yes,No,No,9,107,No,Asymptomatic,0 36,Female,161,178,98,Never,Moderate,7,No,Yes,No,4,185,Yes,Typical Angina,0 79,Male,245,132,71,Current,Moderate,6,Yes,No,No,2,185,No,Typical Angina,1 73,Female,226,164,61,Never,Moderate,0,Yes,Yes,Yes,2,144,No,Non-anginal Pain,1 28,Female,243,91,84,Current,None,8,Yes,No,Yes,9,138,No,Asymptomatic,0 27,Female,239,143,87,Current,None,0,Yes,Yes,No,1,78,Yes,Typical Angina,0 26,Female,298,162,67,Never,Moderate,3,Yes,Yes,Yes,10,98,No,Asymptomatic,0 29,Male,224,118,69,Never,None,1,Yes,Yes,No,5,145,No,Non-anginal Pain,0 69,Female,223,147,66,Former,None,4,Yes,Yes,Yes,1,118,No,Non-anginal Pain,1 38,Female,217,104,65,Never,Moderate,2,Yes,Yes,Yes,2,75,Yes,Atypical Angina,0 37,Female,349,148,62,Former,Moderate,5,No,No,No,6,144,Yes,Asymptomatic,0 49,Male,315,144,77,Former,None,4,Yes,Yes,No,2,127,No,Atypical Angina,0 54,Male,304,112,86,Former,None,8,Yes,No,Yes,6,111,No,Asymptomatic,1 26,Female,215,100,74,Never,Heavy,7,No,Yes,No,10,135,No,Atypical Angina,0 28,Female,220,102,73,Current,Moderate,7,Yes,Yes,Yes,10,102,No,Typical Angina,0 70,Female,346,110,62,Never,None,1,Yes,Yes,No,8,130,Yes,Asymptomatic,1 52,Male,248,159,76,Former,Moderate,9,No,Yes,Yes,2,152,Yes,Asymptomatic,1 56,Female,269,111,86,Never,Heavy,5,No,Yes,Yes,10,120,No,Non-anginal Pain,1 78,Female,334,145,76,Never,None,6,No,No,No,10,196,Yes,Typical Angina,1 79,Male,151,179,81,Never,Moderate,4,Yes,No,Yes,8,189,Yes,Asymptomatic,0 60,Female,326,151,68,Former,None,8,Yes,Yes,No,5,174,Yes,Atypical Angina,1 53,Male,226,116,82,Current,None,6,No,No,Yes,5,161,Yes,Asymptomatic,1”“” import gradio as gr import io import numpy as np import pandas as pd import plotly.express as px import plotly.graph_objects as go</p>
<p>from config import csv_data from io import StringIO from sklearn.model_selection import train_test_split from sklearn.metrics import auc from sklearn.metrics import precision_recall_curve from sklearn.metrics import precision_score from sklearn.metrics import recall_score from sklearn.metrics import roc_curve</p>
<p># Read the CSV data from the string df = pd.read_csv(StringIO(csv_data))</p>
<p># Encode categorical columns categorical_columns = [‘Gender’, ‘Smoking’, ‘Alcohol Intake’, ‘Family History’, ‘Diabetes’, ‘Obesity’, ‘Exercise Induced Angina’, ‘Chest Pain Type’]</p>
<p>from sklearn.linear_model import LogisticRegression</p>
<p># Select only Age and Cholesterol columns along with the target variable df = df[[‘Age’, ‘Cholesterol’, ‘Heart Disease’]]</p>
<p># Split the dataset X = df[[‘Age’, ‘Cholesterol’]] y = df[‘Heart Disease’]</p>
<p># Split the dataset X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)</p>
<p># Train a logistic regression model model = LogisticRegression() model.fit(X_train, y_train)</p>
<p># Function to compute precision and recall def compute_precision_recall(threshold): y_prob = model.predict_proba(X_test)[:, 1] y_pred = (y_prob &gt;= threshold).astype(int) precision = precision_score(y_test, y_pred) recall = recall_score(y_test, y_pred) return precision, recall</p>
<p>def plot_roc_curve(threshold): # Compute ROC curve and AUC fpr, tpr, thresholds = roc_curve(y_test, model.predict_proba(X_test)[:, 1]) roc_auc = auc(fpr, tpr)</p>
<p># Create a DataFrame for the ROC curve df_roc = pd.DataFrame({ ‘fpr’: fpr, ‘tpr’: tpr, ‘threshold’: thresholds })</p>
<p># Create the plot with Plotly Express fig = px.line(df_roc, x=‘fpr’, y=‘tpr’, title=f’ROC Curve (AUC = {roc_auc:.2f})‘, labels={’fpr’: ‘False Positive Rate’, ‘tpr’: ‘True Positive Rate’}) # Add a diagonal line for the random model fig.add_scatter(x=[0, 1], y=[0, 1], mode=‘lines’, line=dict(color=‘gray’, dash=‘dash’), name=‘Random Model’)</p>
<p># Add a vertical line for the specified threshold threshold_index = (np.abs(thresholds - threshold)).argmin() fig.add_vline(x=fpr[threshold_index], line=dict(color=‘black’, dash=‘dot’), annotation_text=f’Threshold: {threshold}’, annotation_position=“bottom right”)</p>
<p>return fig</p>
<p>def plot_precision_recall(threshold):</p>
<p># Use the precision_recall_curve function to compute precision and recall for all possible thresholds precisions, recalls, thresholds = precision_recall_curve(y_test, model.predict_proba(X_test)[:, 1])</p>
<p># Create a DataFrame for precision and recall values df_pr = pd.DataFrame({ ‘threshold’: np.concatenate([[0], thresholds]), ‘precision’: precisions, ‘recall’: recalls })</p>
<p># Create the plot with Plotly Express fig = px.line(df_pr, x=‘threshold’, y=‘precision’, title=‘Precision and Recall at Different Thresholds’, labels={‘threshold’: ‘Threshold’, ‘value’: ‘Score’}) fig.add_scatter(x=df_pr[‘threshold’], y=df_pr[‘recall’], mode=‘lines’, name=‘Recall’)</p>
<p># Add a vertical line for the specified threshold fig.add_vline(x=threshold, line=dict(color=‘black’, dash=‘dot’), annotation_text=f’Threshold: {threshold}’, annotation_position=“top right”)</p>
<p>return fig</p>
<p>def plot_performance(threshold): return [plot_roc_curve(threshold), plot_precision_recall(threshold)]</p>
<p>inputs = [gr.Slider(0, 1, step=0.01, label=‘Threshold’)] outputs = [gr.Plot(), gr.Plot()]</p>
<p># Create the Gradio interface iface = gr.Interface( fn=plot_performance, inputs=inputs, outputs=outputs, live=True )</p>
<p># Launch the interface iface.launch()</p>


</section>

 ]]></description>
  <guid>https://viscioletti.com/posts/i-am-loving-gradio-discover-it-with-me/</guid>
  <pubDate>Thu, 18 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/i-am-loving-gradio-discover-it-with-me/images/81Ef9EiykdL._SL1500_.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Come scegliere il miglior metodo per codificare variabili categoriali</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/come-scegliere-il-miglior-metodo-per-codificare-variabili-categoriali/</link>
  <description><![CDATA[ 





<p><em>ovvero non usare one-hot encoding dappertutto.</em></p>
<p>In questo articolo esamineremo come codificare le variabili categoriali ed evitare problemi di dimensionalità.</p>
<section id="introduzione" class="level2">
<h2 class="anchored" data-anchor-id="introduzione">Introduzione</h2>
<p>Durante i colloqui per i ruoli di Data Scientist, chiedo ai candidati di completare un compito. L’obiettivo è creare un modello di Machine Learning, spesso un classificatore binario. Questa sarà una parte importante del loro lavoro quotidiano. Come parte dei passaggi per completare l’esercizio, è necessario trattare variabili categoriche.</p>
<p>Nella maggior parte dei casi i candidati scelgono la tecnica del one-hot encoding per trattare queste variabili.</p>
<section id="che-cosè-il-one-hot-encoding" class="level3">
<h3 class="anchored" data-anchor-id="che-cosè-il-one-hot-encoding">Che cos’è il one-hot encoding</h3>
<p>Ci sono molti libri e articoli che suggeriscono una tecnica semplice. Questa tecnica trasforma una variabile categoriale in variabili binarie. La variabile binaria indica la presenza di ciascuna categoria nel record.<br>
Facciamo un esempio.</p>
<p>Utilizzando il seguente codice</p>
<pre><code>import pandas as pd

df = pd.DataFrame({
    'ID': [1, 2, 3, 4, 5],
    'colour': ['black', 'yellow', 'red', 'white', 'purple']
})</code></pre>
<p>possiamo creare la tabella</p>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>Il set di dati iniziale contenente le variabili id ​​e color</em></p>
</figcaption>
</figure>
<p>Immagina di avere un set di dati semplice come quello sopra, con variabili id ​​e colore. Devi cambiare il colore in una funzione codificata a caldo. Ciò significa che vuoi trasformare il set di dati in qualcosa di simile alla tabella seguente.</p>
<figure class="figure">
<table class="caption-top table">
<colgroup>
<col style="width: 16%">
<col style="width: 16%">
<col style="width: 16%">
<col style="width: 16%">
<col style="width: 16%">
<col style="width: 16%">
</colgroup>
<thead>
<tr class="header">
<th>ID</th>
<th>colore_nero</th>
<th>colore_giallo</th>
<th>colore_rosso</th>
<th>colore_bianco</th>
<th>colore_viola</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="even">
<td>2</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="odd">
<td>3</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="even">
<td>4</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="odd">
<td>5</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>1</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>Il set di dati iniziale contenente le variabili id ​​e color</em></p>
</figcaption>
</figure>
<p>Come puoi vedere, abbiamo creato 3 variabili da quella categorica iniziale. Ogni variabile rappresenta un colore, una categoria della variabile originale. Ora capisco perché questo metodo è così popolare. Se ci pensi, è una riga di codice, devi solo eseguirla</p>
<pre><code>df = pd.get_dummies(df)</code></pre>
<p>e tu ti occupi di tutto, vero? Sì, ma questo ha un costo, poiché&nbsp;<a href="https://translate.google.com/website?sl=auto&amp;tl=it&amp;hl=it&amp;client=webapp&amp;u=https://en.wikipedia.org/wiki/No_such_thing_as_a_free_lunch">non esiste un pranzo gratis</a>&nbsp;.</p>
</section>
</section>
<section id="il-costo-di-codificare-tutto-con-una-sola-operazione" class="level2">
<h2 class="anchored" data-anchor-id="il-costo-di-codificare-tutto-con-una-sola-operazione">Il costo di codificare tutto con una sola operazione</h2>
<p>Quando si trasforma una variabile categoriale utilizzando la codifica one-hot,&nbsp;<em>la maledizione della dimensionalità</em>&nbsp;è il costo principale. Con questo termine ci riferiamo a vari fenomeni che insorgono quando si ha a che fare con dati organizzati in spazi ad alta dimensione.</p>
<p>Possiamo riassumere i principali effetti avversi come:</p>
<ul>
<li><p><strong>Maggiore scarsità dei dati.</strong>&nbsp;Questo è abbastanza intuitivo guardando l’esempio precedente. Abbiamo dovuto creare 3 variabili per rappresentare la variabile originale con 3 categorie. Immagina di avere un set di dati con milioni di record. Ha decine di variabili categoriali, ciascuna con da 10 a 100 categorie. Usando questa tecnica, puoi creare matrici di dati con molti zeri. Ogni record avrà solo una variabile che rappresenta il valore categoriale come 1. Ciò crea una cosiddetta matrice sparsa. La scarsità della matrice rende le attività di clustering e classificazione più impegnative</p></li>
<li><p><strong>I calcoli diventano più dispendiosi in termini di risorse.</strong>&nbsp;A causa della maggiore complessità computazionale con più variabili.</p></li>
<li><p><strong>L’aggiunta di più dimensioni a un modello di machine learning aumenta il rischio di overfitting</strong>&nbsp;. Ciò accade perché più dimensioni danno al modello più&nbsp;<em>gradi di libertà.</em>&nbsp;Pertanto, il modello potrebbe finire per adattare il rumore nei dati anziché il segnale effettivo.</p></li>
<li><p><strong>Quando le dimensioni aumentano, i modelli di machine learning generalmente hanno prestazioni peggiori</strong>&nbsp;. Quando sono presenti più dimensioni, il modello necessita di più dati per funzionare meglio. All’aumentare del numero di dimensioni, lo spazio occupato dei dati cresce rapidamente.</p></li>
</ul>
</section>
<section id="codificare-variabili-categoriali-alternative" class="level2">
<h2 class="anchored" data-anchor-id="codificare-variabili-categoriali-alternative">Codificare Variabili Categoriali: Alternative</h2>
<p>Quindi, quali alternative abbiamo rispetto alla codifica one-hot? Esploriamo alcuni di essi:</p>
<ul>
<li><p><strong>Label Encoding</strong>&nbsp;:</p>
<ul>
<li><p><em>Descrizione</em>&nbsp;: Assegniamo un numero intero a ciascuna categoria</p></li>
<li><p><em>Pro</em>&nbsp;: consente di risparmiare spazio poiché utilizza una singola colonna</p></li>
<li><p><em>Contro</em>&nbsp;: può introdurre relazioni ordinali dove non ne esistono</p></li>
<li><p><em>Esempio</em>&nbsp;:</p></li>
</ul></li>
</ul>
<pre><code>from sklearn.preprocessing import LabelEncoder

le = LabelEncoder()
df['Label_Encoded'] = le.fit_transform(df['colour'])</code></pre>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>Etichetta_codificata</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>0</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>4</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>2</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>3</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>1</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>Esempio di set di dati di LabelEncoder</em></p>
</figcaption>
</figure>
<ul>
<li><strong>Encoding ordinale</strong>&nbsp;:
<ul>
<li><p><em>Descrizione</em>&nbsp;: le variabili ordinali hanno un ordine logico, quindi possiamo usare la codifica ordinale invece della codifica delle etichette.</p></li>
<li><p><em>Pro</em>&nbsp;: mantiene la natura ordinale della variabile</p></li>
<li><p><em>Contro</em>&nbsp;: Non adatto per variabili nominali</p></li>
<li><p><em>Esempio</em>&nbsp;: Diciamo che i colori sono in ordine alfabetico e hanno una classifica.</p></li>
</ul></li>
</ul>
<pre><code>df['colour'].astype('category').cat.codes</code></pre>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>Ordinale_codificato</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>0</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>4</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>2</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>3</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>1</td>
</tr>
</tbody>
</table>
<figcaption>
<p>Esempio di set di dati con Encoding ordinale</p>
</figcaption>
</figure>
<ul>
<li><strong>Encoding della frequenza (o conteggio)</strong>&nbsp;:
<ul>
<li><p><em>Descrizione</em>&nbsp;: le categorie si rappresentano attraverso le loro occorrenze o il conteggio della frequenza.</p></li>
<li><p><em>Pro</em>&nbsp;: mantiene gestibile la forma del set di dati.</p></li>
<li><p><em>Contro</em>&nbsp;: Collisioni in cui categorie diverse hanno la stessa frequenza.</p></li>
<li><p><em>Esempio</em>&nbsp;:</p></li>
</ul></li>
</ul>
<pre><code>df['Frequency_Encoded'] = df['colour'].map(df['colour'].value_counts())</code></pre>
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>Frequenza_codificata</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>1</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>1</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>1</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>1</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>Esempio di set di dati della codifica di frequenza</p>
<p><em>Nota</em>&nbsp;: in questo esempio, tutti i colori appaiono solo una volta, quindi la frequenza è 1 per tutti.</p>
<ul>
<li><strong>Codifica target (valore medio)</strong>&nbsp;:
<ul>
<li><p><em>Descrizione</em>&nbsp;: il valore medio del valore target per la categoria sostituisce la categoria.</p></li>
<li><p><em>Pro</em>&nbsp;: acquisisce informazioni sulla relazione tra la categoria e la variabile di destinazione.</p></li>
<li><p><em>Contro</em>&nbsp;: rischio di perdita di dati; non adatto per set di dati con un numero limitato di osservazioni.</p></li>
<li><p><em>Esempio</em>&nbsp;:</p></li>
</ul></li>
</ul>
<pre><code># Python snippet for target encoding
df['Target_Encoded'] = df['colour'].map(df.groupby('colour')['target'].mean())</code></pre>
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>bersaglio</th>
<th>Target_Encoded</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>10</td>
<td>10.0</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>20</td>
<td>15.0</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>30</td>
<td>30.0</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>40</td>
<td>40.0</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>50</td>
<td>50,0</td>
</tr>
<tr class="even">
<td>6</td>
<td>giallo</td>
<td>10</td>
<td>15.0</td>
</tr>
</tbody>
</table>
<ul>
<li><strong>Hashing</strong>&nbsp;:
<ul>
<li><p><em>Descrizione</em>&nbsp;: utilizza una funzione hash per assegnare un numero a diverse categorie. Lo chiamiamo trucco dell’hashing.</p></li>
<li><p>Pro: utile per gestire molte categorie; larghezza fissa, riducendo la complessità.</p></li>
<li><p><em>Contro</em>&nbsp;: collisioni in cui diverse categorie vengono mappate sullo stesso hash.</p></li>
<li><p><em>Esempio</em>&nbsp;:</p></li>
</ul></li>
</ul>
<pre><code>df['Hashed_Value'] = df['colour'].apply(lambda x: hash(x) % 5)</code></pre>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>Valore_hashed</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>1</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>3</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>0</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>0</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>4</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>Esempio dataset con funzione di hashing</em></p>
</figcaption>
</figure>
<ul>
<li><strong>Leave-One-Out Encoding</strong>:
<ul>
<li><p>Mi piace usare questo metodo per codificare una categoria, perché mostra la connessione alla variabile target. Per evitare data leakage, troviamo il valore medio del target per una particolare categoria, senza includere il valore target della riga corrente.</p></li>
<li><p><em>Pro</em>&nbsp;: riduce il rischio rispetto alla codifica target.</p></li>
<li><p><em>Contro</em>&nbsp;: Il calcolo è più intenso.</p></li>
<li><p><em>Esempio</em>&nbsp;: in questo esempio aggiungiamo una variabile target</p></li>
</ul></li>
</ul>
<pre><code>import pandas as pd

df = pd.DataFrame({
    'ID': [1, 2, 3, 4, 5, 6],
    'colour': ['black', 'yellow', 'red', 'white', 'purple', 'yellow'],
    'target': [10, 20, 30, 40, 50, 10]
})</code></pre>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>target</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>10</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>20</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>30</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>40</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>50</td>
</tr>
<tr class="even">
<td>6</td>
<td>giallo</td>
<td>10</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>Il set di dati di input per il Leave-One-Out</em> encoding</p>
</figcaption>
</figure>
<pre><code>def loo_encode(row, df, column, target):
    temp_df = df[df[column] == row[column]]
    temp_df = temp_df[temp_df.index != row.name]
    if temp_df.empty:
        return df[target].mean()
    else:
        return temp_df[target].mean()

df['LOO_Encoded'] = df.apply(loo_encode, args=(df, 'colour', 'target'), axis=1)</code></pre>
<figure class="figure">
<table class="caption-top table">
<thead>
<tr class="header">
<th>ID</th>
<th>colore</th>
<th>target</th>
<th>LOO_Codificato</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>nero</td>
<td>10</td>
<td>26.666667</td>
</tr>
<tr class="even">
<td>2</td>
<td>giallo</td>
<td>20</td>
<td>10.000000</td>
</tr>
<tr class="odd">
<td>3</td>
<td>rosso</td>
<td>30</td>
<td>26.666667</td>
</tr>
<tr class="even">
<td>4</td>
<td>bianco</td>
<td>40</td>
<td>26.666667</td>
</tr>
<tr class="odd">
<td>5</td>
<td>viola</td>
<td>50</td>
<td>26.666667</td>
</tr>
<tr class="even">
<td>6</td>
<td>giallo</td>
<td>10</td>
<td>20.000000</td>
</tr>
</tbody>
</table>
<figcaption>
<p><em>La tabella risultato</em></p>
</figcaption>
</figure>
</section>
<section id="spunti-di-riflessione" class="level2">
<h2 class="anchored" data-anchor-id="spunti-di-riflessione">Spunti di riflessione</h2>
<p>Quando si sceglie un metodo di codifica, considerare il tipo di dati (nominali o ordinali), il tipo di modello (ad albero o lineare) e qualsiasi potenziale problema (fuga di dati, relazioni indesiderate). Durante i colloqui, mostrare la conoscenza di queste tecniche può far risaltare un candidato. Dimostra che comprendono bene l’ingegneria delle funzionalità.</p>
<p>Se ti e’ piaciuto questo articolo potrebbe anche piacerti questo:</p>
<p><img src="https://viscioletti.com/posts/come-scegliere-il-miglior-metodo-per-codificare-variabili-categoriali/images/federico_a_computer_sorting_a_dictionary_3fc39012-d61a-4c9c-8cfa-8b2631b7a0bc.png" class="img-fluid"></p>
<section id="code-snippets-python---how-to-sort-dictionary-values" class="level3">
<h3 class="anchored" data-anchor-id="code-snippets-python---how-to-sort-dictionary-values">Code Snippets: Python - How to sort dictionary values</h3>
<p>In this blog post, we will explore two methods to sort dictionary values, demonstrating their implementation and usage.</p>


</section>
</section>

 ]]></description>
  <category>ai</category>
  <category>data-science</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/come-scegliere-il-miglior-metodo-per-codificare-variabili-categoriali/</guid>
  <pubDate>Wed, 03 Jul 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/come-scegliere-il-miglior-metodo-per-codificare-variabili-categoriali/images/enigma_machine_ohe-e1697279524726.png" medium="image" type="image/png" height="72" width="144"/>
</item>
<item>
  <title>Autonomous Vehicles and Us: Love/Hate Story</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/</link>
  <description><![CDATA[ 





<p>Autonomous vehicles have transitioned from being a off vision, to an approaching reality thanks to the integration of AI technology. These self driving cars hold the promise of transforming transportation as we know it. Recently a thought provoking Twitter thread piqued my interest in how AI’s propelling this journey forward. Lets delve into the workings of vehicles the technologies driving them and the obstacles they must overcome. Get ready for an exhilarating journey into the future of transportation.</p>
<section id="table-of-contents" class="level2">
<h2 class="anchored" data-anchor-id="table-of-contents">Table of Contents</h2>
<ul>
<li>What Defines Autonomous Vehicles?
<ul>
<li>Different Levels of Autonomy</li>
</ul></li>
<li>Technologies Used in Autonomous Vehicles
<ul>
<li>Facing Challenges</li>
<li>Economic Implications</li>
<li>Field Testing and Trials</li>
</ul></li>
<li>Autonomous Vehicles Looking Forward</li>
<li>Example</li>
<li>Key Points</li>
<li>Stay Updated on Autonomous Vehicles</li>
</ul>
</section>
<section id="what-defines-autonomous-vehicles" class="level2">
<h2 class="anchored" data-anchor-id="what-defines-autonomous-vehicles">What Defines Autonomous Vehicles?</h2>
<p>At the heart of vehicles lie AI systems that possess the ability to perceive their surroundings and make instantaneous decisions. These systems leverage models and vast datasets to empower cars to “see” and “reason.” Through machine learning algorithms these vehicles can interpret information from their environment – including vehicles, pedestrians and road conditions – facilitating effective navigation.</p>
<section id="different-levels-of-autonomy" class="level3">
<h3 class="anchored" data-anchor-id="different-levels-of-autonomy">Different Levels of Autonomy</h3>
<p>The progression towards vehicles is segmented into five distinct levels;</p>
<p><strong>Level 0</strong> signifies no automation; all tasks remain solely within the realm of human drivers.<br>
<strong>Level 1</strong>; Driver assistance functionalities include features like cruise control and lane keeping assistance, for added convenience.</p>
<p><strong>Level 2</strong>; Semi automated. The car is able to control steering and speed. It still needs input.</p>
<p><strong>Level 3</strong>; automation. The car can manage tasks but humans are required to step in when needed.</p>
<p><strong>Level 4</strong>; Highly automated. In situations the vehicle can handle all driving activities without intervention.</p>
<p><strong>Level 5</strong>; automation. The car can drive itself under any circumstances, without involvement.</p>
<p>Currently most cars fall under Levels 2 and 3. Achieving Level 5 will require advancements, in technology. Gaining public trust.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/roberto-nickson-Ddjl0Cicdr4-unsplash-scaled-e1719437615212.jpg"><img src="https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/images/roberto-nickson-Ddjl0Cicdr4-unsplash-scaled-e1719437615212-1024x538.jpg" class="img-fluid figure-img"></a></p>
<figcaption>POV: Driving a Tesla in Malibu Beach</figcaption>
</figure>
</div>
<figcaption>
<p>Photo by <a href="https://unsplash.com/@rpnickson?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Roberto Nickson</a> on <a href="https://unsplash.com/photos/interior-view-of-tesla-car-Ddjl0Cicdr4?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></p>
</figcaption>
</figure>
</section>
</section>
<section id="technologies-used-in-autonomous-vehicles" class="level2">
<h2 class="anchored" data-anchor-id="technologies-used-in-autonomous-vehicles">Technologies Used in Autonomous Vehicles</h2>
<p>vehicles utilize lidar, radar, cameras and ultrasonic sensors to collect data. These technologies provide information to the vehicles AI system, which uses learning algorithms to analyze and respond to road conditions.<br>
Lidar technology uses laser beams to create 3D maps of the surroundings while radar measures the distance and speed of objects. Cameras capture information to help AI recognize objects and road signs and ultrasonic sensors assist in close range object detection during parking. By combining these technologies vehicles can navigate environments avoid obstacles and ensure passenger safety.</p>
<section id="facing-challenges" class="level3">
<h3 class="anchored" data-anchor-id="facing-challenges">Facing Challenges</h3>
<p>A hurdle, in autonomous vehicle development is AI ethics. How should an autonomous vehicle respond in emergencies? The use of ” algorithms” is crucial as they dictate the cars decision making in life or death situations. Another challenge lies in preparing AI for real world scenarios ranging from drivers to unexpected obstacles.</p>
</section>
<section id="economic-implications" class="level3">
<h3 class="anchored" data-anchor-id="economic-implications">Economic Implications</h3>
<p>The automation of transportation offers promises of efficiency and sustainability. Also raises concerns about job displacement in driving professions. Striking a balance between these impacts is crucial for acceptance. The introduction of vehicles could lead to job opportunities in technology and maintenance sectors while reducing the demand for human drivers.</p>
</section>
<section id="field-testing-and-trials" class="level3">
<h3 class="anchored" data-anchor-id="field-testing-and-trials">Field Testing and Trials</h3>
<p>Cities worldwide are serving as test sites, for self driving cars.<br>
These experiments help collect information and enhance AI algorithms, in real world scenarios. For instance Waymos extensive tests across cities in the US have offered insights into the practical obstacles of self driving cars.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/obi-pixel8propix-uAGTGDJaQU0-unsplash.jpg"><img src="https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/images/obi-pixel8propix-uAGTGDJaQU0-unsplash-1024x768.jpg" class="img-fluid figure-img"></a></p>
<figcaption>Autonomous Vehicles -Volkswagen ID.4 cockpit view</figcaption>
</figure>
</div>
<figcaption>
<p>Photo by <a href="https://unsplash.com/@obionyeador?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Obi - <span class="citation" data-cites="pixel8propix">@pixel8propix</span></a> on <a href="https://unsplash.com/photos/black-and-gray-car-steering-wheel-uAGTGDJaQU0?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></p>
</figcaption>
</figure>
</section>
</section>
<section id="autonomous-vehicles-looking-forward" class="level2">
<h2 class="anchored" data-anchor-id="autonomous-vehicles-looking-forward">Autonomous Vehicles Looking Forward</h2>
<p>The future of driverless vehicles shows promise. Comes with intricate cross disciplinary hurdles. Progress in 5G technology, the Internet of Things (IoT) and sophisticated AI models is propelling this advancement. It’s an exhilarating period for data experts and engineers engaged in these state of the art technologies.</p>
</section>
<section id="example" class="level2">
<h2 class="anchored" data-anchor-id="example">Example</h2>
<p>To demonstrate how AI functions in vehicles lets examine a straightforward Python illustration showcasing object detection using a pretrained deep learning model.</p>
<pre><code>import cv2
import numpy as np

# Load a pre-trained model for object detection
net = cv2.dnn.readNet('yolov3.weights', 'yolov3.cfg')
layer_names = net.getLayerNames()
output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]

# Load an image
img = cv2.imread('test_image.jpg')
height, width, channels = img.shape

# Detecting objects
blob = cv2.dnn.blobFromImage(img, 0.00392, (416, 416), (0, 0, 0), True, crop=False)
net.setInput(blob)
outs = net.forward(output_layers)

# Showing information on the screen
class_ids = []
confidences = []
boxes = []
for out in outs:
    for detection in out:
        scores = detection[5:]
        class_id = np.argmax(scores)
        confidence = scores[class_id]
        if confidence &gt; 0.5:
            center_x = int(detection[0] * width)
            center_y = int(detection[1] * height)
            w = int(detection[2] * width)
            h = int(detection[3] * height)
            x = int(center_x - w / 2)
            y = int(center_y - h / 2)
            boxes.append([x, y, w, h])
            confidences.append(float(confidence))
            class_ids.append(class_id)

# Apply non-max suppression
indexes = cv2.dnn.NMSBoxes(boxes, confidences, 0.5, 0.4)
for i in range(len(boxes)):
    if i in indexes:
        x, y, w, h = boxes[i]
        label = str(class_ids[i])
        cv2.rectangle(img, (x, y), (x + w, y + h), (0, 255, 0), 2)
        cv2.putText(img, label, (x, y + 30), cv2.FONT_HERSHEY_PLAIN, 3, (0, 255, 0), 3)

# Show the image
cv2.imshow("Image", img)
cv2.waitKey(0)
cv2.destroyAllWindows()</code></pre>
<p>This program showcases how a sophisticated neural network model can identify objects, in an image, an element in how self driving vehicles perceive their environment.</p>
<figure class="figure">
<p><img src="https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/images/chris-kursikowski-wRpxzcowfKk-unsplash-edited.jpg" class="img-fluid figure-img"></p>
<figcaption>
<p>Photo by <a href="https://unsplash.com/@c3k?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Chris Kursikowski</a> on <a href="https://unsplash.com/photos/person-holding-black-smartphone-during-daytime-wRpxzcowfKk?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash">Unsplash</a></p>
</figcaption>
</figure>
</section>
<section id="key-points" class="level2">
<h2 class="anchored" data-anchor-id="key-points">Key Points</h2>
<p>Self driving vehicles present a solution for transportation. By embracing and utilizing intelligence machine learning and sensor technologies we can progress towards a future where autonomous cars become mainstream. Whether you’re a data scientist or just starting out the process of developing self driving vehicles opens up opportunities for learning and innovation.</p>
</section>
<section id="stay-updated-on-autonomous-vehicles" class="level2">
<h2 class="anchored" data-anchor-id="stay-updated-on-autonomous-vehicles">Stay Updated on Autonomous Vehicles</h2>
<p>Interested in discussions, on AI and self driving cars? Feel free to connect with me on platforms to stay updated and gain insights.</p>
<ul>
<li><p>X/Twitter: <a href="https://x.com/feddernico" title="Follow me on X!"><span class="citation" data-cites="feddernico">@feddernico</span></a></p></li>
<li><p>Medium; <a href="https://medium.com/@federico.viscioletti" title="Follow me on Medium!"><span class="citation" data-cites="federico.viscioletti">@federico.viscioletti</span></a></p></li>
<li><p>Substack; <a href="https://feddernico.substack.com/" title="Feddernico">Feddernico</a></p></li>
</ul>
<p>Lets shape the future together!</p>


</section>

 ]]></description>
  <category>ai</category>
  <category>self-driving-cars</category>
  <guid>https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/</guid>
  <pubDate>Wed, 26 Jun 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/autonomous-vehicles-and-us-love-hate-story/images/DALL·E-2024-06-21-22.39.52-Create-a_6028105c.webp" medium="image" type="image/webp"/>
</item>
<item>
  <title>Love this Guide to Learning to Rank: RankNet, LambdaRank, and ListNet Explained</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/</link>
  <description><![CDATA[ 





<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231654585.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231654585.png" class="img-fluid"></a></p>
<p>Hey there, data enthusiasts! we’re diving into the fascinating world of Learning to Rank (LTR) methods—a crucial machine learning tool in the realm of information retrieval. Whether you’re a seasoned data scientist or just starting out, understanding LTR can significantly enhance your ability to provide users with the most relevant search results. Let’s break it down!</p>
<section id="introduction-to-learning-to-rank-methods" class="level2">
<h2 class="anchored" data-anchor-id="introduction-to-learning-to-rank-methods">Introduction to Learning to Rank methods</h2>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231708883.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231708883.png" class="img-fluid"></a></p>
<section id="definition-and-importance-in-information-retrieval" class="level3">
<h3 class="anchored" data-anchor-id="definition-and-importance-in-information-retrieval">Definition and importance in information retrieval</h3>
<p>Learning to Rank (LTR) is a supervised machine learning technique used to rank a list of documents or items based on their relevance score to a query or user.LTR is crucial in information retrieval and search engines, as it helps to provide users with the most relevant search results.</p>
</section>
</section>
<section id="understanding-learning-to-rank-methods" class="level2">
<h2 class="anchored" data-anchor-id="understanding-learning-to-rank-methods">Understanding Learning to Rank Methods</h2>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231718774.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231718774.png" class="img-fluid"></a></p>
<section id="pointwise-pairwise-ranking-and-listwise-approaches" class="level3">
<h3 class="anchored" data-anchor-id="pointwise-pairwise-ranking-and-listwise-approaches">Pointwise, Pairwise Ranking, and Listwise approaches</h3>
<p><strong>Pointwise approach</strong>: scores each document independently with a ground truth target value, similar to traditional regression and classification tasks.</p>
<p><strong>Pairwise ranking approach</strong>: scores each document based on a given query and considers the ranking position, used to overcome the drawbacks of pointwise ranking.</p>
<p><strong>Listwise approach</strong>: takes into account the list of ranked documents, along with their relevance labels, to learn relationships between items in a list.</p>
</section>
</section>
<section id="machine-learning-for-ranking" class="level2">
<h2 class="anchored" data-anchor-id="machine-learning-for-ranking">Machine Learning for Ranking</h2>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231730945.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231730945.png" class="img-fluid"></a></p>
<section id="training-data-preparation-and-optimisation" class="level3">
<h3 class="anchored" data-anchor-id="training-data-preparation-and-optimisation">Training data preparation and optimisation</h3>
<p>Training data consists of lists of items with some partial order specified between items in each list.The goal of constructing the ranking model is to rank new, unseen lists in a similar way to rankings in the training data. Optimisation is performed using gradient descent algorithm.</p>
</section>
<section id="loss-function-the-key-to-ranking-performance" class="level3">
<h3 class="anchored" data-anchor-id="loss-function-the-key-to-ranking-performance">Loss function: the key to ranking performance</h3>
<p>The choice of the loss function is the distinctive element for Learning to Rank machine learning models. Examples of loss functions include mean squared error, binary cross entropy loss, and classification loss on pairs of documents.</p>
</section>
<section id="choosing-the-right-loss-function-mse-bcel-and-cl-explained" class="level3">
<h3 class="anchored" data-anchor-id="choosing-the-right-loss-function-mse-bcel-and-cl-explained">Choosing the right loss function: MSE, BCEL, and CL Explained</h3>
<p>When it comes to machine learning, the choice of loss function can make or break your model’s performance. This is especially true in Learning to Rank methods (LTR), where the goal is to rank items accurately based on their relevance. Let’s dive into three commonly used loss functions—Mean Squared Error (MSE), Binary Cross-Entropy Loss (BCEL), and Classification Loss (CL)—and understand their differences and applications.</p>
<p><strong>Mean Squared Error (MSE)</strong></p>
<p><strong>Definition</strong>: Mean Squared Error measures the average squared difference between the predicted values and the actual values. It’s a widely used loss function for regression tasks.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231740462.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231740462.png" class="img-fluid"></a></p>
<p>where \( y_i \) is the actual value and \( \hat{y}_i \) is the predicted value.</p>
<p><strong>Use Case</strong>: MSE is particularly useful when you want your model to predict exact numerical values and is less effective for classification or ranking tasks where the focus is on relative order rather than exact predictions.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Simple and intuitive.</p></li>
<li><p>Penalises larger errors more heavily, which can lead to more precise predictions.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Sensitive to outliers, as large errors disproportionately affect the MSE.</li>
</ul>
<p><strong>Example</strong>: In a regression task predicting house prices, MSE helps ensure the predicted prices are as close as possible to the actual prices.</p>
<p><strong>Binary Cross-Entropy Loss (BCEL)</strong></p>
<p><strong>Definition</strong>: Binary Cross-Entropy Loss, also known as Log Loss, measures the performance of a classification model whose output is a probability value between 0 and 1. It’s commonly used for binary classification tasks.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231807491.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231807491.png" class="img-fluid"></a></p>
<p>where <strong>yi</strong> is the actual binary label (0 or 1) and <strong>y-hat</strong> is the predicted probability.</p>
<p><strong>Use Case</strong>: BCEL is ideal for binary classification problems, including spam detection, medical diagnoses (e.g., disease vs.&nbsp;no disease), and learning to rank where each item is independently scored.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Provides probability outputs, which can be useful for threshold-based decision making.</p></li>
<li><p>Penalises confident but incorrect predictions more than less confident ones.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Can be sensitive to class imbalance if not handled properly.</li>
</ul>
<p><strong>Example</strong>: In a spam detection system, BCEL helps distinguish between spam and non-spam emails by outputting probabilities.</p>
<p><strong>Classification Loss (CL)</strong></p>
<p><strong>Definition</strong>: Classification Loss, often referred to in the context of pairwise ranking as hinge loss or pairwise logistic loss, focuses on the correct ranking order between pairs of items.</p>
<p><strong>Pairwise Logistic Loss Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231829764.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231829764.png" class="img-fluid"></a></p>
<p>where <strong>si</strong> and <strong>sj</strong> are the scores of items <strong>i</strong> and <strong>j</strong>, respectively, and <strong>P</strong> is the set of item pairs.</p>
<p><strong>Use Case</strong>: CL is particularly useful in learning to rank scenarios where the goal is to optimise the order of items based on their relevance, such as search engine results and recommendation systems.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Directly optimises ranking performance by focusing on the relative order of items.</p></li>
<li><p>Reduces the impact of outliers compared to MSE.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Requires careful selection of item pairs, which can be computationally intensive.</li>
</ul>
<p><strong>Example</strong>: In a search engine, CL ensures that more relevant documents are ranked higher than less relevant ones, improving the overall user experience.</p>
<section id="choosing-the-right-loss-function" class="level4">
<h4 class="anchored" data-anchor-id="choosing-the-right-loss-function">Choosing the Right Loss Function</h4>
<ul>
<li><p><strong>Use MSE</strong>: When your primary goal is to predict precise numerical values and the importance of each prediction is equal.</p></li>
<li><p><strong>Use BCEL</strong>: When dealing with binary classification problems and you need probability outputs for further decision-making processes.</p></li>
<li><p><strong>Use CL</strong>: When the task involves ranking items, and the primary objective is to get the order right rather than the exact scores.</p></li>
</ul>
<p>Each loss function has its strengths and specific use cases. Understanding the nuances of MSE, BCEL, and CL helps you choose the most appropriate one for your particular machine learning problem, leading to better model performance and more accurate predictions.</p>
</section>
</section>
</section>
<section id="approaches-to-learning-to-rank" class="level2">
<h2 class="anchored" data-anchor-id="approaches-to-learning-to-rank">Approaches to Learning to Rank</h2>
<section id="neural-network-based-and-gradient-based-methods" class="level3">
<h3 class="anchored" data-anchor-id="neural-network-based-and-gradient-based-methods">Neural network-based and gradient-based methods</h3>
<p><strong>RankNet</strong> uses Binary cross entropy loss where the model outputs probabilities using logistic function.</p>
<p><strong>RankNet:</strong> Example in python</p>
<pre><code>import torch
import torch.nn as nn
import torch.optim as optim

class RankNet(nn.Module):
    def __init__(self, input_size):
        super(RankNet, self).__init__()
        self.linear = nn.Linear(input_size, 1)
        self.sigmoid = nn.Sigmoid()

    def forward(self, x):
        return self.sigmoid(self.linear(x))

# Example usage
input_size = 10
model = RankNet(input_size)
criterion = nn.BCELoss()
optimizer = optim.Adam(model.parameters(), lr=0.001)

# Dummy data: pairs of documents with features and their relevance
x1 = torch.rand((5, input_size))
x2 = torch.rand((5, input_size))
y = torch.tensor([1, 0, 1, 1, 0], dtype=torch.float32)  # 1 if x1 is more relevant than x2, else 0

# Training loop
for epoch in range(100):
    optimizer.zero_grad()
    s1 = model(x1)
    s2 = model(x2)
    p = s1 / (s1 + s2)
    loss = criterion(p, y)
    loss.backward()
    optimizer.step()

print(f'Trained RankNet Model: {model}')</code></pre>
<p><strong>LambdaRank</strong> defines the gradients of an implicit loss function so that documents with high rank have much bigger gradients.ListNet proposes a new learning method for optimising the listwise loss function based on the top k probability.</p>
<p>LambdaRank: Example in</p>
</section>
</section>
<section id="overcoming-challenges-in-learning-to-rank" class="level2">
<h2 class="anchored" data-anchor-id="overcoming-challenges-in-learning-to-rank">Overcoming Challenges in Learning to Rank</h2>
<section id="position-bias-and-distributed-training" class="level3">
<h3 class="anchored" data-anchor-id="position-bias-and-distributed-training">Position bias and distributed training</h3>
<p>Position bias is a common issue in learning to rank, where user clicks are biased towards higher-ranked results.</p>
<p>XGBoost implements the Unbiased LambdaMART algorithm to debias position-dependent click data. Distributed training is implemented with integration of multiple frameworks, including Dask, Spark, and PySpark.</p>
</section>
</section>
<section id="evaluating-and-refining-ranking-models" class="level2">
<h2 class="anchored" data-anchor-id="evaluating-and-refining-ranking-models">Evaluating and Refining Ranking Models</h2>
<section id="metrics-for-ranking-performance-and-best-practices" class="level3">
<h3 class="anchored" data-anchor-id="metrics-for-ranking-performance-and-best-practices">Metrics for ranking performance and best practices</h3>
<p>Evaluation measures include DCG, NDCG, MAP, MRR, and precision. The goal of constructing the ranking model is to rank new, unseen lists in a similar way to rankings in the training data.</p>
<p>Selecting and designing good features is an important area in machine learning, which is called feature engineering.</p>
<p>### Understanding Evaluation Measures: DCG, NDCG, MAP, MRR, and Precision</p>
<p>Evaluating the performance of ranking models is crucial to ensure they meet the desired objectives. Different evaluation measures serve different purposes and provide various insights into how well your model ranks items. Let’s break down five commonly used evaluation measures: Discounted Cumulative Gain (DCG), Normalized DCG (NDCG), Mean Average Precision (MAP), Mean Reciprocal Rank (MRR), and Precision.</p>
<p><strong>Discounted Cumulative Gain (DCG)</strong></p>
<p><strong>Definition</strong>: DCG is a measure of ranking quality that evaluates the relevance of a document based on its position in the result list. The gain is accumulated from the top of the list to the bottom, with the gain of each result discounted at lower ranks.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231845222.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231845222.png" class="img-fluid"></a></p>
<p>where <strong>rel-i</strong> is the relevance score of the result at position <strong>i</strong>.</p>
<p><strong>Use Case</strong>: DCG is useful for evaluating the relevance of documents retrieved by search engines, where higher-ranked documents are more important.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Takes into account the position of relevant documents.</p></li>
<li><p>Higher relevance scores at the top of the list have a larger impact.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Raw DCG scores can be difficult to interpret without normalization.</li>
</ul>
<p><strong>Normalized Discounted Cumulative Gain (NDCG)</strong></p>
<p><strong>Definition</strong>: NDCG normalizes the DCG score, making it easier to compare across different queries with varying numbers of results and relevance scales. NDCG is typically used to evaluate the performance of a search engine or recommendation system.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231855745.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231855745.png" class="img-fluid"></a></p>
<p>where IDCG is the ideal DCG, which is the maximum possible DCG score for a perfect ranking.</p>
<p><strong>Use Case</strong>: NDCG is ideal for comparing the effectiveness of different ranking algorithms on the same dataset.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Provides a normalized score between 0 and 1, facilitating easier comparison.</p></li>
<li><p>Reflects the quality of the ranking across different queries.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Requires calculation of the ideal ranking (IDCG).</li>
</ul>
<p><strong>Mean Average Precision (MAP)</strong></p>
<p><strong>Definition</strong>: MAP calculates the mean of the average precision scores for each query. Average Precision (AP) is the average of precision values at the ranks where relevant documents appear.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231909481.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231909481.png" class="img-fluid"></a></p>
<p>where <strong>Q</strong> is the number of queries and \( \text{AP}(q) \) is the average precision for query \( q \).</p>
<p><strong>Use Case</strong>: MAP is commonly used in information retrieval tasks to evaluate the overall precision of a ranking system across multiple queries.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Combines precision across all relevant documents.</p></li>
<li><p>Provides a single score to evaluate the performance across multiple queries.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Sensitive to the number of relevant documents per query.</li>
</ul>
<p><strong>Mean Reciprocal Rank (MRR)</strong></p>
<p><strong>Definition</strong>: MRR measures the average of the reciprocal ranks of the first relevant document for a set of queries. It focuses on how early the first relevant document appears in the ranking.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231922141.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231922141.png" class="img-fluid"></a></p>
<p>where <strong>rankq</strong> is the rank position of the first relevant document for query <strong>q</strong>.</p>
<p><strong>Use Case</strong>: MRR is useful when the primary goal is to find the first relevant result quickly.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Simple and intuitive.</p></li>
<li><p>Highlights the importance of early relevant documents.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li>Only considers the first relevant document, ignoring the rest.</li>
</ul>
<p><strong>Precision</strong></p>
<p><strong>Definition</strong>: Precision measures the proportion of relevant documents among the retrieved documents. It’s a fundamental measure in information retrieval.</p>
<p><strong>Formula</strong>:</p>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/06/image_2024-06-12_231931765.png"><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231931765.png" class="img-fluid"></a></p>
<p><strong>Use Case</strong>: Precision is essential when the focus is on the accuracy of the retrieved documents rather than their ranking.</p>
<p><strong>Pros</strong>:</p>
<ul>
<li><p>Easy to understand and compute.</p></li>
<li><p>Directly measures retrieval accuracy.</p></li>
</ul>
<p><strong>Cons</strong>:</p>
<ul>
<li><p>Does not account for the position of relevant documents.</p></li>
<li><p>Can be misleading if used alone, as it ignores recall (the proportion of relevant documents that are retrieved).</p></li>
</ul>
<p><strong>Summary</strong></p>
<ul>
<li><p><strong>DCG</strong>: Measures ranking quality considering the position of relevant documents.</p></li>
<li><p><strong>NDCG</strong>: Normalised version of DCG for easier comparison.</p></li>
<li><p><strong>MAP</strong>: Mean of average precision scores across multiple queries, combining precision across all relevant documents.</p></li>
<li><p><strong>MRR</strong>: Focuses on the rank of the first relevant document.</p></li>
<li><p>P<strong>recision</strong>: Proportion of relevant documents among retrieved documents.</p></li>
</ul>
<p>Each evaluation measure provides unique insights, and choosing the right one depends on the specific objectives and requirements of your application. Combining these metrics can offer a more comprehensive evaluation of your ranking system’s effectiveness.</p>
</section>
</section>
<section id="recommendations" class="level2">
<h2 class="anchored" data-anchor-id="recommendations">Recommendations</h2>
<p>If you are looking for other machine learning articles, you might also find this one interesting:</p>
<p><img src="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/customer_reviews_forensics.png" class="img-fluid"></p>
<section id="customer-reviews-forensics-an-approach-to-stunning-expert-insights" class="level3">
<h3 class="anchored" data-anchor-id="customer-reviews-forensics-an-approach-to-stunning-expert-insights">Customer Reviews Forensics: An Approach To Stunning Expert Insights</h3>
<p>Customer Reviews: Why They Matter In a competitive market understanding customer reviews is crucial for enhancing product offerings and customer satisfaction. This article outlines an analysis of user reviews from a leading software provider, focusing on methodological approaches to dissect user sentiment and providing strategic recommendations. The Data Source The dataset used for this analysis contains reviews from Google. The key fields include: Customer Reviews: Methodology Used The dataset comprised user reviews, complete with ratings, text feedback, and other reviewer demographics. The analysis followed these steps: Customer Reviews: Findings Positive Feedback Analysis showed that satisfied users frequently highlighted several aspects: […]</p>
<p><a href="https://viscioletti.com/2024/01/peak-performance-modeling-harnessing-bagging-and-boosting-for-superior-results/"></a></p>
</section>
</section>
<section id="lets-connect" class="level2">
<h2 class="anchored" data-anchor-id="lets-connect">Let’s Connect</h2>
<p>I’d love to hear your thoughts on this fascinating topic!</p>
<p>Feel free to connect with me on Twitter at <a href="https://twitter.com/feddernico">https://twitter.com/feddernico</a> or explore more of my content on Medium <a href="https://medium.com/@federico.viscioletti">https://medium.com/<span class="citation" data-cites="federico.viscioletti">@federico.viscioletti</span></a> and Substack <a href="https://feddernico.substack.com/">https://feddernico.substack.com</a></p>
<p>Happy learning!</p>


</section>

 ]]></description>
  <category>ai</category>
  <category>data-science</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/</guid>
  <pubDate>Wed, 12 Jun 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/love-this-guide-to-learning-to-rank-ranknet-lambdarank-and-listnet-explained/images/image_2024-06-12_231654585.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>AI Made Easy: Decision Trees for Data Science Success</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/ai-made-easy-decision-trees-for-data-science-success/</link>
  <description><![CDATA[ 





<p>In the world of Data Science and AI, it’s exciting to discover that sometimes even simple algorithms can help make sense of complex datasets. Imagine a world where you make decisions with the help of Decision Trees!</p>
<section id="decision-trees-a-simple-yet-powerful-tool" class="level2">
<h2 class="anchored" data-anchor-id="decision-trees-a-simple-yet-powerful-tool">Decision Trees: A Simple Yet Powerful Tool</h2>
<p>Decision trees are a fundamental concept in the machine learning realm. Picture a tree with branches that represent choices and leaves that signify conclusions. This visual representation makes the decision-making process very simple. Starting from the root, the tree evaluates the data and progresses down the branches, making decisions based on the given features. This intuitive algorithm is a jack-of-all-trades, excelling in both classification and regression tasks.</p>
<section id="how-does-it-work" class="level3">
<h3 class="anchored" data-anchor-id="how-does-it-work">How Does It Work?</h3>
<p>Let’s delve a little deeper into the magic of Decision Trees. These algorithms work by splitting data into distinct groups based on specific features. Each split creates new branches, leading to different decisions. This process is like a thoughtful interview, asking precise questions to reach the correct conclusion. The tree continues to grow and branch out until it reaches a decision at the leaves.</p>
</section>
<section id="the-versatility-of-decision-trees" class="level3">
<h3 class="anchored" data-anchor-id="the-versatility-of-decision-trees">The Versatility of Decision Trees</h3>
<p>The best part about Decision Trees? Their versatility knows no bounds! They’re not picky about the type of data they analyze. They handle both numbers and categories. And that’s not all—they’re also a breeze to visualise, giving us a clear understanding of the decision-making process. It’s like having a colleague who can explain complex decisions in a simple, step-by-step manner.</p>
<p>Also, Decision Trees form the foundation for more intricate algorithms, such as Random Forests. They’re a crucial concept for anyone interested in exploring the world of machine learning and AI.</p>
</section>
</section>
<section id="examples-in-action" class="level2">
<h2 class="anchored" data-anchor-id="examples-in-action">Examples in Action</h2>
<p>Let’s translate these concepts into practical examples using Python. Consider the following script, which demonstrates how Decision Trees can be applied to a dataset using scikit-learn, a popular machine learning library in Python.</p>
<pre><code># Import necessary libraries
from sklearn.tree import DecisionTreeClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split

# Load the Iris dataset and split it into training and testing sets
iris = load_iris()
X_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target, test_size=0.2, random_state=0)

# Create a Decision Tree Classifier
dtree = DecisionTreeClassifier()
dtree.fit(X_train, y_train)

# Predict using the Decision Tree
predictions = dtree.predict(X_test)
print(predictions)</code></pre>
<p>This code snippet uses the Iris dataset and trains a simple Decision Tree Classifier. We can see the model in action by making predictions on the test data. Easy, right?</p>
</section>
<section id="key-takeaways" class="level2">
<h2 class="anchored" data-anchor-id="key-takeaways">Key Takeaways</h2>
<p>Decision Trees are a robust and versatile tool for anyone tackling machine learning projects. Their ability to handle diverse datasets and simplify decisions makes them a valuable addition to your arsenal. With Decision Trees, you can approach complex problems and unlock valuable insights.</p>
</section>
<section id="recommendations" class="level2">
<h2 class="anchored" data-anchor-id="recommendations">Recommendations</h2>
<p>If you like this article, you might also find this one interesting</p>
<p><img src="https://viscioletti.com/posts/ai-made-easy-decision-trees-for-data-science-success/images/DALL·E-2024-01-31-22.55.39-Create-a-c_07cfcec0.png" class="img-fluid"></p>
<section id="peak-performance-modeling-harnessing-bagging-and-boosting-for-superior-results" class="level3">
<h3 class="anchored" data-anchor-id="peak-performance-modeling-harnessing-bagging-and-boosting-for-superior-results">Peak Performance Modeling: Harnessing Bagging and Boosting for Superior Results</h3>
<p>In the world of machine learning, two key ensemble techniques stand out. They can improve model performance. They are: bagging and boosting. But how do you decide which one to use? Let’s break it down.</p>
</section>
</section>
<section id="lets-connect" class="level2">
<h2 class="anchored" data-anchor-id="lets-connect">Let’s Connect</h2>
<p>I’d love to hear your thoughts on this fascinating topic!</p>
<p>Feel free to connect with me on Twitter at <a href="https://twitter.com/feddernico">https://twitter.com/feddernico</a> or explore more of my content on Medium <a href="https://medium.com/@federico.viscioletti">https://medium.com/<span class="citation" data-cites="federico.viscioletti">@federico.viscioletti</span></a> and Substack <a href="https://feddernico.substack.com">https://feddernico.substack.com</a></p>
<p>Happy learning!</p>


</section>

 ]]></description>
  <guid>https://viscioletti.com/posts/ai-made-easy-decision-trees-for-data-science-success/</guid>
  <pubDate>Sat, 08 Jun 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/ai-made-easy-decision-trees-for-data-science-success/images/decision_tree_branching_1.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>How to Handle Missing Data in Machine Learning (Part 1)</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-1/</link>
  <description><![CDATA[ 





<section id="introduction" class="level1">
<h1>Introduction</h1>
<p>In the world of data science, missing data is a common issue that can impact the performance of machine learning models. In data scientist job interviews, I often ask candidates how they would handle missing data in a machine learning project. Surprisingly, many struggle to choose the most appropriate method. This article explores various techniques to handle missing data and helps you understand their pros and cons.</p>
</section>
<section id="why-missing-data-matters" class="level1">
<h1>Why Missing Data Matters</h1>
<p>Missing data can introduce bias, reduce statistical power, and lead to inaccurate conclusions. It’s crucial to handle it properly to ensure the robustness of your models.</p>
</section>
<section id="common-methods-to-handle-missing-data" class="level1">
<h1>Common Methods to Handle Missing Data</h1>
<section id="deletion-methods" class="level2">
<h2 class="anchored" data-anchor-id="deletion-methods">1. Deletion Methods</h2>
<section id="listwise-deletion---handle-missing-data" class="level3">
<h3 class="anchored" data-anchor-id="listwise-deletion---handle-missing-data">Listwise Deletion - Handle Missing Data</h3>
<p>Listwise deletion is also called complete case analysis. It involves removing any row with at least one missing value.&nbsp;</p>
<ul>
<li><p><strong>Pros</strong>: It’s simple to put in place.</p></li>
<li><p><strong>Cons</strong>: It can lead to significant data loss, especially with large datasets.</p></li>
</ul>
<pre><code>df.dropna(inplace=True)</code></pre>
</section>
<section id="pairwise-deletion---handle-missing-data" class="level3">
<h3 class="anchored" data-anchor-id="pairwise-deletion---handle-missing-data">Pairwise Deletion - Handle Missing Data</h3>
<p>Pairwise deletion, on the other hand, allows the analysis to use all available data without discarding entire rows. It only removes the missing data points for the specific analysis being performed, preserving as much data as possible.</p>
<ul>
<li><p><strong>Pros</strong>: Retains more data compared to listwise deletion.</p></li>
<li><p><strong>Cons</strong>:<br>
Can complicate analysis and lead to inconsistencies.<br>
The sample size can vary based on the variables.</p></li>
</ul>
</section>
</section>
<section id="imputation-methods" class="level2">
<h2 class="anchored" data-anchor-id="imputation-methods">2. Imputation Methods</h2>
<section id="meanmedian-imputation---handle-missing-data" class="level3">
<h3 class="anchored" data-anchor-id="meanmedian-imputation---handle-missing-data">Mean/Median Imputation - Handle Missing Data</h3>
<p>Mean or median imputation involves replacing missing values with the mean or median of the observed values for that variable.</p>
<ul>
<li><p><strong>Pros</strong>: It’s easy to implement, suitable for numerical data.</p></li>
<li><p><strong>Cons</strong>: It can introduce bias, it underestimates variability.</p></li>
</ul>
<pre><code>df['column'].fillna(df['column'].mean(), inplace=True)</code></pre>
</section>
<section id="mode-imputation" class="level3">
<h3 class="anchored" data-anchor-id="mode-imputation">Mode Imputation</h3>
<p>Mode imputation is used for categorical data, where missing values are replaced with the most frequent value (the mode) in the dataset.</p>
<ul>
<li><p><strong>Pros</strong>: Simple and effective for categorical data.</p></li>
<li><p><strong>Cons</strong>: Can distort frequency distributions.</p></li>
</ul>
<pre><code>df['column'].fillna(df['column'].mode()[0], inplace=True)</code></pre>
</section>
<section id="k-nearest-neighbours-knn-imputation" class="level3">
<h3 class="anchored" data-anchor-id="k-nearest-neighbours-knn-imputation">K-Nearest Neighbours (KNN) Imputation</h3>
<p>KNN imputation uses the values from the k-nearest neighbours (similar data points) to fill in missing values.</p>
<ul>
<li><p><strong>Pros</strong>: Can provide more accurate imputations by considering the similarity of samples.</p></li>
<li><p><strong>Cons</strong>: Computationally intensive, sensitive to outliers.</p></li>
</ul>
<pre><code>from sklearn.impute import KNNImputer

imputer = KNNImputer(n_neighbors=5)
df_filled = imputer.fit_transform(df)</code></pre>
</section>
<section id="many-imputation" class="level3">
<h3 class="anchored" data-anchor-id="many-imputation">Many Imputation</h3>
<p>Imputation often involves creating many imputed datasets. You then combine the results to account for the uncertainty in the imputations.</p>
<ul>
<li><p><strong>Pros</strong>: Accounts for uncertainty, produces robust estimates.</p></li>
<li><p><strong>Cons</strong>: More complex and time-consuming.</p></li>
</ul>
<pre><code>from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer

imputer = IterativeImputer()
df_filled = imputer.fit_transform(df)</code></pre>
</section>
</section>
<section id="advanced-imputation-techniques-e.g.-mice-predictive-mean-matching" class="level2">
<h2 class="anchored" data-anchor-id="advanced-imputation-techniques-e.g.-mice-predictive-mean-matching">Advanced Imputation Techniques (e.g., MICE, Predictive Mean Matching)</h2>
<p>Advanced imputation techniques, such as Multiple Imputation by Chained Equations (MICE) and Predictive Mean Matching, consider the relationships between variables to provide highly accurate imputations.</p>
<ul>
<li><p><strong>Pros</strong>: Highly accurate, considers relationships between variables.</p></li>
<li><p><strong>Cons</strong>: Requires more computational resources and expertise.</p></li>
</ul>
</section>
<section id="model-based-methods" class="level2">
<h2 class="anchored" data-anchor-id="model-based-methods">3. <strong>Model-Based Methods</strong></h2>
<section id="using-algorithms-that-handle-missing-data" class="level3">
<h3 class="anchored" data-anchor-id="using-algorithms-that-handle-missing-data">Using Algorithms that Handle Missing Data</h3>
<p>Some machine learning algorithms, such as XGBoost, handle missing data internally. They do this by treating missing values as a separate category or by using them to leverage the algorithm’s built-in capabilities.</p>
<ul>
<li><p><strong>Pros</strong>: Simplifies the process, leverages the algorithm’s capability.</p></li>
<li><p><strong>Cons</strong>: Limited to specific algorithms.</p></li>
</ul>
</section>
</section>
</section>
<section id="choosing-the-right-method" class="level1">
<h1>Choosing the Right Method</h1>
<p>When deciding how to handle missing data, consider the type of data, the percentage of missing values, and the impact on your analysis. For instance, mean imputation might be good for small datasets with few missing values. Multiple imputation is better for larger datasets with more missing data.</p>
<p>Curious to see these methods in action and compare their effectiveness? <a href="https://viscioletti.com/2024/05/how-to-handle-missing-data-in-machine-learning-part-2/">Check out Part 2 of this article</a>. We’ll use the Titanic dataset to demonstrate and analyse different imputation techniques.</p>
</section>
<section id="lets-connect" class="level1">
<h1>Let’s Connect</h1>
<p>You can also find me on:</p>
<ul>
<li><p>X/Twitter: <a href="https://x.com/feddernico" title="@feddernico"><span class="citation" data-cites="feddernico">@feddernico</span></a></p></li>
<li><p>Medium: <a href="https://medium.com/@federico.viscioletti" title="@federico.viscioletti"><span class="citation" data-cites="federico.viscioletti">@federico.viscioletti</span></a></p></li>
<li><p>Substack: <a href="https://feddernico.substack.com/">https://feddernico.substack.com/</a></p></li>
</ul>


</section>

 ]]></description>
  <category>ai</category>
  <category>data-science</category>
  <guid>https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-1/</guid>
  <pubDate>Wed, 29 May 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-1/images/how_to_handle_missing_data_in_ml.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>How to Handle Missing Data in Machine Learning (Part 2)</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-2/</link>
  <description><![CDATA[ 





<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>In this part, I’ll walk you through a practical example about how to handle missing data using a dataset with missing values. I will show different imputation techniques and discuss their impacts.</p>
</section>
<section id="practical-examples" class="level1">
<h1>Practical Examples</h1>
<p>Let’s walk through a practical example using a dataset with missing values. We will demonstrate different imputation techniques and discuss their impacts.</p>
<section id="example-handle-missing-data-in-the-titanic-dataset" class="level3">
<h3 class="anchored" data-anchor-id="example-handle-missing-data-in-the-titanic-dataset">Example: Handle Missing Data in the Titanic dataset</h3>
<p>I will now demonstrate different imputation techniques using the Titanic dataset, which includes missing values in columns like <em>Age</em> and <em>Embarked</em>.</p>
<pre><code>import pandas as pd
import seaborn as sns
from sklearn.impute import SimpleImputer, KNNImputer
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
from sklearn.model_selection import train_test_split

# Load the Titanic dataset
df = sns.load_dataset('titanic')</code></pre>
<p>Now let’s have a look at the top 5 the rows of the dataframe:</p>
<pre><code>df.head(5)</code></pre>
<figure class="figure">
<table class="caption-top table">
<colgroup>
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
<col style="width: 6%">
</colgroup>
<thead>
<tr class="header">
<th>survived</th>
<th>pclass</th>
<th>sex</th>
<th>age</th>
<th>sibsp</th>
<th>parch</th>
<th>fare</th>
<th>embarked</th>
<th>class</th>
<th>who</th>
<th>adult_male</th>
<th>deck</th>
<th>embark_town</th>
<th>alive</th>
<th>alone</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>0</td>
<td>3</td>
<td>male</td>
<td>22.0</td>
<td>1</td>
<td>0</td>
<td>2,027777778</td>
<td>S</td>
<td>Third</td>
<td>man</td>
<td>TRUE</td>
<td>NaN</td>
<td>Southampton</td>
<td>no</td>
<td>FALSE</td>
</tr>
<tr class="even">
<td>1</td>
<td>1</td>
<td>female</td>
<td>38.0</td>
<td>1</td>
<td>0</td>
<td>4,925694444</td>
<td>C</td>
<td>First</td>
<td>woman</td>
<td>FALSE</td>
<td>C</td>
<td>Cherbourg</td>
<td>yes</td>
<td>FALSE</td>
</tr>
<tr class="odd">
<td>1</td>
<td>3</td>
<td>female</td>
<td>26.0</td>
<td>0</td>
<td>0</td>
<td>6,715277778</td>
<td>S</td>
<td>Third</td>
<td>woman</td>
<td>FALSE</td>
<td>NaN</td>
<td>Southampton</td>
<td>yes</td>
<td>TRUE</td>
</tr>
<tr class="even">
<td>1</td>
<td>1</td>
<td>female</td>
<td>35.0</td>
<td>1</td>
<td>0</td>
<td>2,902777778</td>
<td>S</td>
<td>First</td>
<td>woman</td>
<td>FALSE</td>
<td>C</td>
<td>Southampton</td>
<td>yes</td>
<td>FALSE</td>
</tr>
<tr class="odd">
<td>0</td>
<td>3</td>
<td>male</td>
<td>35.0</td>
<td>0</td>
<td>0</td>
<td>0,6805555556</td>
<td>S</td>
<td>Third</td>
<td>man</td>
<td>TRUE</td>
<td>NaN</td>
<td>Southampton</td>
<td>no</td>
<td>TRUE</td>
</tr>
</tbody>
</table>
<figcaption>
<p>The initial records of the titanic dataset</p>
</figcaption>
</figure>
</section>
<section id="checking-missing-data" class="level2">
<h2 class="anchored" data-anchor-id="checking-missing-data">Checking Missing Data</h2>
<p>Let’s check for missing data:</p>
<pre><code>df.isnull().sum()</code></pre>
<p>which gives:</p>
<pre><code>survived         0
pclass           0
sex              0
age            177
sibsp            0
parch            0
fare             0
embarked         2
class            0
who              0
adult_male       0
deck           688
embark_town      2
alive            0
alone            0
dtype: int64</code></pre>
<p>Then, let’s split the dataset into training and test set:</p>
<pre><code># Select features and target variable
features = ['pclass', 'sex', 'age', 'sibsp', 'parch', 'fare', 'embarked']
target = 'survived'

# Convert categorical features to numeric
df['sex'] = df['sex'].map({'male': 0, 'female': 1})
df['embarked'] = df['embarked'].map({'C': 0, 'Q': 1, 'S': 2})

# Split the dataset
X = df[features]
y = df[target]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# Display the shape of the resulting datasets
print(f'Training set shape: {X_train.shape}')
print(f'Testing set shape: {X_test.shape}')</code></pre>
<p>Which will output:</p>
<pre><code>&gt;&gt;&gt; Training set shape: (712, 7)
&gt;&gt;&gt; Testing set shape: (179, 7)</code></pre>
</section>
<section id="imputing-the-missing-data" class="level2">
<h2 class="anchored" data-anchor-id="imputing-the-missing-data">Imputing The Missing Data</h2>
<p>Now, we will apply all the different missing imputation techniques</p>
<pre><code># Mean Imputation for 'Age'
mean_imputer = SimpleImputer(strategy='mean')
X_train['age_mean'] = mean_imputer.fit_transform(X_train[['age']])
X_test['age_mean'] = mean_imputer.transform(X_test[['age']])

# Median Imputation for 'Age'
median_imputer = SimpleImputer(strategy='median')
X_train['age_median'] = median_imputer.fit_transform(X_train[['age']])
X_test['age_median'] = median_imputer.transform(X_test[['age']])

# KNN Imputation for 'Age' and 'Fare'
knn_imputer = KNNImputer(n_neighbors=5)
X_train[['age_knn', 'fare_knn']] = knn_imputer.fit_transform(X_train[['age', 'fare']])
X_test[['age_knn', 'fare_knn']] = knn_imputer.transform(X_test[['age', 'fare']])

# MICE Imputation for 'Age'
mice_imputer = IterativeImputer()
X_train['age_mice'] = mice_imputer.fit_transform(X_train[['age']])
X_test['age_mice'] = mice_imputer.transform(X_test[['age']])</code></pre>
<p>Now, let’s compare all the various results:</p>
<pre><code>import matplotlib.pyplot as plt
import seaborn as sns

# Plot the original and imputed 'Age' distributions
plt.figure(figsize=(12, 6))
sns.kdeplot(df['age'], label='Original Age', color='blue', fill=True)
sns.kdeplot(df['Age_mean'], label='Mean Imputed Age', color='red', linestyle='--', fill=True)
sns.kdeplot(df['Age_knn'], label='KNN Imputed Age', color='green', linestyle='--', fill=True)
sns.kdeplot(df['Age_mice'], label='MICE Imputed Age', color='purple', linestyle='--', fill=True)
plt.legend()
plt.title('Comparison of Age Distributions After Imputation')
plt.show()
</code></pre>
<p><a href="https://viscioletti.com/wp-content/uploads/2024/05/missing_data_comparison.png"><img src="https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-2/images/missing_data_comparison.png" class="img-fluid"></a></p>
<p>As it’s possible to see on the chart, it looks like that in this case the KNN imputer is the one which is closer to the distribution of the original variable age to be imputed.</p>
</section>
</section>
<section id="food-for-thoughts" class="level1">
<h1>Food for Thoughts</h1>
<p>To handle missing data is a critical skill for data scientists. Understanding the advantages and limitations of each method helps in making informed decisions. During interviews, knowing these techniques can make a candidate stand out. It shows their expertise in data prep and model building.</p>
<p>Use these methods well. They will keep your data safe and your models reliable.</p>
<p>If you liked this article, you might also like this one about <a href="https://viscioletti.com/2023/10/how-to-choose-the-best-categorical-encoding-method/" title="How to Choose the Best Categorical Encoding Method">How to Choose the Best Categorical Encoding Method</a></p>
</section>
<section id="lets-connect" class="level1">
<h1>Let’s Connect</h1>
<p>You can also find me on:</p>
<ul>
<li><p>X/Twitter: <a href="https://x.com/feddernico" title="@feddernico"><span class="citation" data-cites="feddernico">@feddernico</span></a></p></li>
<li><p>Medium: <a href="https://medium.com/@federico.viscioletti" title="@federico.viscioletti"><span class="citation" data-cites="federico.viscioletti">@federico.viscioletti</span></a></p></li>
<li><p>Substack: <a href="https://feddernico.substack.com/">https://feddernico.substack.com/</a></p></li>
</ul>


</section>

 ]]></description>
  <category>ai</category>
  <category>data-science</category>
  <guid>https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-2/</guid>
  <pubDate>Wed, 29 May 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/how-to-handle-missing-data-in-machine-learning-part-2/images/how_to_handle_missing_data_in_ml.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>3 Proven Real-World Data Science Strategies for Success</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/3-proven-real-world-data-science-strategies-for-success/</link>
  <description><![CDATA[ 





<p>As a data scientist, I’ve faced many challenges throughout the years. While working on various projects, I’ve learned some key strategies through trial and error. They have greatly improved my workflow and the effectiveness of the solutions. Learning these lessons involved a fair share of pain. So, if you are a junior data scientist entering the field, I’m excited to share these real-world data science strategies with you.</p>
<p>In this post, I’ll share the top three lessons I’ve learned from my experience in data science and development. By the end, you’ll know how to avoid common mistakes. You’ll also learn best practices that will improve your skills as a data scientist.</p>
<section id="lesson-1-always-test-your-python-script-on-a-smaller-sample" class="level2">
<h2 class="anchored" data-anchor-id="lesson-1-always-test-your-python-script-on-a-smaller-sample">Lesson 1: Always Test Your Python Script on a Smaller Sample</h2>
<p>You might feel the urge to run your Python scripts on whole datasets right away. Yet, this approach can cause big issues. It leads to long run times and heavy resource use (aka lots of miserable evenings).</p>
<p>Instead, take action by testing your scripts on a&nbsp;<strong>smaller sample</strong>&nbsp;of the data first. Take this step. It can help you find and fix errors fast. You won’t waste time or computing power (YAY).</p>
<section id="real-world-data-science-strategies" class="level3">
<h3 class="anchored" data-anchor-id="real-world-data-science-strategies">Real-World Data Science Strategies</h3>
<p>For instance, when working on a large dataset to predict vessel behavior, I first test my code on a small part of the data. I do this by selecting a representative vessel type or by sampling the vessel IDs. This helps me catch a critical logic error that would have otherwise taken hours to identify. By the time you need to run the script on the full dataset, it works flawlessly, saving me both time and resources.</p>
<p>Testing on a smaller sample is crucial because it allows you to&nbsp;<strong>debug and optimise</strong>&nbsp;your code before scaling up.</p>
<p>Now, let’s move on to the next lesson.</p>
</section>
</section>
<section id="lesson-2-dont-use-smote-or-any-other-overunder-sampling-techniques-in-production" class="level2">
<h2 class="anchored" data-anchor-id="lesson-2-dont-use-smote-or-any-other-overunder-sampling-techniques-in-production">Lesson 2: Don’t Use SMOTE or Any Other Over/Under Sampling Techniques in Production</h2>
<p>Many data scientists believe that SMOTE can fix imbalanced data. (SPOILER ALERT: I was one of them). These techniques can boost model performance in development. But then, they often fail in production.</p>
<p>Many see these methods as quick fixes. But they can cause new issues when used in real-world scenarios. It’s important to see the limits of these techniques and focus on sustainable solutions.</p>
<p>Common misconceptions about sampling techniques:</p>
<ul>
<li><p>They provide a solution for data imbalance.</p></li>
<li><p>Maintain the integrity of the original dataset.</p></li>
<li><p>Are as effective in production as they are in development.</p></li>
</ul>
<p>But the brutal truth is:</p>
<ul>
<li><p>They can distort the true distribution of the data.</p></li>
<li><p>May not generalise well to new, unseen data.</p></li>
<li><p>Can lead to overfitting, which reduces the model’s performance in production.</p></li>
</ul>
<p>The key to success in this case is doing nothing to the data structure and using robust algorithms that handle imbalance naturally.</p>
<p>For example, when working on supervised classification problems, I often use&nbsp;<strong>LightGBM</strong>. I choose it for its fast training and prediction. This model has a parameter called&nbsp;<em>is_unbalanced</em>, which can be set to True if the target variable is unbalanced.</p>
<p>Here’s a quick example to test:</p>
<pre><code># Real-World Data Science Strategies - 2: 
# Don't Use SMOTE or Any Other Over/Under Sampling Techniques in Production
import lightgbm as lgb
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
import numpy as np

# Generate a synthetic imbalanced dataset
from sklearn.datasets import make_classification

X, y = make_classification(n_samples=1000, n_features=20, n_classes=2, weights=[0.9, 0.1], flip_y=0, random_state=1)

# Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# Create a LightGBM dataset with weight parameter
d_train = lgb.Dataset(X_train, label=y_train, weight=np.where(y_train == 1, 10, 1))  # Increase weight for the minority class

# Set LightGBM parameters
params = {
    'objective': 'binary',
    'boosting_type': 'gbdt',
    'metric': 'binary_logloss',
    'is_unbalance': True,  # Set this to True if not using manual weights
    'boost_from_average': True,
    'learning_rate': 0.05,
    'num_leaves': 31,
    'feature_fraction': 0.9,
    'bagging_fraction': 0.8,
    'bagging_freq': 5,
    'verbose': -1
}

# Train the model
bst = lgb.train(params, d_train, num_boost_round=100)

# Predict on the test set
y_pred = bst.predict(X_test)
y_pred_binary = [1 if pred &gt; 0.5 else 0 for pred in y_pred]

# Evaluate the model
print(classification_report(y_test, y_pred_binary))</code></pre>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/05/Screen-Shot-2024-05-20-at-23.14.02.png"><img src="https://viscioletti.com/posts/3-proven-real-world-data-science-strategies-for-success/images/Screen-Shot-2024-05-20-at-23.14.02-1024x336.png" class="img-fluid figure-img"></a></p>
<figcaption>the output of the classification report using a LightGBM set up for unbalanced target variables</figcaption>
</figure>
</div>
<figcaption>
<p>the output of the classification report using a LightGBM set up for unbalanced target variables</p>
</figcaption>
</figure>
<p>While it’s tempting to rely on under/over sampling techniques, it’s essential to acknowledge their limitations and focus on more robust solutions. Now, let’s discuss the final lesson.</p>
</section>
<section id="real-world-data-science-strategies-3-avoid-overcomplicating-your-solutions" class="level2">
<h2 class="anchored" data-anchor-id="real-world-data-science-strategies-3-avoid-overcomplicating-your-solutions">Real-World Data Science Strategies 3: Avoid Overcomplicating Your Solutions</h2>
<p>A common mistake among data scientists is overcomplicating their solutions. This often involves using overly complex models or unnecessary features. This, in turn, can hinder progress and make the system harder to maintain.</p>
<p>Overcomplicating your solution can lead to more computation time. It also causes trouble in debugging, maintaining, and updating the model. Instead, focus on simplicity and clarity in your approach.</p>
<p>For example, in one of my early projects, I used a complex model. It had many features to predict a binary target variable. While it worked well during development, it was challenging to deploy and maintain. Later, I simplified the model, using a simpler logistic regression approach. It performed nearly as well and was much easier to manage and update.</p>
<p>This taught me the importance of simplicity and clarity. Simple solutions are easier to understand and maintain. They often work better in the long run than complex ones.</p>
<p>The goal is to make models that are not only effective but also practical for the real world.</p>
<p>To summarise:</p>
<ol type="1">
<li><p><strong>Always test</strong>&nbsp;your Python scripts on smaller samples to save time and resources.</p></li>
<li><p><strong>Avoid</strong>&nbsp;using SMOTE in production. It often fails to generalize well.</p></li>
<li><p>Keep your solutions&nbsp;<strong>simple and maintainable</strong>&nbsp;to ensure long-term success.</p></li>
</ol>
<p>These are some of the real-world data science strategies that have been important in my journey as a data scientist. Adding them to your practice will prepare you to face real challenges, and will help you provide impactful solutions.</p>
<p>If you like advanced data science techniques you will probably love this other article I wrote about&nbsp;<a href="https://viscioletti.com/2023/10/how-to-choose-the-best-categorical-encoding-method/">encoding categorical variables</a>.</p>
<p>Or if you want you can follow me on&nbsp;<a href="https://x.com/feddernico">Twitter/X</a></p>


</section>

 ]]></description>
  <category>ai</category>
  <category>data-science</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/3-proven-real-world-data-science-strategies-for-success/</guid>
  <pubDate>Mon, 20 May 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/3-proven-real-world-data-science-strategies-for-success/images/three_lessons_in_data_science.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>Customer Reviews Forensics: An Approach To Stunning Expert Insights</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/customer-reviews-forensics-an-approach-to-stunning-expert-insights/</link>
  <description><![CDATA[ 





<section id="customer-reviews-why-they-matter" class="level2">
<h2 class="anchored" data-anchor-id="customer-reviews-why-they-matter">Customer Reviews: Why They Matter</h2>
<p>In a competitive market understanding customer reviews is crucial for enhancing product offerings and customer satisfaction. This article outlines an analysis of user reviews from a leading software provider, focusing on methodological approaches to dissect user sentiment and providing strategic recommendations.</p>
</section>
<section id="the-data-source" class="level2">
<h2 class="anchored" data-anchor-id="the-data-source">The Data Source</h2>
<p>The dataset used for this analysis contains reviews from Google. The key fields include:</p>
<ul>
<li><p><strong>Reviewer Name</strong>: The name of the reviewer.</p></li>
<li><p><strong>Local Guide</strong>: Indicator of whether the reviewer is a local guide.</p></li>
<li><p><strong>Number of Reviews</strong>: Total reviews written by the reviewer.</p></li>
<li><p><strong>Number of Photos</strong>: Total photos uploaded by the reviewer.</p></li>
<li><p><strong>Weeks Ago</strong>: The number of weeks ago when the review was written.</p></li>
<li><p><strong>Rating</strong>: The rating given by the reviewer.</p></li>
<li><p><strong>Review Text</strong>: The actual review provided by the reviewer.</p></li>
<li><p><strong>Number of Likes</strong>: The number of likes received for the review.</p></li>
<li><p><strong>Reviewer Nationality</strong>: Indicator of whether the reviewer is Italian.</p></li>
<li><p><strong>Review Language</strong>: The language in which the review was written.</p></li>
</ul>
</section>
<section id="customer-reviews-methodology-used" class="level2">
<h2 class="anchored" data-anchor-id="customer-reviews-methodology-used">Customer Reviews: Methodology Used</h2>
<p>The dataset comprised user reviews, complete with ratings, text feedback, and other reviewer demographics. The analysis followed these steps:</p>
<ol type="1">
<li><p><strong>Data Cleaning</strong>: Initial data preparation involved filtering out reviews that could bias the results, such as those suspected to be from the company’s insiders or their acquaintances.</p></li>
<li><p><strong>Sentiment Categorisation</strong>: Reviews were sorted based on their ratings—categorised as positive (above 2.5) and negative (2.5 or below).</p></li>
<li><p><strong>Word Cloud Creation</strong>: To visualise the predominant themes, word clouds were generated for both sets of reviews, highlighting the most frequently mentioned terms.</p></li>
<li><p><strong>Topic Modeling</strong>: Latent Dirichlet Allocation (LDA) was used to identify and cluster common topics within the feedback, aiding in pinpointing the main areas of user satisfaction and concerns.</p></li>
</ol>
</section>
<section id="customer-reviews-findings" class="level2">
<h2 class="anchored" data-anchor-id="customer-reviews-findings">Customer Reviews: Findings</h2>
<section id="positive-feedback" class="level3">
<h3 class="anchored" data-anchor-id="positive-feedback">Positive Feedback</h3>
<p>Analysis showed that satisfied users frequently highlighted several aspects:</p>
<ol type="1">
<li><p><strong>Customer Service</strong>: Many positive reviews praised the support team, often describing them as <em>‘helpful’</em> and <em>‘excellent’</em>.</p></li>
<li><p><strong>Software Reliability</strong>: The consistent performance and reliability were often noted by long-term users, emphasizing its effectiveness in meeting their operational needs.</p></li>
<li><p><strong>User Benefits</strong>: The benefits of using the software, such as improved operational efficiencies and better pricing strategies, were often mentioned.</p></li>
</ol>
</section>
<section id="negative-feedback" class="level3">
<h3 class="anchored" data-anchor-id="negative-feedback">Negative Feedback</h3>
<p>Dissatisfied users typically raised issues in the following areas:</p>
<ol type="1">
<li><p><strong>Pricing Concerns</strong>: Many negative reviews cited problems with pricing, suggesting a need for more transparent and flexible pricing models.</p></li>
<li><p><strong>Communication Gaps</strong>: Frequent mentions of inadequate responses to service requests and poor management of bookings indicated significant communication issues.</p></li>
<li><p><strong>Operational Inefficiencies</strong>: Operational challenges were a common theme, with users expressing frustration over perceived software glitches affecting their business.</p></li>
</ol>
</section>
</section>
<section id="recommendations-to-improve-customer-reviews" class="level2">
<h2 class="anchored" data-anchor-id="recommendations-to-improve-customer-reviews">Recommendations To Improve Customer Reviews</h2>
<p>Based on the insights gained, several steps are recommended to improve the software’s performance and customer satisfaction:</p>
<ol type="1">
<li><p><strong>Enhance Customer Support</strong>: Improving the responsiveness and effectiveness of the customer support team could address many of the concerns identified.</p></li>
<li><p><strong>Revise Pricing Models</strong>: Reevaluating the pricing structures to ensure clarity and fairness could help mitigate customer dissatisfaction.</p></li>
<li><p><strong>Improve Communication and Operations</strong>: Strengthening communication channels and booking management systems could significantly boost user satisfaction.</p></li>
</ol>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>This analysis highlights the importance of methodically analysing customer feedback in the software industry. By addressing the issues identified, improvements can be made that enhance user satisfaction and attract new customers. The recommendations provided offer a pathway toward these enhancements, focusing on responsiveness, transparency, and operational efficiency.</p>
</section>
<section id="the-notebook-used-to-analyse-customer-reviews" class="level2">
<h2 class="anchored" data-anchor-id="the-notebook-used-to-analyse-customer-reviews">The Notebook Used To Analyse Customer Reviews</h2>
<p>If you want to look at the actual code, here’s the <strong>Jupyter notebook</strong> to complete this analysis:</p>
<p>[advanced_iframe src=“/jupyter-notebooks/google_reviews_analysis/google_reviews_analysis.html” style=“display: block;border:1px solid #CCC;border-radius:6px;box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);”]</p>
<p>If you like advanced data science techniques you will probably love this other article I wrote about <a href="https://viscioletti.com/2023/10/how-to-choose-the-best-categorical-encoding-method/" title="encoding categorical variables">encoding categorical variables</a>.</p>
<p>Or if you want you can follow me on <a href="https://x.com/feddernico">Twitter/X</a></p>


</section>

 ]]></description>
  <category>ai</category>
  <category>aws</category>
  <category>data-science</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/customer-reviews-forensics-an-approach-to-stunning-expert-insights/</guid>
  <pubDate>Wed, 15 May 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/customer-reviews-forensics-an-approach-to-stunning-expert-insights/images/customer_reviews_forensics.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>PrivateGPT sur AWS : La Nouvelle Ère de la Sécurité Documentaire des LLM</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/privategpt-sur-aws-la-nouvelle-ere-de-la-securite-documentaire-des-llm/</link>
  <description><![CDATA[ 





<section id="introduction" class="level2">
<h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>Depuis l’introduction des Large Language Models, j’ai été intrigué à l’idée d’expérimenter avec et j’étais préoccupé par leur intégration potentielle dans les processus de documentation et de récupération d’informations de l’entreprise. La principale préoccupation est, bien sûr, de s’assurer que les données internes restent privées et qu’elles ne deviennent pas partie des sources de données utilisées pour entraîner le chatGPT d’OpenAI.</p>
<p>J’ai alors été attiré par un article de <strong>PyCoach</strong>, qui mentionnait un projet d’Iván Martínez. Le point principal du projet est de créer un LLM ouvert et gratuit, particulierment concerné par la confidentialité. Vous pouvez trouver le <a href="https://github.com/zylon-ai/private-gpt">GitHub repo ici</a>.</p>
<p>J’ai été tellement inspiré que j’ai décidé de créer mon propre Large Language Model (LLM) privé, afin de traiter et ingérer des documents de façon sécurisé.</p>
<p>J’ai d’abord essayé de l’installer sur mon ordinateur portable, mais j’ai rapidement réalisé que mon laptop n’avait pas les spécifications nécessaires pour exécuter le LLM localement, donc j’ai décidé de l’installer sur mon compte AWS, en utilisant une instance EC2. Voici les étapes logiques que vous devez suivre pour faire repeter l’operation.</p>
</section>
<section id="création-dune-instance-ec2" class="level2">
<h2 class="anchored" data-anchor-id="création-dune-instance-ec2">1. Création d’une instance EC2</h2>
<p>Commençons par visiter le site web de <strong>AWS</strong> et accéder à la <a href="https://console.aws.com/ec2/">page du service EC2</a>.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2023/06/Screenshot-from-2023-06-05-23-12-5-2.png"><img src="https://viscioletti.com/posts/privategpt-sur-aws-la-nouvelle-ere-de-la-securite-documentaire-des-llm/images/Screenshot-from-2023-06-05-23-12-5-2.png" class="img-fluid figure-img"></a></p>
<figcaption>AWS EC2 service page</figcaption>
</figure>
</div>
<figcaption>
<p>AWS EC2 service page</p>
</figcaption>
</figure>
<p>Maintenant on va créer une nouvelle instance en utilisant une image <strong>Ubuntu 22.04</strong>.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2023/06/Screenshot-from-2023-06-06-22-40-20.png"><img src="https://viscioletti.com/posts/privategpt-sur-aws-la-nouvelle-ere-de-la-securite-documentaire-des-llm/images/Screenshot-from-2023-06-06-22-40-20-1024x492.png" class="img-fluid figure-img"></a></p>
<figcaption>Instance EC2 using an Ubuntu 22.04 image</figcaption>
</figure>
</div>
<figcaption>
<p>Instance EC2 en utilisant une image Ubuntu 22.04</p>
</figcaption>
</figure>
<p>Assurez-vous maintenant que vous avez suffisamment d’espace libre sur l’instance (je l’ai configuré actuellement à 30 Go).</p>
<p>Si vous avez des doutes, vous pouvez vérifier l’espace restant sur la machine en utilisant cette commande:</p>
<pre><code>df -BM</code></pre>
</section>
<section id="configuration-des-paires-de-clés" class="level2">
<h2 class="anchored" data-anchor-id="configuration-des-paires-de-clés">2. Configuration des Paires de Clés</h2>
<p>Créez une nouvelle paire de clés, téléchargez le fichier .pem et stockez-le dans un endroit sûr.<br>
Changez les permissions du fichier de clé en utilisant cette commande</p>
<pre><code>chmod 400 ~/Documents/aws/privateGPT.pem</code></pre>
<p>Sinon, vous ne pourrez pas vous connecter car EC2 refusera la connexion en se plaignant que les permissions sont trop ouvertes. Maintenant, vous devriez pouvoir vous connecter en SSH à la machine que vous venez de créer en tapant la commande:</p>
<pre><code>ssh -i ~/path/to/privateGPT.pem ubuntu@ip-address.compute-1.amazonaws.com</code></pre>
</section>
<section id="vérification-de-la-compatibilité-avxavx2" class="level2">
<h2 class="anchored" data-anchor-id="vérification-de-la-compatibilité-avxavx2">3. Vérification de la compatibilité AVX/AVX2</h2>
<p>Le principal problème que j’ai trouvé en exécutant une version locale de privateGPT était la compatibilité AVX/AVX2 (apparemment, j’ai un ordinateur portable bien vieux, haha).</p>
<p>Ce n’est pas un problème sur EC2. Si vous voulez vérifier que c’est le cas, vous pouvez utiliser la commande:</p>
<pre><code>grep avx /proc/cpuinfo</code></pre>
</section>
<section id="installation-de-python-3.10-et-pip" class="level2">
<h2 class="anchored" data-anchor-id="installation-de-python-3.10-et-pip"><strong>4. Installation de Python 3.10 et pip</strong></h2>
<p>Python 3.10 est essentiel pour faire fonctionner privateGPT.</p>
<p>Tout d’abord, pour vous assurer que votre système est mis à jour et que les paquets nécessaires sont installés, tapez la commande suivante :</p>
<pre><code>sudo apt install software-properties-common -y</code></pre>
<p>Ensuite, ajoutez le PPA deadsnakes à la liste des sources du gestionnaire de paquets APT comme ci-dessous.</p>
<pre><code>sudo add-apt-repository ppa:deadsnakes/ppa</code></pre>
<p>Avec le dépôt deadsnakes ajouté à votre système Ubuntu, téléchargez maintenant Python 3.10 avec la commande unique ci-dessous.</p>
<pre><code>sudo apt install python3.10</code></pre>
<p>Enfin, vous pouvez installer pip3</p>
<pre><code>sudo apt install python3-pip</code></pre>
</section>
<section id="configuration-de-lenvironnement" class="level2">
<h2 class="anchored" data-anchor-id="configuration-de-lenvironnement">5. Configuration de l’Environnement</h2>
<p>Vérifions maintenant que <strong>git</strong> est installé</p>
<pre><code>git</code></pre>
<p>Clonez le dépôt privateGPT</p>
<pre><code>git clone https://github.com/imartinez/privateGPT.git</code></pre>
<p>Ensuite, naviguez jusqu’au repo cloné</p>
<pre><code>cd privateGPT/</code></pre>
<p>et installez les prérequis en utilisant pip</p>
<pre><code>pip3 install -r requirements.txt</code></pre>
</section>
<section id="téléchargement-du-llm" class="level2">
<h2 class="anchored" data-anchor-id="téléchargement-du-llm">6. Téléchargement du LLM</h2>
<p>Changez le nom du fichier de variables d’environnement en utilisant la commande <strong>mv</strong></p>
<pre><code>mv example.env .env</code></pre>
<p>Créez un dossier qui contiendra le LLM</p>
<pre><code>mkdir models
cd models/</code></pre>
<p>Et maintenant utilisez <strong>wget</strong> pour télécharger le fichier LLM actuel (cela peut prendre un certain temps, le fichier fait environ <strong>3,5 Go</strong>)</p>
<pre><code>wget https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin</code></pre>
</section>
<section id="ajout-de-documents-à-la-machine" class="level2">
<h2 class="anchored" data-anchor-id="ajout-de-documents-à-la-machine">Ajout de Documents à la Machine</h2>
<p>C’est là que le plaisir commence! Le repo vient avec un fichier exemple qui peut être utilisé immédiatement, mais je suppose que vous ne serez pas intéressé par poser des questions sur le discours sur l’état de l’Union. Donc, vous pouvez d’abord naviguer dans le dossier, puis vous assurer qu’il ne contient aucun fichier en utilisant ces commandes.</p>
<pre><code>cd ../
rm source_documents/*</code></pre>
<p>Maintenant, vous pouvez ajouter les fichiers que vous souhaitez utiliser et poser des questions en utilisant SCP. N’oubliez pas que vous devrez également passer le fichier <strong>pem</strong> en paramètre pour établir une connexion sécurisée avec la machine</p>
<pre><code>scp -i ~/path/to/privateGPT.pem ~/path/to/document.extension ubuntu@ip-address.compute-1.amazonaws.com:~/privateGPT/source_documents</code></pre>
<p>Il est enfin temps de poser des questions sur vos documents !</p>
<p>J’aime le fait que PrivateGPT prend en charge une variété de formats couramment utilisés. Les extensions actuellement supportées sont :</p>
<p>.<strong>csv</strong>: Fichier CSV,<br>
.<strong>docx</strong> : Document Word,<br>
.<strong>doc</strong> : Document Word,<br>
.<strong>enex</strong> : EverNote,<br>
.<strong>eml</strong> : Email,<br>
.<strong>epub</strong> : EPub,<br>
.<strong>html</strong> : Fichier HTML,<br>
.<strong>md</strong> : Markdown,<br>
.<strong>msg</strong> : Message Outlook,<br>
.<strong>odt</strong> : Texte de Document Ouvert,<br>
.<strong>pdf</strong> : Format de Document Portable (PDF),<br>
.<strong>pptx</strong> : Document PowerPoint,<br>
.<strong>ppt</strong> : Document PowerPoint,<br>
.<strong>txt</strong> : Fichier texte (UTF-8),</p>
<p>Maintenant, il y a deux commandes clés à retenir ici. La première permettra d’ingérer tout document disponible dans le dossier <strong>source_document</strong>, créant automatiquement les embeddings pour nous.</p>
<pre><code>cd ~/privateGPT
python ingest.py</code></pre>
<p>La seconde créera une session interactive où nous pourrons poser des questions sur les documents ingérés</p>
<pre><code>python privateGPT.py</code></pre>
<p>C’est tout ! Vous venez de créer votre propre LLM personnel qui répondra aux questions sur tout document que vous décidez d’ingérer. Maintenant, seul le ciel est la limite.</p>
<p>Comme note finale, il convient de mentionner que ce projet est toujours en cours de développement et que la solution est loin d’être prête pour la production, car elle n’est pas axée sur la performance, mais sur la confidentialité. Obtenir une seule réponse sur un petit document peut effectivement prendre plusieurs minutes.</p>


</section>

 ]]></description>
  <category>ai</category>
  <category>aws</category>
  <category>data-science</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/privategpt-sur-aws-la-nouvelle-ere-de-la-securite-documentaire-des-llm/</guid>
  <pubDate>Tue, 30 Apr 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/privategpt-sur-aws-la-nouvelle-ere-de-la-securite-documentaire-des-llm/images/personal-AI.png" medium="image" type="image/png" height="80" width="144"/>
</item>
<item>
  <title>Potenzia i Tuoi Progetti: Costruisci il Futuro con PromptGPT e ChatGPT—Una Rivoluzione nello Sviluppo di Applicazioni</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/</link>
  <description><![CDATA[ 





<p>Questo articolo esplora come ho trasformato un’idea in un’app web in un solo giorno, utilizzando HTML, CSS e JavaScript. Scopri come ChatGPT semplifica la creazione di app web, rendendo lo sviluppo web accessibile a tutti.</p>
<section id="il-tuo-sviluppatore-software-personale" class="level2">
<h2 class="anchored" data-anchor-id="il-tuo-sviluppatore-software-personale">Il tuo sviluppatore software personale</h2>
<p>Da mesi sono abbonato a chatGPT e sto esplorando tutti i modi per integrarlo nella mia routine di data scientist e sviluppatore web nel tempo libero.</p>
<p>Tuttavia, trovo che abbia ancora limiti nella generazione di testo. Finora invece, l’ho trovato ottimo per brainstorming e sviluppo di idee su app web e analisi dei dati.</p>
<p>In questo articolo, voglio esplorare come in un giorno sono riuscito a trasformare un’idea in una web app. Ho usato HTML, CSS e JavaScript.</p>
<p>Come potete immaginare dai miei post, non sono uno sviluppatore web. Ho solo seguito alcuni corsi di HTML, CSS e JavaScript in passato per imparare le basi. Oggigiorno molte cose stanno avvenendo nell’ambito dello sviluppo web, ed è difficile stare al passo e rimanere aggiornati. Quindi, quando è diventato disponibile l’assistente al codice di chatGPT, ho trovato un grande alleato, chemi aiuta a trasformare le idee in applicazioni web.</p>
</section>
<section id="il-problema-iniziale" class="level2">
<h2 class="anchored" data-anchor-id="il-problema-iniziale">Il Problema Iniziale</h2>
<p>Volevo creare un’app web collegata a chatGPT. Inoltre, volevo risolvere i principali problemi che incontro quando uso chatGPT:</p>
<ul>
<li><p>salvare i prompt ricorrenti</p></li>
<li><p>analizzare l’output markdown</p></li>
<li><p>salvare le chat in categorie</p></li>
</ul>
<p>Analizziamo ciascuno di questi punti.</p>
</section>
<section id="salvare-i-prompt-ricorrenti" class="level2">
<h2 class="anchored" data-anchor-id="salvare-i-prompt-ricorrenti">Salvare i Prompt Ricorrenti</h2>
<p>Sapete già che creare il prompt perfetto per un compito ricorrente usando chatGPT (o altri LLM) richiede tempo. Il mio approccio allo strumento è di tipo <em>flusso di pensiero</em>. Tendo ad avere chat lunghe, piene di prompt non correlati che parlano di tutto e di più. Ecco perché avere l’opzione di salvare tutti i miei prompt preferiti e fare categorie è essenziale.</p>
</section>
<section id="convertire-loutput-in-markdown-di-chatgpt" class="level2">
<h2 class="anchored" data-anchor-id="convertire-loutput-in-markdown-di-chatgpt">Convertire l’output in Markdown di chatGPT</h2>
<p>Al momento della stesura di questo articolo, la maggior parte delle volte quando faccio una domanda a chatGPT e cerco una risposta strutturata, come ad esempio un elenco, chatGPT risponde con un output in markdown. Questo significa che devo prima renderizzare, e poi copiare/incollare il markdown.</p>
</section>
<section id="salvare-le-chat-in-categorie" class="level2">
<h2 class="anchored" data-anchor-id="salvare-le-chat-in-categorie">Salvare le Chat in Categorie</h2>
<p>Come detto sopra, nella maggior parte dei casi, uso chatGPT per brainstorming ed esplorare idee. Questo significa che a volte esploro un argomento per diversi giorni di fila, facendo domande a chatGPT in molte chat diverse. Volevo quindi essere in grado di categorizzare tutte queste chat, e potendo poi raccogliere i contenuti di cui ho bisogno.</p>
<p>Avendo chiaro in mente il problema da risolvere, volevo esplorare la possibilità di avere tutto queste funzioni disponibili e a portata di mano in un’unica web app. È così che ho ideato promptGPT.</p>
</section>
<section id="la-fase-di-sviluppo" class="level2">
<h2 class="anchored" data-anchor-id="la-fase-di-sviluppo">La Fase di Sviluppo</h2>
<p>Sviluppare l’app è stato facile quanto chiedere a chatGPT quello che volevo e aggiustare poi, il codice generato. Non mostrerò l’intera chat, sarebbe solo un lungo elenco di screenshot. Ne mostrerò solo alcuni per descrivere il processo di sviluppo.</p>
<p>Non sono molto bravo ad inventare nomi accattivanti per un software. Quindi sono partito con un’idea iniziale e ho chiesto a chatGPT di darmi un elenco di nomi.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/list_of_names.png"><img src="https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/images/list_of_names-1024x648.png" class="img-fluid figure-img"></a></p>
<figcaption>List of software names as given by chatGPT</figcaption>
</figure>
</div>
<figcaption>
<p>raccolta di un elenco di nomi per la mia app web da chatGPT</p>
</figcaption>
</figure>
<p>Poi ho deciso di chiamarla promptGPT. Era breve e facile da ricordare.</p>
<p>Quando si tratta di sviluppo vero e proprio, inizialmente pensavo di utilizzarlo come un un notebook Jupyter. L’idea era che sarebbe stato più vicino al mio ambiente di lavoro. Poi, ho deciso che un’app web sarebbe stata più appropriata, in quanto più facile da condividere.</p>
<p>Quindi, ho chiesto a chatGPT di convertire il codice Python iniziale in un’app web HTML, CSS e JavaScript.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/ipynb_to_webapp_conversion.png"><img src="https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/images/ipynb_to_webapp_conversion-1024x743.png" class="img-fluid figure-img"></a></p>
<figcaption>ipynb to web app conversion, as performed by chatGPT</figcaption>
</figure>
</div>
<figcaption>
<p>la conversione da notebook a web app</p>
</figcaption>
</figure>
<p>Inizialmente chatGPT aveva dimenticato di implementare alcune delle funzionalità della versione originale in Jupyter, quindi ho ricondiviso nuovamente il codice nella chat, in modo tale da assicurarmi che lo convertisse correttamente.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/current_ipynb.png"><img src="https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/images/current_ipynb-1024x678.png" class="img-fluid figure-img"></a></p>
<figcaption>The code of the current Jupyter notebook, as shared in chatGPT’s chat</figcaption>
</figure>
</div>
<figcaption>
<p>Il codice del notebook Jupyter, condiviso con chatGPT</p>
</figcaption>
</figure>
<p>Dopo una dozzina di iterazioni di deployment e test, e chiedendo a chatGPT varie modifiche, sono stato in grado di far funzionare l’app come volevo. L’app è ancora in fase di sviluppo, ma copre le tre caratteristiche principali delineate sopra.</p>
</section>
<section id="promptgpt" class="level2">
<h2 class="anchored" data-anchor-id="promptgpt">promptGPT</h2>
<p>Come mostrato nell’immagine qui sotto, PromptGPT è un’app web semplice. Permette all’utente di salvare i loro prompt ripetuti, analizzare l’output markdown e ordinare le chat.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/promptGPT.png"><img src="https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/images/promptGPT-1024x765.png" class="img-fluid figure-img"></a></p>
<figcaption>promptGPT’s UI</figcaption>
</figure>
</div>
<figcaption>
<p>L’interfaccia grafica di promptGPT</p>
</figcaption>
</figure>
<p>Se vuoi provarla, o suggerire modifiche, sentiti libero di salire a bordo e provarla: <a href="https://www.viscioletti.com/promptgpt/">promptGPT</a></p>
<p>Sei curioso di usare chatGPT in modi creativi? Ti consiglio di ascoltare il podcast di Every: “<a href="https://open.spotify.com/show/5qX1nRTaFsfWdmdj5JWO1G">Come usi chatGPT?</a>”.</p>
<hr>


</section>

 ]]></description>
  <category>ai</category>
  <category>web-development</category>
  <guid>https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/</guid>
  <pubDate>Thu, 25 Apr 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/potenzia-i-tuoi-progetti-costruisci-il-futuro-con-promptgpt-e-chatgpt-una-rivoluzione-nello-sviluppo-di-applicazioni/images/web_development_chatGPT.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>How Amazon Bedrock improved speed in LLM testing</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/</link>
  <description><![CDATA[ 





<p>This article is about Amazon Bedrock and its value proposition in the LLM arena. Using this tool, I tested different LLMs for a text classification task.</p>
<section id="why-aws-has-the-upper-hand-on-ml-and-ai-on-the-cloud" class="level2">
<h2 class="anchored" data-anchor-id="why-aws-has-the-upper-hand-on-ml-and-ai-on-the-cloud">Why AWS has the upper hand on ML and AI on the cloud</h2>
<p>At different times I tried the 3 main different cloud providers in a work setting. Each one has its own strengths. For example, Google BigQuery is great for SQL ETL and low code ML. But, I find that AWS is still the best for ML and AI.</p>
<p>They were the first on the market, to develop an end to end platform ML platform with SageMaker, that is capable of dealing with all the phases of a data science project. They definitely win for ease of use and variety of services.</p>
<p>Furthermore, it’s impressive to see how quickly the landscape is changing. Many LLM developers entered the market in just under two years since widely available generative AI became available. This was when chatGPT became widely available (30th November 2022).</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/Time-it-took-for-tech-companies-to-reach-one-million-users.png"><img src="https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/images/Time-it-took-for-tech-companies-to-reach-one-million-users.png" class="img-fluid figure-img"></a></p>
<figcaption>Time it took for tech companies to reach one million users</figcaption>
</figure>
</div>
<figcaption>
<p>Time it took for tech companies to reach one million users.</p>
</figcaption>
</figure>
<p>Now let’s talk about how you can deploy your own private LLM on AWS and start playing with it.</p>
</section>
<section id="ways-to-deploy-and-use-your-llm-on-aws" class="level2">
<h2 class="anchored" data-anchor-id="ways-to-deploy-and-use-your-llm-on-aws">Ways to Deploy and Use Your LLM on AWS</h2>
<p>In AWS you can deploy your LLM in different ways. It all comes down to the level of <strong>customisation</strong> the user needs, and to how fast the model can be deployed and used. I will go through each one of them, ordered by speed of execution and level of customisation of the solution.</p>
<section id="amazon-q-business" class="level3">
<h3 class="anchored" data-anchor-id="amazon-q-business">Amazon Q Business</h3>
<p>First, if you are only interested in <strong>quickly fire up an LLM</strong> then Amazon Q Business is what you are looking for.</p>
<p>Currently in preview in the US, Amazon Q is marketing itself as an LLM for the workplace. The main aim is to get things done in a more efficient way in your business by using an LLM.</p>
<p>Amazon Q aim is to quickly deploy a chat-style LLM with a plug-and-play UI (like chatGPT). The user can then improve it. They can do this by using related documents with RAG (Retrieval Augmented Generation) techniques. These will help build context for the model.</p>
<p>If you just want to consume the results of an LLM quickly you can use either Q or Bedrock. The main difference between the two is the fact that with Bedrock you can choose the model</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/amazon_q_business.png"><img src="https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/images/amazon_q_business-1024x577.png" class="img-fluid figure-img"></a></p>
<figcaption>Amazon Q UI, as shown from the AWS presentation video.</figcaption>
</figure>
</div>
<figcaption>
<p>Amazon Q UI, as shown from the AWS presentation video.</p>
</figcaption>
</figure>
</section>
<section id="amazon-bedrock" class="level3">
<h3 class="anchored" data-anchor-id="amazon-bedrock">Amazon Bedrock</h3>
<p>Next, let’s talk about Amazon Bedrock. This service gives you a bit more flexibility than Q. Furthermore, you can choose from a plethora of foundations models. At the time of writing the LLMs currently available are:</p>
<ul>
<li><strong>AI21 Labs</strong>
<ul>
<li><p>Jurassic-2 Ultra</p></li>
<li><p>Jurassic-2 Mid</p></li>
</ul></li>
<li><strong>Amazon</strong>
<ul>
<li><p>Titan Embeddings G1 - Text</p></li>
<li><p>Titan Text G1 - Lite</p></li>
<li><p>Titan Text G1 - Express</p></li>
<li><p>Titan Image Generator G1</p></li>
<li><p>Titan Multimodal Embeddings G1</p></li>
</ul></li>
<li><strong>Anthropic</strong>
<ul>
<li><p>Claude 3 Sonnet</p></li>
<li><p>Claude 3 Haiku</p></li>
<li><p>Claude</p></li>
<li><p>Claude Instant</p></li>
</ul></li>
<li><strong>Cohere</strong>
<ul>
<li><p>Embed English</p></li>
<li><p>Embed Multilingual</p></li>
<li><p>Command</p></li>
<li><p>Command Light</p></li>
</ul></li>
<li><strong>Meta</strong>
<ul>
<li><p>Llama 3 8B Instruct</p></li>
<li><p>Llama 3 70B Instruct</p></li>
<li><p>Llama 2 Chat 13B</p></li>
<li><p>Llama 2 Chat 70B</p></li>
<li><p>Llama 2 13B</p></li>
<li><p>Llama 2 70B</p></li>
</ul></li>
<li><strong>Mistral AI</strong>
<ul>
<li><p>Mistral 7B Instruct</p></li>
<li><p>Mixtral 8x7B Instruct</p></li>
<li><p>Mistral Large</p></li>
</ul></li>
<li><strong>Stability AI</strong>
<ul>
<li><p>SDXL 0.8</p></li>
<li><p>SDXL 1.0</p></li>
</ul></li>
</ul>
<p>You can use Amazon Bedrock in two ways. You can test the models in the playground first. Also, you have a <strong>side-by-side mode</strong> where, given a certain prompt, you can compare the output of two models at a time.</p>
<p>Now, you would argue that these models are all available to download. Then, what’s the advantage of using this service? The clear gain here is <strong>not taking care of the infrastructure</strong>. With Amazon Bedrock, you don’t have to choose the instance type or any configurations. It’s all taken care of for you.</p>
</section>
</section>
<section id="amazon-sagemaker" class="level2">
<h2 class="anchored" data-anchor-id="amazon-sagemaker">Amazon Sagemaker</h2>
<p>Finally, let’s focus on the method. It gives you the most customisation and options. If your use case needs great accuracy and laser-focused context, this is your best choice.</p>
<p>This option lets you spin up your own endpoint. Therefore, you can choose the foundation model, get the settings for your instance, and then decide to fine-tune or retrain it. You can start from scratch or get some guidance using one of the <strong>pre-made notebooks</strong> available in <a href="https://github.com/aws/amazon-sagemaker-examples/tree/main/introduction_to_amazon_algorithms/jumpstart-foundation-models">Jumpstart.</a></p>
<p>Just giving my two cents here. I would think <strong>very carefully</strong> before going through this road. Implementing all this requires a lot of time and might prove quite expensive. Also, from my experience, spending more time to <strong>get the prompt right</strong> might be all it takes to improve your model.</p>
</section>
<section id="the-use-case-testing-llms-for-text-classification" class="level2">
<h2 class="anchored" data-anchor-id="the-use-case-testing-llms-for-text-classification">The Use Case: Testing LLMs For Text Classification</h2>
<p>The use case for the model evaluation is a text classification problem. I sampled 100 labeled articles. The binary label indicates whether the article is about a topic or not.</p>
<p>This task is currently done manually. So, any <strong>automation</strong> that could speed it up is greatly appreciated. The idea is to understand how good LLMs have become at doing text classification tasks by only receiving brief instructions.</p>
<p>I went through the different LLMs and found two of them to shortlist: Llama 3 70B and Claude 3 Sonnet. What follows is a comparison of their performance.</p>
<section id="quick-setup" class="level3">
<h3 class="anchored" data-anchor-id="quick-setup">Quick Setup</h3>
<p>To use the foundation models in Bedrock, you need to ensure that you’ve enabled and consented to them. Then, via the <strong>Model access</strong> panel, you can select all the ones you are interested in using.</p>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/bedrock_model_access.png"><img src="https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/images/bedrock_model_access-1024x545.png" class="img-fluid figure-img"></a></p>
<figcaption>Amazon Bedrock Model Access page</figcaption>
</figure>
</div>
<figcaption>
<p>Amazon Bedrock Model Access page.</p>
</figcaption>
</figure>
<p>The <strong>refined prompt</strong> I ended up using is the following:</p>
<pre><code>Act as my article reviewer. I am giving you the text of a blog post enclosed by triple quotes. You need to answer with a binary variable that is 1 if the article is about a Data Science topic, 0 otherwise.

To give you some context I define a Data Science as the study of the extraction of knowledge from data. Data Science uses techniques from many fields, including signal processing, mathematics, probability, machine learning, computer programming, statistics, data engineering, pattern matching, and data visualization, with the goal of extracting useful knowledge from the data. With computer systems able to handle more data, big data is an important aspect of data science.

The answer needs to be a JSON file using this format:
{
    'url': 'http://www.urlofthearticle.com',
    'about_ds': 1
}

Here's the body of the article: """
Body of the article goes here
"""</code></pre>
<figure class="figure">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/aws_bedrock_playground.png"><img src="https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/images/aws_bedrock_playground-1024x544.png" class="img-fluid figure-img"></a></p>
<figcaption>Amazon Bedrock Chat Playground. Here you can play with the foundation models and their parameters.</figcaption>
</figure>
</div>
<figcaption>
<p>Amazon Bedrock Chat Playground. Here you can play with the foundation models and their parameters.</p>
</figcaption>
</figure>
</section>
</section>
<section id="the-results" class="level2">
<h2 class="anchored" data-anchor-id="the-results">The Results</h2>
<p>After playing a bit with both the models I figured out that there was a clear winner. Claude 3 Sonnet was more consistent and reliable in getting the format right. It also predicted with more accuracy whether the article was about data science or not.</p>
<p>In the context of my PoC I only used the playground part of Bedrock and annotated the results in a worksheet. Once you are happy with the model and its parameters, you can use the <strong>Bedrock SDK</strong> in Python to streamline the process. You can then ingest the article body, give the prompt to the model, and get the answer.</p>
<p>The <strong>accuracy</strong> I was able to get was <strong>77%</strong>, which is great if you think that this only took me half a day to set up!</p>
<p>If you are interested in more articles about LLM, have a look at this article where I explore how to setup <a href="https://viscioletti.com/2023/06/privategpt-on-aws-the-new-era-of-llms-document-security/">PrivateGPT using an EC2 instance</a>.</p>


</section>

 ]]></description>
  <category>ai</category>
  <category>aws</category>
  <category>python</category>
  <guid>https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/</guid>
  <pubDate>Sun, 21 Apr 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/how-amazon-bedrock-improved-speed-in-llm-testing/images/speed_llm_development.png" medium="image" type="image/png" height="82" width="144"/>
</item>
<item>
  <title>Empower Your Projects: Building the Future with ChatGPT’s PromptGPT—A Breakthrough in App Development</title>
  <dc:creator>Federico Viscioletti</dc:creator>
  <link>https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/</link>
  <description><![CDATA[ 





<p>This article explores how I turned an idea into a web app in one day, using HTML, CSS, and JavaScript. Discover how ChatGPT streamlines making web apps, making easier web development for everyone.</p>
<section id="your-personal-coding-assistant" class="level2">
<h2 class="anchored" data-anchor-id="your-personal-coding-assistant">Your personal coding assistant</h2>
<p>I have had my chatGPT subscription for months now, and I am exploring all the ways to integrate it into my routine as a data scientist and weekend web developer.</p>
<p>Now, it still has limits for meaningful text generation. It lacks the overuse of “deep dive” and “unravel”. So far, I’ve found it best for brainstorming and developing ideas about web apps and data analysis.</p>
<p>In this article, I want to explore how in a day I came up with an idea and made it into a web app. I used HTML, CSS, and Javascript. As you can guess from my other articles I am <strong>not</strong> a web developer.</p>
<p>I did some HTML, CSS, and Javascript courses back in the days to learn the basics. But, many things are happening in web development. It’s hard to keep up and stay updated. So, when the code helper from chatGPT became available, I found a great ally. It helps me turn ideas into web apps.</p>
</section>
<section id="the-initial-problem" class="level2">
<h2 class="anchored" data-anchor-id="the-initial-problem">The Initial Problem</h2>
<p>I wanted to create a web app linking to chatGPT. Furthermore, I wanted to solve the main problems I have when I deal with chatGPT:</p>
<ul>
<li><p>save recurring prompts</p></li>
<li><p>parse the markdown output</p></li>
<li><p>save chats in categories</p></li>
</ul>
<p>Let’s break down each one of these.</p>
<section id="save-recurring-prompts" class="level3">
<h3 class="anchored" data-anchor-id="save-recurring-prompts">Save Recurring Prompts</h3>
<p>You already know that creating the perfect prompt for a recurring task using chatGPT (or other LLMs) takes time. If you’re using them a lot, you know it’s not a one-shot task. It’s also my way of approaching the tool is <em>serendipitous</em> in nature. I tend to have long chats, filled with unrelated prompts about everything and anything. That’s why having the option to save all my favourite prompts and make categories is vital.</p>
</section>
<section id="parse-chatgpt-markdown" class="level3">
<h3 class="anchored" data-anchor-id="parse-chatgpt-markdown">Parse chatGPT Markdown</h3>
<p>At the time of writing, most of the time when asking chatGPT a question and seeking a structured answer like a list, chatGPT will reply with markdown. This means that I need to render and copy/paste the markdown.</p>
</section>
<section id="save-chats-in-categories" class="level3">
<h3 class="anchored" data-anchor-id="save-chats-in-categories">Save chats in categories</h3>
<p>As mentioned above, I use chatGPT to brainstorm and explore ideas. This means I explore a topic for many days. I ask chatGPT for questions in many chats. I wanted to be able to categorise all these chats. Then, I could gather the content I needed. I knew the problem I was trying to solve. So, I wanted to explore the possibility of having this in a single web app. That’s when I came up with promptGPT.</p>
<p>Having clear in mind what was the problem I was trying to solve, I then wanted to explore the possibility of having this available at hand in a single web app, so I came out with promptGPT.</p>
</section>
</section>
<section id="the-development-stage" class="level2">
<h2 class="anchored" data-anchor-id="the-development-stage">The Development Stage</h2>
<p>Developing the app was as easy as asking chatGPT what I was looking for and adjust the code. I won’t show the whole chat. It would be an overwhelming list of screenshots. But, I will show a few to describe the process.</p>
<p>I am bad at naming software. So, I first wanted to get a good name for my app. So I started with an initial idea and asked chatGPT to give me a list of names.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/list_of_names-1.png"><img src="https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/images/list_of_names-1-1024x648.png" class="img-fluid figure-img"></a></p>
<figcaption>gathering a list of names for my web app from chatGPT</figcaption>
</figure>
</div>
<p>I then decided to call it promptGPT. It was short and easy to remember.</p>
<p>When coming to the actual development, I first thought it was good to have it as a jupyter notebook. It would have been closer to where I work. Then, I decided a web app would have been better. I could more show it off.</p>
<p>I then asked chatGPT to convert the initial python code to an HTML, CSS, and Javascript web app.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/ipynb_to_webapp_conversion.png"><img src="https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/images/ipynb_to_webapp_conversion-1024x743.png" class="img-fluid figure-img"></a></p>
<figcaption>asking chatGPT to convert the Jupyter notebook into a fully fledged web app</figcaption>
</figure>
</div>
<p>At first chatGPT forgot to implement some of the features of the original Jupyter notebook version, so I shared the code again to it, to make sure to reproduce it in full.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/current_ipynb.png"><img src="https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/images/current_ipynb-1024x678.png" class="img-fluid figure-img"></a></p>
<figcaption>sharing the initial code in the Jupyter notebook with chatGPT</figcaption>
</figure>
</div>
<p>After a dozen iterations of deployment and testing, and asking chatGPT for changes, I was able to run the app that I wanted. the app is still a work in progress, but it covers the three main features I wanted it to cover</p>
</section>
<section id="promptgpt" class="level2">
<h2 class="anchored" data-anchor-id="promptgpt">promptGPT</h2>
<p>As shown in the picture below, PromptGPT is a simple web app. It lets the user save their repeated prompts, parse the markdown output, and sort the chats.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><a href="https://viscioletti.com/wp-content/uploads/2024/04/promptGPT.png"><img src="https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/images/promptGPT-1024x765.png" class="img-fluid figure-img"></a></p>
<figcaption>the user interface of promptGPT</figcaption>
</figure>
</div>
<p>If you want to try it out, or suggest changes, feel free to jump on board and give it a go: <a href="http://viscioletti.com/promptgpt/" title="promptGPT">promptGPT</a></p>
<p>Are you curious about using chatGPT in creative ways? I highly recommend the podcast <a href="https://open.spotify.com/show/5qX1nRTaFsfWdmdj5JWO1G" title="How do you use chatGPT?">How do you use chatGPT?</a> by Every.</p>


</section>

 ]]></description>
  <category>ai</category>
  <category>web-development</category>
  <guid>https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/</guid>
  <pubDate>Thu, 18 Apr 2024 00:00:00 GMT</pubDate>
  <media:content url="https://viscioletti.com/posts/empower-your-projects-building-the-future-with-chatgpts-promptgpt-a-breakthrough-in-app-development/images/web_development_chatGPT.png" medium="image" type="image/png" height="82" width="144"/>
</item>
</channel>
</rss>
