Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone help me please solution this question ? thank you in advance Predicting room occupancy by using decision tree and random forests classification algorithms.

Can anyone help me please solution this question ? thank you in advance Predicting room occupancy by using decision tree and random forests classification algorithms. Using Studio R

a) Load the room occupancy training and testing datasets. Train a decision tree classifier and evaluate the predictive performance by reporting the classification accuracy obtained on the testing dataset.

(b) Output and analyse the tree learned by the decision tree algorithm, i.e. plot the tree structure and make a discussion about it.

(c) Train a random forests classifier and evaluate the predictive performance by reporting the classification accuracy obtained on the testing dataset. Define set.seed(1).

(d) Output and analyse the feature importance obtained by the random forests classifier.

testing dataset

Temperature,Humidity,Light,CO2,HumidityRatio,Occupancy

21.89,31.55,436.5,1047,0.0051296601,0

21.89,31.36,434,1031,0.0050985151,0

21.89,31.125,432.75,977.5,0.005059998,0

21.7,28.5,279.3333333333,585,0.0045762473,1

20.6,21.865,454,652.5,0.003274764,0

20.6,22.2,442.75,681.75,0.0033252058,0

20.6,22.26,444,702.3333333333,0.003334241,0

training dataset

Temperature,Humidity,Light,CO2,HumidityRatio,Occupancy

23.18,27.272,426,721.25,0.0047929882,1

23.15,27.2675,429.5,714,0.0047834409,1

23.15,27.245,426,713.5,0.0047794635,1

23.15,27.2,426,708.25,0.0047715088,1

23.1,27.2,426,704.5,0.0047569929,1

23.1,27.2,419,701,0.0047569929,1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions