Select Page

Learn AI from Scratch: A Complete Guide

by | Mar 4, 2024 | Data Science, Machine Learning

Want to break into AI and build a career? There’s never been a better time. The internet is crowded with resources to learn more about AI.

It is also crowded with advice on how to learn more about AI. So if you feel overwhelmed by the vastness of the field, the booming of resources, and don’t know where to begin, you are not alone. Discerning among the resources and advice to find the best can be daunting. But with a bit of patience and help, you can really learn those skills you so desire.

So, let’s start from scratch. In this comprehensive article, I’ll first introduce you to the world of AI, then tell you which skills you need, and finally show you a complete roadmap to go from beginner to expert. Before you know it, you’ll tell those machines how to learn patterns from data and automate decisions yourself.

Let’s dive in.

 

AI today

Artificial Intelligence has seeped into every sphere of today’s digital world, from automated Chatbots to self-driving cars. The applications of Artificial intelligence have added value in banking, finance, and even in healthcare. It has also infiltrated more problematic areas like crowd surveillance.

The adoption and use of AI will increase over the next decades. AI will revolutionize our decade, as smartphones did in the early 2000s. It is crucial to understand what AI is, how it works, and the underlying potential for any person, be it a student, a working employee, an aspiring entrepreneur, or a consultant.

 

What is Artificial Intelligence?

Artificial Intelligence, or AI, is the process by which machines can learn and make decisions “like humans”. How can a machine mimic a human? By using historical data where humans have made decisions in different scenarios, machines learn to find and understand patterns. For example, when a person applies for a loan, an employee of the bank would have evaluated his financial strength and legitimacy, among other things, to either reject or approve their application. We collect data from thousands of loan applications and their final approval/decline decision and provide it to AI. Then, AI learns which factors influence the decision, and can tell us the risk of newer applications. This was just one example of how AI works.

So, what is Artificial Intelligence or AI? It is the development of algorithms and systems that enable computers to perform tasks that typically require human intelligence, such as visual perception, speech recognition and decision-making, among others.

 

What falls under AI?

The field of AI is a vast ocean. You would have often heard of buzzwords like ML, DL, and NLP. What are these? Let’s clarify that.

Machine Learning: It is a subset of Artificial intelligence, that involves training algorithms to learn patterns, and make predictions or decisions based on past data. Machine learning (ML) algorithms do not have to be explicitly programmed, unlike traditional computer science algorithms. The ML techniques can be broadly grouped into 3 categories: supervised learning, unsupervised learning, and reinforcement learning.

Supervised learning involves teaching the computer by providing it with labeled examples, like showing it pictures of dogs and cats and telling it which is which. Unsupervised learning lets the computer find patterns in data without explicit guidance, like sorting a pile of mixed-up toys into groups based on similarities. Reinforcement learning is like teaching a computer to play a game; it learns by trying different actions and getting feedback, gradually figuring out the best strategies to achieve its goals.

Deep Learning: This is a subset of the Machine learning domain, where artificial neural networks are used to learn representations of data. Neural networks are algorithms that are inspired by the structure and functioning of the human brain. We refer to the units of neural nets as neurons, as they mimic the brain’s neuron cells. Neural networks consist of interconnected nodes (or artificial neurons) organized in multiple layers, giving rise to the name ‘deep’ learning. Deep learning algorithms are capable of learning complex patterns and have superior performance than other ML methods. Remember, every deep learning method falls under Machine learning but not vice-versa.

Data Science: Data science is the space where we apply AI, ML, and DL techniques along with mathematics, and statistics to derive insights from data. Many organizations or product-based companies hire data scientists and build a data science team to extract impactful learnings from the data they collect. You can say that data science is a cross-disciplinary field that integrates AI tools and technologies with application-oriented analytics.

Diagram showing what Artificial Intelligence (AI) entails, showing how the different subdomains overlap. Artificial intelligence is an umbrella term that encompases machine learning, which in turn encompass deep learning. Data science is a cross-disciplinary field that uses methods from AI to extract insight from data.

Specializations under AI

In the previous paragraphs, we made a broad categorization of the field of AI. In addition, machine learning techniques can be also grouped into Natural language processing and Computer Vision, based on the type of data they are designed to process, and their intent.

Natural Language Processing (NLP): NLP is the field of AI that specifically analyzes text or language-based data. The algorithms are developed to understand and comprehend the human language, be it English or Hindi, or any other language. It’s a crucial field in today’s digital world, where huge information lies in documents, like medical articles, news, or social media posts, among others. The applications are diverse; from sentiment analysis, machine translation, and text summarization, to conversational AI. The latest advancement in NLP is the large language models (LLMs) that power ChatGPT or Bard, among others.

Computer Vision: This field develops techniques that allow computers to understand image datasets. Computer vision enables computers to interpret and understand visual information from the real world. The applications include tasks such as object detection, image classification, and facial recognition. Yes, your phone’s facial recognition works through computer vision!

 

Why learn AI?

AI is shaping how businesses make decisions and improving efficiency across many industries. As the adoption of AI grows, there will be more job roles available in this field. Let’s take a quick look at the major use cases of AI and their potential market:

  • Automating Tasks: Businesses use AI to increase their efficiency. AI excels at repetitive tasks like data entry, data cleaning, or sending out timely reports, among other tasks. Through automation, AI helps businesses save hugely on manual labor and wages. Robots assemble cars in supply chain lines, and automatic billing systems are in place.
  • Personalization: Users consume a lot of content on various platforms like Netflix, Amazon, Flipkart, or Instagram, among others. All these platforms can provide customized recommendations to their users using AI. ML models use historical choices, orders, and reviews to better understand customers’ preferences. The use cases are extensive, ranging from using AI in  E-commerce, like Amazon, and entertainment, like Netflix, to marketing. It can improve customer satisfaction and retention, while also increase sales.
  • Improved Customer Service: Chatbots and virtual assistants powered by AI are transforming customer service by providing instant responses to queries, improving response times, and reducing customer wait times.
  • Enhanced Decision Making: AI systems can analyze vast amounts of data quickly and accurately, enabling businesses to make data-driven decisions. For example, AI and ML models can be used to forecast future demands of a product using seasonal trends. This in turn helps businesses to prevent understocking or overstocking. AI is also being used for resource allocation and planning in the supply chain industry.
  • Boosting Healthcare: Introducing AI algorithms to run preliminary scans has proven to be helpful in rural areas where medical facilities are scarce. AI can be accessed easily through remote servers to provide an initial assessment. Deep learning algorithms are used to find anomalies in X-rays and scans to identify diseases early on.

As AI automates some tasks, it also creates new job opportunities in fields such as data science, machine learning, AI research, software engineering, and robotics. AI and Machine learning expertise is rapidly becoming a top requirement across industries, from healthcare and finance to tech and manufacturing. In the next section, we will look at the fundamental skills required to break into this domain.

 

What are the skills required for AI?

In every AI team, there are multiple roles, such as Business Analyst, Data Engineer, Data scientist, Machine learning Engineer, and MLOps engineer, among others. Each role plays a part in the lifecycle of a data science project and requires a specific combination of technical and soft skills. First, I’ll introduce you to the basic AI skills that are prerequisites for a career in AI. Then, we’ll discuss the specific role-wise expertise required.

 

Probability and statistics:

You need to understand probability and statistics to understand how machine learning algorithms work. Probability theory provides a mathematical framework for modeling and quantifying uncertainty.

  • You need to be familiar with core concepts like conditional probability, Bayes’ theorem, expectation, variance, and random variables.
  • Learning probability distributions (binomial, normal, Poisson, etc.) and their properties will help in observing patterns seen in the data.
  • Learn techniques for estimating parameters, hypothesis testing, and confidence intervals.
  • Bayesian Statistics: Familiarize yourself with Bayesian methods for inference and decision-making.

 

Linear algebra:

In AI, data is often represented as vectors, matrices, or higher-dimensional matrices, called tensors. Raw Images are in pixel format, which can be represented as matrices. How can English texts be conveyed to machines? Using vectors of word frequencies. To read and manipulate data structures such as matrices, and vectors, you need to have some knowledge of linear algebra.

Start by understanding matrices and vectors, and how to perform operations with them. Next, learn about eigenvalues, eigenvectors, singular value decomposition (SVD), and matrix factorization. Finally, you should master vector spaces and linear transformations.

 

Mathematics

In addition to statistics and linear algebra, there are a few other mathematical concepts used in the internal working of ML algorithms. Familiarize yourself with differential and integral calculus, and optimization techniques. Neural networks use optimization functions to achieve the best performance. Learn about main optimization algorithms such as gradient descent, stochastic gradient descent (SGD), and Newton’s method.

 

Basic Data Structures

Understanding basic data structures is essential for learning AI as they serve as the building blocks for organizing and manipulating data. You need to learn to use basic data structures like arrays, lists, dictionaries, hash tables, and trees. Arrays and lists are used to store and manipulate sequential data. Hash tables facilitate efficient data retrieval and storage. By choosing an efficient data structure, you can save computation time and memory overhead.

Skills needed for ai

Python Programming & Libraries

To implement anything in AI, you need to master a programming language. The most widely used programming language in data science is Python, followed by R and Julia. Python is the top choice as it is easy to learn and has a simple interface. Python is a versatile language, providing many frameworks for different stages of data science like data manipulation, visualization, or model training, among others. It integrates easily with various other APIs. The open-source community of Python is the heart of AI research and development. There are numerous resources, tutorials, and community-driven contributions to support debugging, and updating libraries, among other things. Let’s take a quick look at the top Python libraries you should learn:

 

Data Storage & Manipulation:

The first stage of any ML project is data processing. This involves reading data from raw files, converting it into a suitable format, and cleaning the data, which in practice means looking for ‘dirty” variables and reformatting them into a format that can be used for analysis or predictions. In some cases, we might replace missing values with substitutes like the mean or the median value of the variable, for example. These libraries are essential for reading data, data preprocessing, feature extraction, and feature selection.

  • Numpy: It is the fundamental library for scientific computing in Python. It provides support for multi-dimensional arrays and matrices, and the application of mathematical functions.
  • Pandas: It is a powerful library for data manipulation and analysis in Python. We use pandas to read data files (CSV format) into DataFrames and Series. It provides support to perform data cleaning and transformation. Pandas is indispensable in any AI project with tabular data.

 

Data Visualization:

Once data is read and cleaned from noise, you can gather initial insights through data visualization techniques. This involves creating various types of plots to understand the relationship between different features and the target variable, if you have one. We can discover seasonal trends and cyclic patterns, or understand variable distributions among other things.

  • Matplotlib: Matplotlib is the simplest and most widely used library for creating static plots. It offers a wide range of options like scatter plots, bar plots, waterfall plots, and histograms, among others. It also provides options for plot customization.
  • Seaborn: Seaborn is built on top of Matplotlib and provides a high-level interface for creating attractive and informative statistical graphics. It simplifies complex plotting tasks and offers built-in themes and color palettes for enhancing visualizations.
  • Plotly: It is famous for its interactive visualizations. Plotly’s interactive capabilities allow users to explore data and gain insights through mouse interactions and zooming functionalities over the plots it produces.
  • Bokeh: Bokeh is another library for creating interactive visualizations in Python. Bokeh offers easy embedding into web applications, for example, to share the visualizations online, through dashboards.

You also need to learn which type of chart is best for interpreting a specific business problem. For example, pie charts are ideal for Visualizing the distribution of market segments by revenue share.Histograms are better for representing the distribution of customer ages in a target market. Box plots are useful in pinpointing outliers. Heatmaps are your go-to choice to represent interconnected and complex patterns among the variables.

 

ML and DL frameworks:

The following Python libraries are essential for developing AI models across various domains. They provide high-level APIs, classes, and tools that simplify the process of training, evaluating, and deploying machine learning and deep learning models.

  • Scikit-learn: It is a versatile machine-learning Python library that supports a wide range of algorithms and tools. It provides utilities for data preprocessing, feature extraction, model training and model selection. In supervised learning, it provides in-built support for ML algorithms like linear regression, logistic regression, and decision tree based models, such us Random Forest, and gradient boosting machines. For unsupervised learning tasks, it supports for example the use of k-means for clustering. Scikit-learn is suitable for both beginners and experienced practitioners due to its easy-to-use API, extensive documentation, and robust performance.
  • PyTorch: It is an open-source deep learning library developed by Facebook’s AI Research lab. It offers utilities for building and training deep neural networks with dynamic computational graphs. PyTorch provides support for GPU acceleration. PyTorch can be used for heavy tasks such as image recognition, natural language processing, and reinforcement learning.
  • TensorFlow: An alternative to Pytorch, TensorFlow is an open-source deep-learning library developed by Google. It provides a comprehensive framework for building and deploying deep neural networks at scale. TensorFlow offers a static computational graph approach, distributed training capabilities, and support for production deployment through TensorFlow Serving and TensorFlow Lite.

Libraries for Specialized Tasks:

Apart from the libraries discussed above, there are a few prominent libraries developed for specialized tasks based on the data type or business requirement.

  • NLTK: It is the simplest library to process and clean text data. It is used widely in NLP for tasks like sentiment analysis and topic modeling.
  • OpenCV: It is developed for computer vision tasks. It provides functions and utilities to read, transform, and analyze image datasets. It is useful in applications like image processing and object detection.
  • SciPy: SciPy offers efficient algorithm implementations for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations, and statistics.
  • Hugging Face Transformers: Leverage pre-trained transformer models for various Natural Language Processing tasks.
  • Streamlit: This library helps you showcase your AI projects and their impact effectively. You can create interactive web applications for deploying your AI models. It can be a great addition to your resume

These libraries play a crucial role in AI development by providing tools and frameworks for building, training, and deploying machine learning and deep learning models.The list doesn’t end here. In addition, there are libraries for tasks like time series forecasting, missing value imputation, model interpretability (SHAP, LIME), and MLops, among other things. Learning how to use some of these libraries will set you up with a strong foundation to proceed ahead.

 

SQL (Structured Query Language):

SQL is an indispensable tool in teams working with big data stored in relational databases. SQL is used to access, manipulate, and analyze structured data. At one point or another, you will need to use SQL. So it might be a good idea to get familiar with some basic commands like SELECT, WHERE, GROUP BY, ORDER BY, INSERT, UPDATE, and JOIN. There are some open source versions that you can use to get a handle of how it words.

SQL‘s ability to join tables enables data scientists to merge and analyze data from multiple sources. The best part is that you can integrate SQL seamlessly with frameworks such as Python, R, or Apache Spark. SQL is also very easy to learn and a common choice for enterprise-level data analysis.

Story-telling with Data:

The role of a data scientist or business analyst is not just to analyze data, but to express the findings in a way that a non-technical audience can understand. Often, in many businesses, multiple teams have to work together. For example, you may need to explain your findings to a product manager, or the marketing team. This is where you need to learn the art of storytelling with data. Here are 5 steps on how to deliver a crystal clear presentation:

  • Understanding your audience: Tailor your story to their needs, preferences, and level of technical expertise.
  • Identifying key data points: Choose the data that tells your message, avoid cluttering. Present the analysis specific to particular segments of interest, for example, market shares like ‘urban youth’, ‘rural region’, etc
  • Crafting a narrative: Structure your story with a clear introduction to explain the problem at hand. The analysis should end with a summarized conclusion on your recommendations.
  • Data visualization: Leverage charts, graphs, and other visual elements to make data understandable and visually appealing. You can take the help of BI tools like Power BI or Tableau to create dashboards.
  • Communication skills: Present your story with clarity, confidence, and enthusiasm

Data Storytelling with Visualization and Narrative

That covers the main range of skills needed for a career in AI. Whether you’re a researcher, data scientist, or AI engineer, mastering these skills equips you with the skills and tools needed to tackle a wide range of AI tasks effectively. Of course, specific job roles would require expertise in a specific set of tools. In the next section, we’ll be diving into that.

 

Which AI role needs what expertise?

In this section, we’ll see what the main career paths in Artificial Intelligence are and the specific expertise they require.

  1. Data Scientist: Data scientists are responsible for interpreting large amounts of complex data and building statistics models. They employ statistical analysis, machine learning, and data mining techniques to derive insights and solve problems.
    Skills: Python programming, SQL, statistics, machine learning algorithms and techniques.
  2. Business Analyst: They bridge the gap between technical teams and business stakeholders. They ensure that data science solutions align with business objectives. They translate complex technical findings into actionable insights for non-technical decision-makers.
    Skills: data analysis tools like Excel or Google Analytics, Business Intelligence tools (Power BI, Tableau), Excellent communication and presentation abilities
  3. Machine Learning Engineer: The role focuses on designing, building, and deploying machine learning models into production systems. They work closely with data scientists to turn prototypes into scalable solutions, optimizing for performance and efficiency.
    Skills: Python, Java, machine learning algorithms and frameworks such as TensorFlow or PyTorch, software engineering principles, and cloud computing platforms (AWS or Azure).
  4. Deep Learning Engineer: DL engineers specialize in developing neural network architectures and algorithms for solving complex problems such as image recognition, natural language processing, and speech recognition.
    Skills: Python, DL frameworks like TensorFlow, Keras, or PyTorch, Strong understanding of neural network architectures and optimization techniques, GPU computing and parallel processing.
  5. NLP Scientist: This role involves developing algorithms and models for understanding and processing human language. The tasks range from sentiment analysis, text classification, named entity recognition, and machine translation. The most recent advancement has been Generative AI opening up new avenues in text generation.
    Skills: Python, NLP libraries like NLTK, SpaCy, or Hugging Face Transformers, RNNs.
  6. MLOps Engineer: Is the work done once a model is developed and deployed? Absolutely not! The performance may degrade due to data drift, technical issues, etc. They build automated pipelines for training, testing, and deploying models, ensuring reproducibility, scalability, and reliability.
    Skills: DevOps tools like Docker, Kubernetes, Jenkins, and Git, understanding of CI/CD, familiarity with monitoring, logging, and alerting systems.

Different AI roles and their responsibilities and interrelationships.

How to learn Artificial Intelligence from scratch?

Now that you have an understanding of the skills needed in various AI career paths, let’s explore how you can acquire them. With a plethora of resources available, it’s easy to feel overwhelmed. That’s why we’ve made a summary of resources for beginners on previous articles.

If you like learning from courses, check our our recommendations on data science and machine learning courses. If you prefer reading, we also have you covered; check out our recommendations for best machine learning books for beginners.

To streamline your AI journey, I’ve also compiled some additional learning resources here to kickstart your learning path!

 

Learn from Courses and Books

The first step is to learn the most basic skills. You can do this with books, AI courses, or blogs. There are numerous tutorials and artificial intelligence courses available on sites like Coursera, Udemy, and Train in Data. If you are looking for open-source online courses, there are free videos available of MIT OCW on YouTube. I am adding a few basic courses to help you get started:

 

