Good Morning,
I have been working on a series of walk through exercises to help people
learn data mining with rattle. The concept is that you get a basic story
line, and then a series of questions. You then have a step by step guide
to how to answer these questions using both R code and rattle
functions. Then a small sample of the output.
an example is below
I was wondering if any one thinks that a series of these might be
useful?
regards
Tony
Our exercise is to find the right data to predict a range of weather
condition on a certain day. Your uncle Simon has asked for your help. He
manages hotel which is located around 10 kms from the center of the
Canberra, the national capital of Australia. The problem is that the
hotel has been booked for a wedding. However this is no ordinary wedding.
The couple are both children of ambassadors from different countries. The
wedding is planned for August 17
th, which will be televised to
both countries.
Library(rattle) - Loads the Rattle package and the
associated datasets into the memory. The dataset we need to solve this
problem is one associated dataset with Rattle, called
weatherAUS.
This first thing we want to do is to get a feel for our data. So we want
to look at the names of the variables,
names(weatherAUS) – Show the variables Names
[1]
"Date"
"Location"
"MinTemp"
"MaxTemp"
[5] "Rainfall"
"Evaporation"
"Sunshine"
"WindGustDir"
[9] "WindGustSpeed" "WindDir9am"
"WindDir3pm" "WindSpeed9am"
[13] "WindSpeed3pm" "Humidity9am"
"Humidity3pm" "Pressure9am"
[17] "Pressure3pm"
"Cloud9am"
"Cloud3pm"
"Temp9am"
[21] "Temp3pm"
"RainToday"
"RISK_MM"
"RainTomorrow"
We also want to look at the number of variables and the number of
observations.
nrow(weatherAUS) – displays the number of rows (observations on
the longest variable).
[1] 28818
ncol(weatherAUS) – displays the number of columns
(variables).
[1] 24
Now we want to look at a dataset to gain some knowledge about
the data. So we need to look at the Head , Tail, and Sample..
head(weatherAUS) – First six records of the dataset.
Date Location MinTemp
MaxTemp Rainfall Evaporation Sunshine WindGustDir
1 2008-12-01 Albury 13.4
22.9
0.6
NA
NA W
2 2008-12-02 Albury
7.4 25.1
0.0
NA
NA WNW
3 2008-12-03 Albury 12.9
25.7
0.0
NA
NA WSW
UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information.
If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or
attachments. If you have received this message in error, please notify the sender immediately and delete
this message. Any views expressed in this message are those of the individual sender, except where the
sender expressly, and with authority, states them to be the views of the University of Technology Sydney.
Before opening any attachments, please check them for viruses and defects.
Think. Green. Do.
Please consider the environment before printing this email.