Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Clustering Setup

20200902 Packages used in this chapter include biclust.

# Load required packages from local library into the R session.

library(biclust)      # Bicluster analysis.
library(dplyr)        # Wrangling: glimpse() group_by() print() select() mutate().
library(rattle)       # Weather dataset.

The rattle::weatherAUS dataset is loaded into the template variable ds and further template variables are setup as introduced in Williams (2017). See Chapter 7 for details.

dsname <- "weatherAUS"
ds     <- get(dsname)

nobs   <- nrow(ds)

vnames <- names(ds)
ds    %<>% clean_names(numerals="right")
names(vnames) <- names(ds)

vars   <- names(ds)
target <- "rain_tomorrow"
vars   <- c(target, vars) %>% unique() %>% rev()

It is always useful to remind ourselves of the dataset with a random sample:

ds  %>% sample_frac() %>% select(date, location, sample(3:length(vars), 5))
## # A tibble: 176,747 x 7
##    date       location risk_mm pressure_3pm pressure_9am rainfall wind_g...
##    <date>     <chr>      <dbl>        <dbl>        <dbl>    <dbl> <ord> ...
##  1 2013-06-02 Penrith     13.4          NA           NA       8.4 SSW   ...
##  2 2016-01-10 Badgery~     0          1016.        1020.      0   ESE   ...
##  3 2012-04-09 Nurioot~     0          1027.        1027.      1   SW    ...
##  4 2019-11-16 Cobar        0          1014         1017       0   SW    ...
##  5 2008-10-02 Melbour~     0          1011.        1014.      0   N     ...
##  6 2013-05-20 Wollong~     0          1014.        1018.      0   WSW   ...
....


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.