Artificial Intelligence in a Nutshell

Humanity’s last invention?

AI is everywhere

For starters, everything that is digital is made up of code. Nowadays, anyone can program a video game, website, or app on their normal laptops.
AI is code too. For sure, it is a much more complex type of code, but anyone that knows, can program it on a normal computer as well.

Artificial Intelligence is the science and engineering of making intelligent machines

What most people don’t know

As I was saying, much of the news is about AI taking over the world or achieving extraordinary things in the “near future”. The truth though, is that you are already interacting with this technology in your day-to-day.

Different flavors

Not all kinds of AI can recognize speech like Siri does, or recommend the best series based on what you’ve watched on Netflix before. We need to start thinking of this technology as a tool that we can use for different purposes.

Image credits

Types of problems

So AI is a tool that can be used for a lot of different things, and Machine Learning is a kind of AI that can learn and improve (on its task) based on data and experience. So, what kind of things can Machine Learning do?

AI can classify cats and dogs given images 😯

Machine Learning algorithms

You knew this was coming. So yes, we can work with different kinds of algorithms in ML, depending on the data available, the kind of problem, and what we want to achieve.

How Machine Learning actually works

If this was the first article I read about Artificial Intelligence, I’d be confused at this point. What does Sofia mean by “training” the algorithm?
Don’t worry now. In this section, we’ll be going behind the scenes and learn what these algorithms are, and how they are coded.

Code like a toddler

Machine Learning is like a toddler. Toddlers don’t know much about the world, let alone specific tasks. However, with the right training and enough amount of practice, they can actually master the skill that they want.
An example of this is learning how to walk. We weren’t born learning how to do that. We had to practice, and we’d often fall, but now we’re experts 🙌.

Train an algorithm with data so it can work on it, improve, and be ready to make decisions

The process of getting an ML code is simple at the surface level. Here are the most important steps to follow:

  1. Gather the data
    - If you’re working on an algorithm to classify cats and dogs, you’ll want to get lots of images of those
    - Due to the advancements made in the field, there are websites like Kaggle where you can find many different kinds of data sets
  2. Prepare the data
    - This step is often referred to as “data cleaning” as well. It means getting rid of what we don’t need
    - There will be times in which we have spreadsheets with commas, spaces, or characters that won’t let us use the data properly. That’s what we’ll clean
  3. Explore the data
    - You need to know and understand the data yourself before starting to actually work with it
  4. Build the model
    - Model: it uses the ML algorithm to create an output. In other words, it is what makes sense of the input data, and classifies, clusters, or predicts the output
    - This is where the coding takes place
  5. Evaluate the model
    - This is basically running the code and knowing what’s right and what’s wrong with it
    - Based on your evaluation, you’ll need to do some parameter tuning (adjustments and corrections)
  6. Test the model
    - At this point, the code (model) should be ready to be used
    - If you were previously using labeled data to train the model, you can now use unlabeled data since the algorithm has learned how to classify, cluster, or predict data correctly

Let’s do some math

I bet that few of your math teachers told you a truly awesome application of algebra and calculus. Well, in this section we will understand that the so-called algorithms that we’ve been talking about are based on mathematical expressions.

From my perspective, this means that AI is that combination between coding and math.

I’m gonna be honest: I haven’t completely understood the math behind AI. Some of it, I just learned it at school, but there are words like “convolution” that I had never heard of.

Image credits to edureka!
  • Logistic regression: categorical quantities, y depends on x but y is always going to be a value between 0 and 1 or a probability of the value lying between 0 and 1, which can both be represented by using a sigmoid function (S kind of curve).
  • Decision trees: pretty much what it sounds like. You have an initial question (root node) that is connencted with branches to the internal modes which can be either answers (yes) or more questions (no), until you get to the leaf nodes which are the outcomes. You first select the best attribute of the dependent variable (outcome) to be the root node, and have each other attribute to be a tree node and assign classification labels to each of the tree nodes. If it is classified, then stop, else continue iterating
  • Random forest: a collection of decision trees, prevents overfitting the data and is more accurate.
  • Naive Bayes classifier: classifies depending on the probability of something happening again based on the data that it’s given, using the Bayes theorem. Independent variables
  • K nearest neighbour (KNN): classifies a data point depending on the features of its neighbouring data points. Can be used for both classification and regression

Enter Deep Learning

The last, yet the most exciting portion of this article will be dedicated to that specific area of Machine Learning called Deep Learning.


If you wanted to go way deeper into this concept, I definitely recommend checking out this free online book. The purpose of this article in particular (in a Nutshell) is to gain more breadth than depth of knowledge.

Representation of a perceptron where x are the inputs

Neural networks

A neural network is made up of layers and layers of perceptrons. In a simple network, we would have 3 layers: the input layer, the second layer, and the output layer. The first layer would weight the input evidence, while the second layer would make a decision.

Architecture of a neural network

If you’ve heard about Neural Networks before, chances are that you’ve also seen a diagram like the one below. We’ll now look at an example of how Neural Networks can do handwritten numbers recognition.

Image credits
Tiny part of a hand-written number
  1. The first neuron in the hidden layer will detect whether or not an image like the one on the left is present. To put it simply, we could say that the other neurons in the hidden layer are detecting whether or not the other parts of the number are present
  2. The first output neuron would try to decide whether or not the digit is a 0 by weighing up evidence from the hidden layer

Types of neural networks

More classifications for Artificial Intelligence! We’ve gone through different types of problems, algorithms, and now it’s time to consider different types of neural networks.

Diagrams for the different types of neural networks mentioned above

The code

Although there are some tools to interact with Machine Learning without coding, the deeper you get, the better. Coding allows you to truly “personalize” what neural network, algorithms, and problems you want to work with.

  1. PyTorch: used for applications such as computer vision and natural language processing
  2. Keras: high-level. It’s built on top of TensorFlow, so it’s extremely user-friendly and easier than TensorFlow, fast prototyping
  3. Scikit-Learn: preferable for administered and unsupervised learning calculation

Artificial Intelligence x Biotech

Finally, I started to learn about AI since I discovered that it could be such a powerful tool for biotech. Again, I won’t go deep into the technicalities, but rather go through some of the most exciting applications of AI in biotech, and companies that are working on this.


This is probably the most exploited application at the moment. Since we discovered that algorithms can diagnose diseases with even a higher degree of accuracy than medical doctors with decades of experience, we knew this was huge.

Could we finally and totally democratize access to healthcare? What if we all had a doctor in our smartphones? Image credits to SkinVision

Proactive medicine

You’ve maybe heard this before. Medicine has always been more reactive than proactive, meaning that we try to treat diseases after they appear (late). AI is radically changing this by constantly monitoring data, and analyzing our DNA.

Image credits

Dry lab

So far, we’ve talked about scientists working with AI. But what if AI was the scientist? 😳

Disruptive companies

I’ve said this before. If it’s in the industry, it’s something that people want, and it could be huge.

It’s time to build!

With this said, I really hope this article has been helpful for you to understand not only the surface-level tech behind Artificial Intelligence, but also the crucial role that it already has and will continue to have in the decades to come.

Ambitious teenager building innovative projects with Synthetic Biology and Artificial Intelligence

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