-
Prompt Hacking: how to trick Large Language Models like ChatGPT
Introduction After the release of ChatGPT in November 2022, we all became more familiar with the concept of “prompts”, which are the initial instructions or input given to an AI system to generate a desired response or output. In the context of Large Language Models (LLM), such as ChatGPT or Bard, a prompt acts as a guide for the model, provid... Read More
-
Follow the flow: surveys with Alluvial plots
As per last year, I took part to the Kaggle’s annual Machine Learning and Data Science Survey competition. Although the goal of the analysis was the same, this time I decided to adopt a different approach, using only one chart type: Alluvial diagrams. The work was complex but rewarding, as it was a great opportunity to deepen my understandin... Read More
-
Object-oriented programming in Python: Classes - Part 2
Introduction In Part 1 of this Object-oriented programming tutorial, I explored the basics of Classes in Python, dealing with important concepts such as class variables and instance variables. It’s now time to move on to other fundamental concepts such as methods. Aim of this notebook In this second part we will explore the static methods and... Read More
-
Object-oriented programming in Python: Classes - Part 1
Introduction Python is an object-oriented programming language and therefore the emphasis is on objects. But what is an object? An object is a fundamental building block: integers, strings, floats, dictionaries, are all objects and a class is a blueprint for that object. Think of a class as a sketch of a human body. We generally draw details o... Read More
-
Wordle: A Python Implementation
Introduction Wordle is a web-based word game created and developed by Welsh software engineer Josh Wardle, and owned and published by The New York Times Company since 2022. Why? Well, the word game that has grown from 90 users in 2021 to around 2 million in February 2022.1 Players have six attempts to guess a five-letter word, with feedback gi... Read More
-
EDA is awesome: Having fun with Altair
Scope of the notebook This notebook collects some explorations of Altair’s most interesting features on the Kaggle’s House Prices competition. For a basic tutorial on Altair, I created a notebook with the Titanic dataset! import altair as alt import numpy as np import pandas as pd alt.renderers.enable('html') train = pd.read_csv('train.csv... Read More
-
Cross Validation and Nested Cross Validation
Introduction In this post I will explore the concept of Cross Validation (CV) and its upgrade, the Nested Cross Validation, in a normal Machine Learning pipeline. It is often unclear when to use this fundamental technique and how to avoid information leakage. This notebook was published on Kaggle and is part of the Song Popularity Competition ... Read More
-
Citizen Data Scientists: the role of AutoML
Introduction I recently took part in the Kaggle’s annual Machine Learning and Data Science Survey competition together with a colleague of mine, Alessia Musio. The Survey, as stated in the Kaggle page, presents a comprehensive view of the state of data science and machine learning and was live from 09/01/2021 to 10/04/2021. After cleaning the ... Read More