AI oriented physicist. Martial Artist, song-writer, professional-google-searcher. Contact me: piero.paialunga@hotmail.com
Image for post
Image for post
Photo by Raphael Lovaski on Unsplash

Here’s how to use Artificial Intelligence to write a song that doesn’t exist.

I’m a musician, and a data scientist.

I spend my days writing codes and studying statistical theorems. Then (when it gets dark outside) I like to write music.

But it is possible to write music while coding?

The answer is yes, and I’m about to show you how.

Schedule:

  1. The…


Image for post
Image for post
Photo by James Day on Unsplash

Convolutional neural networks can help us in performing extremely important classifications for our communications, satellites, people. With 0 domain knowledge.

The majestic gas ball that is the Sun has crucial effects in our lives. We know and live this life thanks to this star and it is close enough to have magnetic and deep study about it too.

In particular, solar flares are sudden flashes that occur on the Sun. You may think that in your life you have more serious stuff to think about, and you are probably right. …


Here’s what I’ve learned as a data scientist working on climate change data

Image for post
Image for post
Photo by Jacqueline Godany on Unsplash

When some time ago I’ve heard from my television about the last Australian bushfire season, it was really terrible to hear. I was on another project at that time, but I’ve put this on my to-do-list, promising to myself that I would have worked on that to get an unbiased and data-driven opinion about climate change.

Let’s get started.

Schedule:

0. The libraries

  1. Stationarity test
  2. Extreme events study
  3. Data modelling
  4. Conclusions

0. The Libraries:

Here’s the collection of the libraries that have been used. Additional libraries may be required during the story, but all the libraries can be found in the notebooks that are reported. …


Shot by Takahiro Sakamoto
Shot by Takahiro Sakamoto
Shot by Takahiro Sakamoto

A real example from astrophysics that shows you how to improve your models by using ensemble learning in a creative way

Let’s pretend for a second that Machine Learning models are real human beings: none of them is perfect (besides you, of course).

Some models could be too anxious, someone too jealous, someone too arrogant. The real magic happens when you fall in love with someone that is able to see your weak points and helps you improve them, and he/she emphasises your good sides. This is the exact idea of Ensemble Learning.

In fact, it is based on the idea that a wide collection of models is able to perform better than each model that is taken in isolation. …


An interesting scenario where Principal Component Analysis components are actually easy to interpret, from astrophysics

Image for post
Image for post
Courtesy of Emily Morter

Every data scientist, especially the ones that find themselves to work with Big Data, knows the importance of dimensionality reduction. If you have a dataset that has a large amount of columns and you have a Machine Learning task to complete:

  • B) It could perform really badly

This algorithm projects your data into another dimension, but with lower dimensionality. Speaking in simple terms, it reduces the number of columns. The disturbing fact is that if you start with a dataset that is readable and easy to interpret, with almost (hey, I said almost) any probability you will end up with a reduced number of column, but they are not easy to understand at all. …


One way to prevent noise to affect your data driven projects

Image for post
Image for post
Valentin Salja, from Unsplash (https://unsplash.com/@valentinsalja)

Noise is so difficult to treat, every data scientist knows that.

The fact is that, as one dear friend of mine loves to say,

“The hardest part of getting what you want is figuring out what it is”

Indeed, we can’t specify what noise really is. As a physicist, I find myself in the situation of studying a dataset and trying to understand if my data has a physical sense. When a clear pattern can’t be identified in a part of my data (or my signal) , I tend to classify that part as “noise”. But, this approach could be dangerous and misleading.


Is it possible to clean your data and forecast the new ones by only using a Fourier Transform? The answer is yes, maybe.

Image for post
Image for post
Image by Jon Tyson https://unsplash.com/@jontyson

One of the sentences that my professor used to say in high school was that “History repeats itself” . The sense of this sentence is obviously related to the fact that we should learn from history, thus being able not to do the same mistakes that we have done in the past.

Now let’s talk about science. If you have a time series, then you have your data for a (preferably) long time. Let’s assume for a second that history actually does reproduce itself. That will mean that by simply replicating the signal you will extend your data, thus obtaining a twice longer dataset. I know what you’re thinking, and you are right, I’m fooling you. Indeed, what I’m essentially mentioning in these few lines is the Fourier Transform, that states that each periodic signal can be seen as a sum of sines and cosines. …


Image for post
Image for post

If you are a data scientist, one of your typical task is to analyze a certain signal and find its peaks. This may be your goal for a ton of reasons, but the bigger one is that peaks somehow tend to show a certain property of your signal. It is not surprising that a library that helps you finding peaks does already exist in Python, and it is SciPy (with its find_peaks function). …


A quantitative description of what overfitting is and how to avoid it, implemented in Python.

Image for post
Image for post

When you are a kid, sometimes your overprotective mother makes you feel beautiful, smart and kind. Of course, if you are one of those kids, you are confident that everyone thinks exactly the same thing that your mother thinks about you, but when you grow up and you go to school, sometimes your teacher tells you that you are acting wrong, and you are not so kind or smart or beautiful! In that moment you need to realize that maybe your mother loves you too much and gave you a false impression of yourself: your model is overfitting :)

If we think in Machine Learning terms, we find ourselves in an ‘overfitting’ scenario when our computational power is higher than how much it is required for our specific task. In other words, our algorithm is able to have good performances in our specific dataset, but it is not able to generalize the task for a dataset that it has never seen. …


Descrizione di implementazioni di tecniche di Machine Learning in grado di distinguere i film di successo da quelli non apprezzati dal pubblico.

Image for post
Image for post

Cominciamo con una doverosa premessa. Non esistono film belli o film brutti. Quando si tratta di un film si considera una creazione artistica e, come tale, essa non è valutabile se non in modo strettamente personale. In una sua meravigliosa citazione, Meryl Streep afferma addirittura di avere una teoria per cui i film lavorano nello stesso piano dei nostri sogni.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store