-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitial_processing.R
More file actions
51 lines (38 loc) · 1.14 KB
/
initial_processing.R
File metadata and controls
51 lines (38 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ---------------
# initialize and load libraries
# ---------------
rm(list = ls())
library(data.table)
source("functions.R")
library(caTools)
library(Matrix)
# library(ggplot2)
# library(ggmap)
# ---------------
# # Load files afresh
# ---------------
load(file = "rawdata/train.bin")
load(file = "rawdata/test.bin")
load(file = "rawdata/validation.bin")
# ------------------------------
# Run the full function for train, test and validation
# ------------------------------
# Train
train_with_path <- return_path_and_columns(train)
train_input <- train_with_path[[1]]
train_path <- train_with_path[[2]]
# test
test_with_path <- return_path_and_columns(test)
test_input <- test_with_path[[1]]
test_path <- test_with_path[[2]]
# validation
validation_with_path <- return_path_and_columns(validation)
validation_input <- validation_with_path[[1]]
validation_path <- validation_with_path[[2]]
# ---------------------
# Save all down
# ---------------------
save(train_with_path,file="cleaned/train_with_path.bin")
save(test_with_path,file="cleaned/test_with_path.bin")
save(validation_with_path,file="cleaned/validation_with_path.bin")
# waldo-compression