ML

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/76

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:37 PM on 9/13/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

77 Terms

1
New cards

What is Machine Learning?

Machine Learning is a branch of AI where algorithms learn patterns from data, build a model, and use it to make predictions about future or unseen data.

2
New cards

What is the core idea of Machine Learning?

Teach a computer to learn patterns from data so it can make predictions or decisions on new/unseen data.

3
New cards

Why is manual email classification not scalable?

Millions of emails arrive, manual checking is expensive and time-consuming, and it does not scale efficiently.

4
New cards

What is the problem with a rule-based spam detection system?

Rules become large and difficult to maintain, new spam patterns can be missed, and rules require frequent manual updates.

5
New cards

How does Machine Learning differ from a rule-based system?

A rule-based system relies on explicitly written rules, while ML learns patterns from previously labelled data.

6
New cards

What is the basic Machine Learning learning pattern?

Past/present data → learn patterns → build model → predict future/unseen data.

7
New cards

What is a dataset?

A collection of data used for analysis or Machine Learning.

8
New cards

What are features in Machine Learning?

Features are the input variables/columns used by a model to make a prediction.

9
New cards

What is a target or label?

The target/label is the output that the model is trying to predict.

10
New cards

Given Marks, Attendance, Assignment, and Result columns for student prediction, which are the features?

Marks, Attendance, and Assignment.

11
New cards

Given Marks, Attendance, Assignment, and Result columns for student prediction, what is the target?

Result.

12
New cards

What is an ML pipeline?

A sequence of steps followed to build, train, evaluate, deploy, and maintain a Machine Learning solution.

13
New cards

What is the purpose of Problem Definition in an ML pipeline?

To clearly define the problem we want to solve or what the model should predict.

14
New cards

What happens during Data Collection?

The required data for solving the defined ML problem is collected.

15
New cards

What is Data Preprocessing?

The process of preparing and cleaning data so it is suitable for Machine Learning.

16
New cards

What is Feature Engineering?

Creating, selecting, or transforming useful features to improve the data used by an ML model.

17
New cards

What is EDA?

Exploratory Data Analysis; exploring and understanding patterns, relationships, distributions, and unusual values in data.

18
New cards

What is the difference between Data Preprocessing and EDA?

Preprocessing prepares or fixes the data; EDA explores and helps understand the data.

19
New cards

What is Model Selection?

Choosing a suitable ML algorithm/model for the problem and data.

20
New cards

What is Model Training?

Teaching the selected ML model to learn patterns from the training data.

21
New cards

What is Model Evaluation?

Measuring how well a trained model makes predictions.

22
New cards

What is Model Tuning?

Adjusting model settings to try to improve its performance.

23
New cards

What is Deployment in Machine Learning?

Putting the trained model into a real-world application so it can make predictions on new data.

24
New cards

Why is a deployed ML model monitored?

Real-world data and patterns can change, causing model performance to decrease and potentially requiring updating or retraining.

25
New cards

What are the four main types of Machine Learning?

Supervised Learning, Unsupervised Learning, Semi-supervised Learning, and Reinforcement Learning.

26
New cards

What are the two main types of problems in Supervised Learning?

Classification and Regression.

27
New cards

What is Classification?

A supervised learning problem where the model predicts which category or class a new input belongs to.

28
New cards

What are the two types of Classification covered?

Binary Classification and Multi-class Classification.

29
New cards

What is Binary Classification?

A classification problem where the output has exactly two categories.

30
New cards

Give three examples of Binary Classification.

Spam/Not Spam, Disease detection, and Pass/Fail student result prediction.

31
New cards

What is Multi-class Classification?

A classification problem where the output has more than two categories.

32
New cards

Give three examples of Multi-class Classification.

Weather prediction, student grade prediction, and movie genre classification.

33
New cards

What is Regression?

A supervised learning problem where the output is a continuous numerical value.

34
New cards

Give three examples of Regression.

House price prediction, salary prediction, and car price prediction.

35
New cards

What is Unsupervised Learning?

Training a model using input data without providing output labels.

36
New cards

What are the two areas of Unsupervised Learning covered?

Clustering and Dimensionality Reduction.

37
New cards

What is Clustering?

Group or segregate data based on similar patterns without predefined labels.

38
New cards

Give two practical examples of Clustering.

Customer segmentation and news article segmentation.

39
New cards

What is Dimensionality Reduction?

Reducing the number of columns or dimensions while preserving as much important information as possible.

40
New cards

What is Semi-supervised Learning?

Learning from a small amount of labelled data together with a large amount of unlabelled data.

41
New cards

Why is Semi-supervised Learning useful?

Labelling large amounts of data manually can be costly, so a small labelled portion can help make use of the unlabelled data.

42
New cards

What is Reinforcement Learning?

A type of ML where an agent learns through trial and error using rewards and penalties.

43
New cards

What is the basic feedback loop in Reinforcement Learning?

Agent takes an action → receives reward/penalty → learns from feedback → improves future actions.

