Skip to content
elevatedevco

Foundations & Concepts

What is machine learning

Learn What is machine learning: 40 practice questions and answers with an interactive quiz — from the offline AI Learning app.

Intermediate40 questions40 quiz questions

Questions & Answers

Tap a question to reveal its answer. Written for self-study and interview preparation.

What is machine learning in simple words?

Machine learning is a part of artificial intelligence where computers learn patterns from examples (data) instead of being given exact step-by-step rules for every situation. After studying enough examples, the computer can make predictions or decisions about new data it has never seen before.

How is machine learning different from traditional programming?

In traditional programming, a human writes exact rules and the computer follows them to produce an output. In machine learning, the human gives the computer many examples (data and answers) and the computer figures out the rules itself. So instead of programming the rules, we 'train' the computer to discover them.

What do we call the examples we give a machine learning model to learn from?

We call them training data. Training data is the collection of examples a model studies during learning. The more good-quality and varied the training data is, the better the model usually becomes at making correct predictions.

What is a 'model' in machine learning?

A model is the result of training: it is the learned pattern or 'recipe' the computer uses to make predictions on new data. You can think of it as the computer's brain after it has studied the examples. Once trained, we give the model new input and it gives us an output, like a prediction.

What is supervised learning?

Supervised learning is a type of machine learning where the training data includes both the inputs and the correct answers (called labels). The model learns by comparing its guesses to the correct labels and improving. For example, photos labeled 'cat' or 'dog' teach a model to tell cats from dogs.

What is unsupervised learning?

Unsupervised learning is when the model is given data without any labels or correct answers, and it tries to find patterns or groups on its own. A common example is clustering, where the computer groups similar items together. It is useful when we do not know the categories ahead of time.

What is a label in machine learning?

A label is the correct answer attached to a training example. For instance, if a photo of a cat has the tag 'cat', then 'cat' is the label. In supervised learning, labels teach the model what the right output should be.

What is the difference between classification and regression?

Classification predicts a category or label, such as 'spam' or 'not spam'. Regression predicts a number, such as tomorrow's temperature or a house price. Both are supervised learning tasks, but one outputs a class and the other outputs a value.

What is a feature in machine learning?

A feature is one piece of information used as input to describe an example. For predicting house prices, features could be the number of rooms, the area in square feet, and the location. Choosing good features helps the model learn better patterns.

Why does machine learning need lots of data?

Machine learning finds patterns by looking at many examples, so more data usually helps it see clearer and more reliable patterns. With too few examples, the model might learn wrong or incomplete patterns and make poor predictions. Good quantity and quality of data both matter.

What is training in machine learning?

Training is the process where the model studies the training data and adjusts itself to make better predictions. During training, the model repeatedly checks its guesses, measures its mistakes, and improves little by little. After enough training, it becomes good at the task.

What does it mean to 'test' a machine learning model?

Testing means checking how well a trained model performs on new data it has not seen during training. We keep some data aside as a test set and see how many predictions the model gets right. This tells us if the model truly learned or just memorized.

What is overfitting?

Overfitting happens when a model memorizes the training examples too closely, including their random noise, instead of learning the general pattern. Such a model does great on training data but poorly on new data. It is like a student who memorizes answers but cannot solve new questions.

What is a real-life example of machine learning you might use every day?

Video and music apps that recommend what to watch or listen to next use machine learning. They study what you and others liked before and predict what you might enjoy. Other examples include email spam filters and face unlock on phones.

How does an email spam filter use machine learning?

A spam filter is trained on many emails already marked as 'spam' or 'not spam'. It learns which words and patterns appear in spam, then predicts the label for new incoming emails. This is an example of supervised classification.

Is machine learning the same as artificial intelligence?

No. Artificial intelligence (AI) is the broad idea of making machines act smart, and machine learning is one important way to achieve AI by learning from data. So machine learning is a part of AI, not the whole thing. All machine learning is AI, but not all AI uses machine learning.

What is a neural network in simple terms?

A neural network is a machine learning model loosely inspired by how brain cells connect. It is made of layers of simple units called neurons that pass numbers to each other and adjust during training. Neural networks are good at tasks like recognizing images and understanding speech.

What is the role of a prediction in machine learning?

A prediction is the output the model gives for a new input, based on what it learned. For example, after training on weather data, a model might predict 'it will rain tomorrow'. Predictions can be categories, numbers, or other outputs depending on the task.

Why is data quality important in machine learning?

If the training data has many mistakes, missing values, or is biased, the model will learn wrong patterns and make poor predictions. This idea is summed up as 'garbage in, garbage out'. Clean, accurate, and fair data helps the model learn correctly.

What is bias in a machine learning model?

Bias means the model makes unfair or systematically wrong predictions, often because the training data was not balanced or representative. For example, if a model only saw photos of one kind of object, it may struggle with others. Reducing bias is important for fairness.

What is clustering in machine learning?

Clustering is an unsupervised learning technique that groups similar data points together without using labels. The computer decides which items belong in the same group based on how alike they are. For example, it might group customers with similar shopping habits.

Can a machine learning model be wrong?

Yes, machine learning models can and do make mistakes. They give predictions based on patterns, but patterns are not perfect, so some answers can be incorrect. That is why we test models and should not blindly trust every prediction.

What is reinforcement learning?

Reinforcement learning is a type of machine learning where an agent learns by trial and error, receiving rewards for good actions and penalties for bad ones. Over time it learns the actions that earn the most reward. It is often used to teach computers to play games or control robots.

How can machine learning help in healthcare?

Machine learning can help doctors by spotting patterns in medical images, such as detecting signs of disease in X-rays or scans. It can also predict which patients may need extra care. However, it assists doctors rather than replacing their final judgment.

What does 'training set' and 'test set' mean, and why split the data?

The training set is the part of data used to teach the model, and the test set is a separate part kept aside to check the model on unseen examples. We split the data so we can honestly measure if the model generalizes instead of just memorizing. Testing on data the model already saw would not be a fair check.

What is the difference between AI, machine learning, and deep learning?

AI is the broadest idea of smart machines, machine learning is a subset of AI that learns from data, and deep learning is a subset of machine learning that uses large neural networks. You can picture them as circles inside circles, with deep learning being the smallest. Deep learning is powerful for images, speech, and language.

What is an algorithm in the context of machine learning?

An algorithm is a step-by-step method the computer uses to learn from data and build a model. Different algorithms learn in different ways, such as decision trees or neural networks. Choosing the right algorithm depends on the problem and the data.

What is a decision tree?

A decision tree is a machine learning model that makes predictions by asking a series of yes/no or simple questions, like a flowchart. Each question splits the data, and the final branches give the answer. It is popular because it is easy to understand and explain.

Why should we be careful about privacy in machine learning?

Machine learning often needs lots of data, and that data can include personal information about people. If this data is misused or leaked, it can harm people's privacy. So we should collect only what is needed, keep it secure, and use it responsibly.

Can machine learning recognize objects in pictures?

Yes, image recognition is a major use of machine learning. After training on many labeled images, a model can identify objects like cars, animals, or faces in new pictures. This powers tools such as photo search and self-driving car cameras.

What does 'generalization' mean in machine learning?

Generalization is a model's ability to perform well on new, unseen data, not just the examples it trained on. A model that generalizes well has truly learned the underlying pattern. Good generalization is the main goal of machine learning.

What is the difference between a feature and a label using a fruit example?

If we want to predict a fruit's name, features might be its color, weight, and shape, while the label is the actual name like 'apple' or 'banana'. Features are the input clues, and the label is the correct answer we want the model to predict. The model learns how features connect to the label.

How does a recommendation system work in simple terms?

A recommendation system studies what you and many other users liked or watched, then finds patterns to predict what you might enjoy next. For example, if people who liked the same movies as you also liked another movie, it may suggest that movie. It learns your preferences from your past behavior.

What is 'accuracy' as a way to measure a model?

Accuracy is the fraction of predictions a model gets correct out of all predictions. For example, if a model labels 90 out of 100 emails correctly, its accuracy is 90 percent. It is a simple, common way to measure performance, especially for classification.

Why can machine learning sometimes be unfair to certain groups of people?

If the training data does not fairly represent all groups, or contains past human prejudices, the model can learn and repeat that unfairness. For example, a hiring model trained on biased past decisions might unfairly rank some candidates lower. This is why checking for and reducing bias is an important ethical step.

What is a simple Python idea showing how a model is trained and used?

In many Python libraries like scikit-learn, you create a model, call model.fit() with training data to teach it, and then call model.predict() to get predictions on new data. The fit step is training and the predict step gives the output. This shows the basic learn-then-predict cycle.

from sklearn.tree import DecisionTreeClassifier

# features and labels
X = [[150, 0], [170, 0], [140, 1], [130, 1]]  # [weight, bumpy?]
y = ["apple", "apple", "orange", "orange"]

model = DecisionTreeClassifier()
model.fit(X, y)        # train
print(model.predict([[160, 0]]))  # predict new fruit
What is the main goal of machine learning?

The main goal is to build models that learn patterns from data so they can make accurate predictions or decisions on new, unseen situations. It is not about memorizing examples but about generalizing to new data. This lets computers handle tasks that are hard to program with fixed rules.

What is 'underfitting'?

Underfitting happens when a model is too simple to capture the patterns in the data, so it performs poorly even on the training data. It is the opposite of overfitting. The fix is often a more powerful model, better features, or more training.

Why is it important for humans to review machine learning decisions?

Because models can make mistakes, be biased, or face situations they were not trained for, human review helps catch errors and ensure fairness and safety. This is especially important for serious decisions like medical care, loans, or justice. Keeping a human 'in the loop' makes AI more trustworthy.

How does a model 'improve' during training?

During training, the model measures how far its predictions are from the correct answers using an error or 'loss' value, then adjusts its internal settings to reduce that error. By repeating this many times, the error shrinks and predictions get better. This step-by-step improvement is the heart of learning.

Put it into practice with AI Learning

This topic — and hundreds more — comes from our free, offline AI Learning app. Practice Q&A, quizzes and cheat sheets anywhere, no account needed.

  • Free
  • No account
  • Works offline
Coming soon toGoogle Play