It’s never aliens (Until it is)

Introduction.

“Are we alone in the universe?”.
When it comes to answering one of the most relevant questions that humanity has still open, we have to admit that we don’t have a clue. The first historical references to the question are found in ancient Greece. Greek and Roman philosophers reasoned that since the universe seemed to be so vast, it would be reasonable to think that other “tribes” would be living somewhere out there. Later on, religious thinking displaced logical reasoning and humanity became special just because it was God’s will for humans to be special. It was not until the Renascent, when others started to ask the same question again: “If the Earth is no the center of the universe and there are other planets and stars, why should be life on Earth special?”

If you think for a second about the implications that answering that question would have, you soon realize how crucial it is for us, humans, to find the answer. It doesn’t matter the answer itself, just knowing with 100% certainty that there is (or that there is not) life somewhere else in the universe, would change our view of the universe.

Unfortunately, neither ancient greeks nor guys like Copernicus and Huygens had the technology to answer the question, and indeed we still don’t know if we can answer that question today. But here in this post, I will show you some of the current approaches that we, humans, are using to try to answer the question.

Read More

Using numerical models to simulate viral outbreaks: 2019-nCoV

Introduction

December the 31st, the Chinese health authorities reported a case of pneumonia of unknown origin. On January the 3rd, another 43 cases were reported to the WHO. Twelve days later, the Chinese government had found that all the cases of pneumonia were caused by a new type of coronavirus and traced back the origin of the disease to a seafood market in Wuhan.
One month later Wuhan is under lockdown, 639 persons have died, there are 31153 confirmed cases plus 26359 suspected cases and the virus has reached 23 more countries (Updated on February the 7th).
Today, I am going to explain how to use numerical simulations to study and predict outbreaks like this one.

population

Read More

Computational Drug Discovery (Novice Mode)

Introduction

We humans learned how to use drugs many thousands of years ago. The shaman of the tribe already knew which roots and plants had healing effects on sick people. Of course, he didn’t know of anything about chemistry or why they worked, but it was the pre-scientific era, so who cared?!

Slowly, mankind became better at using drugs, but only as a consequence of a long trial and error process and it was not until the scientific revolution when we started an active and systematic search for new medicines which, together with the advances in chemistry and biology, lead us to a golden age of medicine in the middle of the 20th century when there was an explosion in the number of antibiotics, anticancer and antifungal treatments. It seemed that in a few years we would be able to cure anything. Unfortunately, that was not the case, fungi and bacteria are becoming resistant to treatments and anticancer therapies are still ineffective and unspecific. Moreover, the drug-discovery pipeline is still slow and inefficient and since the number of drugs-to-be-found is finite, it is becoming more and more difficult to find novel bioactive-chemicals, making the process extremely expensive.

We clearly need new approaches to speed up the process of drug discovery and in these series of posts, I will present some ideas about using ML and AI to reach that goal.

Read More

Teaching a Computer How to Draw

Do Androids Dream of Electric Sheep? Let’s talk about VAAAAAAAAAAAAAAAEs!!!

Introduction

My son’s favorite animal is sheep. He still doesn’t talk and he doesn’t know the name of the animal, but he bleats each time he sees one, it doesn’t matter if it is in a book, a video, a plastic figure or in real life. He clearly knows how a sheep looks like.
I know that I have already discussed this kind of topics before but I would like to bring this question up again because the more I understand how difficult is to train machines the more I realize how amazing the human brain is. With just one year, the developing human brain has all the neuronal circuits that allow it to learn to recognize patterns no matter how different they are. Think for a second how different it is to see a sheep in the fields when compared with a more or less accurate drawn of a sheep in a book.
But not only that, a human brain has stored the idea of how a sheep looks like and it can extract that encoded information to draw a sheep anytime.

In this post, we will see how to train a computer to do exactly the same, recognize, store and draw a picture of a sheep.
Sheep

Read More

Using Machine Learning to Analyze Your Genes

Introduction.

A few months ago my wife told me that she wanted to try one of those fancy genetic tests that look for your ancestors, so you can know where they were from and even find distant cousins around the world. Despite I advised her against it because of privacy reasons. She insisted and I bought her a kit from MyHeritage (Don’t worry! what I am describing here this post applies to 23andme, ancestry, etc).
After receiving the results she immediately felt disappointed: just a few percentages relating her genes (or whatever they measure) with some populations around the globe. That was all!!!.

Read More

Creating VAEs in R (Part 1)

Introduction.

Of all machine-learning models, I personally find autoencoders (AE) really fascinating. AE are a special type of unsupervised models assembled by two sub-models: an encoder and a decoder. Encoder and decoder have an inverted shape and between them there is an internal layer which is the layer with fewer dimensions of the model and after training it will contain the latent space of the input.

Shape The latent space is a hidden and simplified representation of the data in which more similar elements lay closer.

Read More

Face Recognition in R using Keras

Introduction.

For millions of years, evolution has selected and improved the human ability to recognize faces. Yes! We, humans, are one of the few mammals able to recognize faces, and we are very good at it. During the courses of our lives, we remember around 5000 faces that we can later recall despite poor illumination conditions, major changes such as strong facial expressions, the presence of beards, glasses, hats, etc… The ability to recognize a face is one of those hard-encoded capabilities of our brains. Nobody taught you how to recognize a face, it is something that you just can do without knowing how.

Read More

Deciphering the FrozenLake Environment

Introduction.

Welcome to a new post about AI in R. In this post, we are going to explore different ways to solve another simple AI scenario included in the OpenAI Gym, the FrozenLake. FrozenLake in a maze-like environment and the final goal of the agent is to escape from it. The environment is a representation of a frozen lake full of holes, the agent has to go from the starting point (S) to the ending point (G) avoiding the holes (H). The trick is that the agent must walk over frozen tiles (F) to reach the ending point. Unfortunately, the agent can’t perform the desired actions accurately when it is walking over a frozen tile, so each time an agent performs one action there is a chance that it ends up moving into an unwanted direction.

The environment is finished when the agent reaches the (G) tile (Reward=1) or when it falls into a hole (Reward=0).

Read More

CartPole, Under the Hood

Introduction.

In my last post I was showed how to implement AI strategies to solve the CartPole environment, assigning and testing sets of 10 random values as weights of a very simple neural network. In this post, we are going to investigate a bit more on what is going on during these processes.

Read More

Welcome to my blog!

Finally I have decided to write a blog where I can share all my code and ideas about ML and AI. Stay tuned !

Fig1

Read More