44
New cards

What is Feature Encoding?

Converting categorical or text data into numerical representations so it can be used by an ML model.

45
New cards

Why is Feature Encoding needed?

ML algorithms perform mathematical operations, so categorical text such as Male/Female or Spam/Not Spam must be converted into numerical form.

46
New cards

What are the three Feature Encoding methods covered?

Label Encoding, One-Hot Encoding, and Ordinal Encoding.

47
New cards

What does Label Encoding do?

It assigns a unique integer to each category.

48
New cards

How does LabelEncoder assign numbers by default?

It orders categories alphabetically and assigns integers starting from 0.

49
New cards

What is the LabelEncoder mapping for Cloudy, Rainy, Sunny?

Cloudy → 0, Rainy → 1, Sunny → 2.

50
New cards

Given Climate = ["Sunny", "Rainy", "Cloudy"], what are the LabelEncoder values?

[2, 1, 0].

51
New cards

What is the important limitation of Label Encoding?

The assigned numbers can imply an order even when the categories have no meaningful ranking.

52
New cards

Why is Label Encoding problematic for Bad, Average, Good, Excellent?

The numerical values are assigned according to category ordering rather than the actual quality ranking, which can create a misleading order.

53
New cards

What does fit() do in an encoder?

It learns the categories and their mapping from the data.

54
New cards

What does transform() do in an encoder?

It applies the learned mapping to convert categorical values into encoded values.

55
New cards

What does fit_transform() do?

It combines fitting the encoder to the data and transforming the data using the learned mapping.

56
New cards

What is the general syntax for Label Encoding?

from sklearn.preprocessing import LabelEncoder; encoder = LabelEncoder(); df["col_name"] = encoder.fit_transform(df["col_name"]).

57
New cards

What does One-Hot Encoding do?

It creates a separate 0/1 column for each category.

58
New cards

Why is One-Hot Encoding useful for categories with no natural order?

It avoids falsely implying a ranking between categories.

59
New cards

For Climate categories Cloudy, Rainy, Sunny, how many One-Hot columns are created?

Three columns: Climate_Cloudy, Climate_Rainy, and Climate_Sunny.

60
New cards

In One-Hot Encoding, what does a 1 mean?

The row belongs to that category.

61
New cards

What input shape does OneHotEncoder expect?

A 2-D input, such as df[["Climate"]], rather than a 1-D Series such as df["Climate"].

62
New cards

What common error occurs when passing df["Climate"] directly to OneHotEncoder?

A ValueError occurs because OneHotEncoder expects 2-D input.

63
New cards

How can OneHotEncoder return a regular NumPy array instead of a sparse matrix?

Use OneHotEncoder(sparse_output=False).

64
New cards

How do you get readable column names after One-Hot Encoding?

Use encoder.get_feature_names_out().

65
New cards

What is the difference between Label Encoding and One-Hot Encoding?

Label Encoding converts categories into one integer column; One-Hot Encoding creates a separate 0/1 column for each category.

66
New cards

What does Ordinal Encoding do?

It converts categories into numbers according to an explicitly defined order.

67
New cards

When should Ordinal Encoding be used?

When categories have a genuine meaningful ranking, such as Low < Medium < High.

68
New cards

Why would Label Encoding be inappropriate for Low, Medium, High?

Its category ordering may produce High → 0, Low → 1, Medium → 2, which does not represent the meaningful Low < Medium < High order.

69
New cards

What is the correct Ordinal Encoding mapping for Low, Medium, High?

Low → 0, Medium → 1, High → 2.

70
New cards

What is the key difference between Label Encoding and Ordinal Encoding?

Label Encoding assigns numbers based on the encoder's category ordering; Ordinal Encoding allows you to explicitly define the meaningful category order.

71
New cards

What is the general syntax for specifying an OrdinalEncoder category order?

OrdinalEncoder(categories=[["Low", "Medium", "High"]]).

72
New cards

Given Salary = ["Low", "Medium", "High"] and categories = [["Low", "Medium", "High"]], what does OrdinalEncoder produce?

[0, 1, 2].

73
New cards

What is the Feature Encoding hierarchy?

Feature Encoding → Label Encoding, One-Hot Encoding, Ordinal Encoding.

74
New cards

Where does Feature Encoding belong in the ML structure?

Feature Encoding belongs under Data Preprocessing.

75
New cards

Where do Classification and Regression belong in the ML structure?

They belong under Supervised Learning, which is one of the four main types of Machine Learning.

76
New cards

What is the high-level ML hierarchy learned so far?

Machine Learning → Supervised/Unsupervised/Semi-supervised/Reinforcement; Supervised → Classification/Regression; Classification → Binary/Multi-class; Unsupervised → Clustering/Dimensionality Reduction.

77
New cards

What is the high-level relationship between ML Pipeline and ML Types?

ML Pipeline describes the process of building and using an ML solution, while ML Types describe the learning approach used by the model.