logo

Crowdly

Browser

Add to Chrome

This summarises a linear support vector machine fit to the last 25 years of Au...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

This summarises a linear support vector machine fit to the last 25 years of Australian tourism data modeling the difference in patterns between Cairns and Melbourne. Only holiday travel is examined, and the four variables used are Q1, Q2, Q3, Q4 which are quarters in the year. Each series was standardised on itself, so values represent proportion of travel for holidays relative to other types of travel to the city in each quarter of each year. We are curious to determine whether holiday travel tends to be in different seasons in the two locations.

> melb_cairns_svm_h$fit@b

[1] -2.4

> melb_cairns_svm_h$fit@SVindex

[1] 3 5 9 10 11 12 14 17 19 20 21 23 24 30 35 36 37 38 39 40

[21] 41 42 44 46 47 50

> melb_cairns_svm_h$fit@coef

[[1]]

[1] -10.0 -10.0 -10.0 -10.0 -10.0 -10.0 -10.0 -10.0 -10.0 -1.8

[11] -10.0 -10.0 -10.0 1.8 10.0 10.0 10.0 10.0 10.0 10.0

[21] 10.0 10.0 10.0 10.0 10.0 10.0

The top few rows of the data are:

> melb_cairns[,c(1,3,5,7,9)] |> slice_head(n=5)

# A tibble: 5 × 5

Region Q1 Q2 Q3 Q4

1 Cairns 0.259 0.220 0.629 0.300

2 Cairns 0.205 0.345 0.586 0.348

3 Cairns 0.272 0.475 0.500 0.275

4 Cairns 0.173 0.533 0.523 0.380

5 Cairns 0.360 0.498 0.565 0.374

The coefficients for the separating hyperplane plane are calculated to be:

> melb_cairns_betas_h

Q1 Q2 Q3 Q4

4.76 0.80 -8.95 -0.57

  1. (1pt) How many support vectors are used to compute the coefficients for the separating hyperplane?
  2. (1pt) Write down the equation of the separating hyperplane?
  3. (1pt) Which variable(s) would be considered to be the most important to distinguish the difference between holiday trips to Cairns and Melbourne?
  4. (2pts) Explain how you would use the quantities from the fitted model object to compute the coefficients.
  5. (2pts) Was Melbourne or Cairns coded as -1? Why do you think so?

More questions like this

Want instant access to all verified answers on learning.monash.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome