A4.3 Machine learning approaches questions for IB Computer Science

92 questions on Machine learning approaches, written by Augment in the style of IB exam papers. Six of them are below in full, to answer on paper.

  • IB Computer Science
  • Part of A4 Machine learning
  • HL only

Questions by paper and level

PaperQuestions
Paper 192

Counted on

Questions to try

Written by Augment in the style of IB exams, not past papers. Answer them on paper, then check each one against its markscheme with a free account.

Question 1 · CS-00024Paper 1 · 14 marks

A ride-share company wants a model that predicts the fare of a trip before it starts. Table 2 shows some of the raw trip data exported from its app.

TripID

DistanceKm

DurationMin

Fare

PickupTime

DriverFavSong

8812

5.2

14

£11.40

08:12

Track 7

8813

−3.0

9

£7.10

08:15

Track 2

8814

12.8

31

24.9

8:20 PM

Track 7

8815

7.5

0

£15.80

08:31

Track 4

8816

2.1

6

08:40

Track 1

Table 2

  1. (a)

    Identify two values in Table 2 that are incorrect data.

    2 marks

  2. (b)

    Identify one feature that should be filtered out as irrelevant, and outline why.

    2 marks

  3. (c)

    Describe how the Fare and PickupTime columns could be transformed into a consistent format suitable for training.

    3 marks

  4. (d)

    Trip 8816 has no fare recorded. Compare deletion and predictive modelling as ways of dealing with this missing value.

    3 marks

  5. (e)

    The company has a large amount of trip data. Discuss whether cleaning it is worth the time it takes.

    4 marks

Question 2 · CS-00025Paper 1 · 5 marks

A wildlife charity uses images from trail cameras to train a model that classifies animals by species. Volunteers labelled the images by hand, and some of the labels are wrong.

  1. (a)

    Explain how incorrectly labelled training images could affect the performance of the model.

    3 marks

  2. (b)

    Suggest one way the charity could identify incorrect labels.

    2 marks

Question 3 · CS-00027Paper 1 · 10 marks

An estate agency uses K-nearest neighbours (K-NN) with K=1 to predict whether a house will sell within 30 days. Each house is described by two features: floor area (m²) and number of bedrooms. Euclidean distance is used.

House

Floor area (m²)

Bedrooms

Sold within 30 days

A

104

1

No

B

92

4

Yes

C

140

4

No

D

130

5

No

A new house, N, has a floor area of 100 m² and 4 bedrooms.

  1. (a)

    Calculate the distance from N to house A and to house B using the unscaled features, and state the prediction the model makes for N.

    3 marks

  2. (b)

    The features are normalized using min–max scaling based on the four training houses. Calculate the normalized floor area and normalized number of bedrooms for house N.

    2 marks

  3. (c)

    After normalization, the distances from N are: A 0.755, B 0.167, C 0.833, D 0.673. Explain why the prediction changes after normalization.

    3 marks

  4. (d)

    Outline one reason why the minimum and maximum used for scaling new houses should be the ones calculated from the training data.

    2 marks

Question 4 · CS-00242Paper 1 · 6 marks

A garden centre trains a decision tree to predict which customers will buy a new seed subscription. The data has 25 features. After training, the tree uses only 6 of them in its splits.

  1. (a)

    Explain why this is an example of an embedded method of feature selection.

    2 marks

  2. (b)

    Compare embedded methods with wrapper methods.

    4 marks

Question 5 · CS-00243Paper 1 · 13 marks

A medical research laboratory has measured the activity of 20 000 genes in tissue samples from 300 patients. It wants to train a classifier that predicts whether a tumour is likely to respond to a particular drug.

  1. (a)

    State two reasons why the laboratory should use feature selection before training the classifier.

    2 marks

  2. (b)

    Outline why a wrapper method that tests every possible subset of genes is not feasible.

    2 marks

  3. (c)

    Describe how a filter method could be used to reduce the number of genes.

    3 marks

  4. (d)

    Identify one limitation of using only a filter method for this data.

    2 marks

  5. (e)

    Evaluate a two-stage approach in which a filter method first reduces the genes to 200 and a wrapper method then chooses the final set.

    4 marks

Question 6 · CS-00248Paper 1 · 10 marks

An online retailer wants to predict how many days a parcel will take to arrive. A filter method has produced Table 3, which shows the correlation of each feature with delivery time and the correlation between some pairs of features.

Feature

Correlation with delivery time

DistanceKm

0.81

DrivingTimeEstimateHrs

0.79

ParcelWeightKg

0.22

OrderedOnWeekend (0/1)

0.35

CustomerAge

0.04

Table 3

The correlation between DistanceKm and DrivingTimeEstimateHrs is 0.97.

  1. (a)

    Identify the feature that is least informative for predicting delivery time.

    1 mark

  2. (b)

    Explain why the retailer may not need to keep both DistanceKm and DrivingTimeEstimateHrs.

    3 marks

  3. (c)

    ParcelWeightKg has a weak correlation with delivery time. Outline why it might still be worth keeping.

    2 marks

  4. (d)

    The retailer's data team argues that an embedded method would be better than the filter method for this problem. Evaluate this argument.

    4 marks

Practice all 92 in Augment

Free with an account. Every question has its markscheme, and Augment keeps the ones you got wrong so you can come back to them.

The notes on A4.3 Machine learning approaches

More questions in Machine learning

  1. A4.1Machine learning fundamentals
  2. A4.2Data preprocessing
  3. A4.3Machine learning approachesThis page
  4. A4.4Ethical considerations

Check your answers in Augment

A free account opens all 92 questions on Machine learning approaches with their markschemes, and keeps a record of what you have marked.