2016-07-17 02:35:55 +02:00
|
|
|
preprocess.dataset = function()
|
2016-04-15 15:44:49 +02:00
|
|
|
{
|
|
|
|
arff.file = "seismic-bumps.arff"
|
|
|
|
|
2016-07-17 02:35:55 +02:00
|
|
|
dataset = read.arff(file.path(orig.dir, arff.file))
|
2016-04-15 15:44:49 +02:00
|
|
|
|
2016-07-17 02:35:55 +02:00
|
|
|
dataset = dataset %>%
|
|
|
|
select(-c(nbumps6:nbumps89)) %>%
|
|
|
|
mutate(genergy = as.integer(genergy),
|
|
|
|
gpuls = as.integer(gpuls),
|
|
|
|
gdenergy = as.integer(gdenergy),
|
|
|
|
gdpuls = as.integer(gdpuls),
|
|
|
|
nbumps = as.integer(nbumps),
|
|
|
|
nbumps2 = as.integer(nbumps2),
|
|
|
|
nbumps3 = as.integer(nbumps3),
|
|
|
|
nbumps4 = as.integer(nbumps4),
|
|
|
|
nbumps5 = as.integer(nbumps5),
|
|
|
|
energy = as.integer(energy),
|
|
|
|
maxenergy = as.integer(maxenergy)
|
|
|
|
)
|
2016-04-15 15:44:49 +02:00
|
|
|
|
|
|
|
return(dataset)
|
|
|
|
}
|