MulaiMulai sekarang secara gratis

Future predictions of sales

A new dataset called salesData2_4 is loaded in the working space. It contains information on the customers for the months two to four. We want to use this information in order to predict the sales for month 5.

Latihan ini adalah bagian dari kursus

Machine Learning for Marketing Analytics in R

Lihat Kursus

Petunjuk latihan

  • Use the summary() command in order to get an overview of the new dataset.
  • Use the model salesModel2 and the new dataset salesData2_4 in the predict() function in order to predict the sales for month 5. Store the predictions in a vector called predSales5.
  • Calculate the mean of the expected sales. Make sure to remove missing values.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.


# getting an overview of new data
__(salesData2_4)

# predicting sales
predSales5 <- predict(__, newdata = __)

# calculating mean of future sales
mean(__)
Edit dan Jalankan Kode