Once you’ve mastered the basics, you can build up your skills with more advanced courses on specific topics. Check out courses and books that are relevant to your specialization like:

 

Participate in competitions

Learning AI and implementing it are two different things. Only when you get hands-on experience working with datasets, you will understand the different stages of an AI project cycle. There are unique challenges posed in every stage of the data science problem. For example, in data preprocessing, we may have a lot of missing information, mismatched format, and manual errors. There may be a high correlation among independent variables, or some data that just adds noise. Before building a predictive model, we normally carry out feature selection and feature engineering. There are computational challenges to consider while working with big data sets as well. Hence, practical experience is of utmost need.

The best way to get good practice is by participating in Kaggle competitions. Kaggle is the most thriving data science community. The platformt has short courses, public datasets that you can use, and competitions you can enter to hone your skills. You can also refer to the notebooks shared by other AI professionals and ML practicioners to learn more about how people work in the field. This would give you ideas on different approaches to problem-solving, help you identify your shortcomings, and improve your skills even further. Apart from Kaggle,check out DrivenData, and Topcoder.

 

Create a projects portfolio

The next step on your AI learning journey is to create and deploy AI projects that you can include in your resume. There’s huge competition in the industry, and end-to-end projects with results will give you an edge. You can refer to GitHub repositories and sample projects in blogs for inspiration. Here are a few ideas to kick-start your projects:

Predictive Modeling for Customer Churn Prediction in Delivery Apps: You can Build a predictive model to identify customers who are likely to churn (cancel their subscription or leave a service). You can create new features based on data such as customer demographics, usage patterns, and interactions.

Reinforcement Learning for Game AI: Develop an AI agent using reinforcement learning techniques to play and improve its performance in games like Atari and Ludo. This will showcase your solid foundation in mathematical concepts like Markov Decision Processes, Q-learning, etc. You can leverage game development frameworks like OpenAI Gym, and Unity ML-Agents.

Extract Top Tourist Places Using NER: This is an NLP project, where you can use social media data like tweets to extract information. NER or Named Entity Recognition is a technique to extract entities from text data like names/nouns, places, organizations, etc. You can develop and train a custom NER using libraries like spaCy, gensim

Chatbot for hospital appointments with Open AI: Generative AI applications are increasing each day with new LLMs like GPT, Llama, and Mistral. You can use OpenAI‘s GPT-3 language model API to create a Chatbot to answer queries, make slot bookings, and resolve complaints of patients for a hospital. Implement techniques like text cleaning and intent recognition to improve the chatbot‘s responses.

 

How to evaluate your work?

While creating any project, do research on the right set of evaluation metrics you choose. Selecting the right evaluation method will develop your domain knowledge. For example, you need to choose between mAP – mean Average Precision or IOU in computer vision tasks.

When deploying self-projects and showcasing your work in AI, it’s essential to choose user-friendly tools. You can create a GitHub repository for your AI project, and upload your code, documentation, and any related resources. Streamlit is a Python library for building interactive web applications and showcasing your AI models, visualizations, and insights. Heroku, AWS, and GCP are other options.

 

Go to conferences & mixers

A great way to learn practical aspects of data analysis and AI projects is through the experience of industry experts. There are many webinars, conferences, and data science summits where leaders in AI share their learnings, failures, and suggestions. You also get the chance to meet people working in data science across different industries like finance, marketing, fraud decision science, etc. This will help you understand cross-functional projects in the long run.

It’s also the best way to stay up to date even if you are an experienced data scientist. It is a restless field, with new tools, techniques, and research going out every week.

Master AI through books, projects, competitions and conferences

Conclusion

The jobs in AI are expected to increase over the next decade. This guide gives you a roadmap to begin your AI learning journey. I hope you enjoyed the read. If you feel stuck on any topic or project, check out open-source communities like Stack Overflow, Reddit, and Github documentation. If you are looking for specialized courses to improve your knowledge of machine learning, check out the courses and blogs available on Train in Data.