-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables-selection .R
More file actions
96 lines (88 loc) · 3.39 KB
/
variables-selection .R
File metadata and controls
96 lines (88 loc) · 3.39 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
library(leaps)
leaps.ubuntu.save <-
regsubsets(
real.power ~ battery.rate + I(battery.rate ^ 2) + charging.status + brightness + battery.rate:brightness + battery.rate:battery.capacity +
cpu.usage + memory.usage + battery.capacity + download.upload + read.write,
data = filtered.ubunutu.save,
nbest = 5,
nvmax = NULL,
force.in = NULL,
force.out = NULL,
method = "exhaustive"
)
#summary(leaps.ubuntu.save)
par(mfrow = c(1, 2))
par(mar=c(4,3,0,3))
par(oma=c(4,0,0,0))
#plot(leaps.ubuntu.save, scale = "r2")
plot(leaps.ubuntu.save, scale = "adjr2")
plot(leaps.ubuntu.save, scale = "bic")
summary.out.ubuntu.save <- summary(leaps.ubuntu.save)
which.max(leaps.ubuntu.save$adjr2)
#summary.out.ubuntu.save$which[26, ]
######################################################################################################################################################
leaps.ubuntu.normal <-
regsubsets(
real.power ~ battery.rate + I(battery.rate ^ 2) + charging.status + brightness + battery.rate:brightness + battery.rate:battery.capacity +
cpu.usage + memory.usage + battery.capacity + download.upload + read.write,
data = filtered.ubunutu.normal,
nbest = 5,
nvmax = NULL,
force.in = NULL,
force.out = NULL,
method = "exhaustive"
)
#summary(leaps.ubuntu.normal)
par(mfrow = c(1, 2))
par(mar=c(4,3,0,3))
par(oma=c(4,0,0,0))
#plot(leaps.ubuntu.normal, scale = "r2")
plot(leaps.ubuntu.normal, scale = "adjr2")
plot(leaps.ubuntu.normal, scale = "bic")
summary.out.ubuntu.normal <- summary(leaps.ubuntu.normal)
which.max(leaps.ubuntu.normal$adjr2)
#summary.out.ubuntu.normal$which[26, ]
######################################################################################################################################################
leaps.windows.save <-
regsubsets(
real.power ~ battery.rate + I(battery.rate ^ 2) + charging.status + brightness + battery.rate:brightness + battery.rate:battery.capacity +
cpu.usage + memory.usage + battery.capacity + download.upload + read.write,
data = filtered.windows.save,
nbest = 5,
nvmax = NULL,
force.in = NULL,
force.out = NULL,
method = "exhaustive"
)
#summary(leaps.windows.save)
par(mfrow = c(1, 2))
par(mar=c(4,3,0,3))
par(oma=c(4,0,0,0))
#plot(leaps.windows.save, scale = "r2")
plot(leaps.windows.save, scale = "adjr2")
plot(leaps.windows.save, scale = "bic")
summary.out.windows.save <- summary(leaps.windows.save)
which.max(summary.out.windows.save$adjr2)
#summary.out$which[26, ]
######################################################################################################################################################
leaps.windows.normal <-
regsubsets(
real.power ~ battery.rate + I(battery.rate ^ 2) + charging.status + brightness + battery.rate:brightness + battery.rate:battery.capacity +
cpu.usage + memory.usage + battery.capacity + download.upload + read.write,
data = filtered.windows.normal,
nbest = 5,
nvmax = NULL,
force.in = NULL,
force.out = NULL,
method = "exhaustive"
)
#summary(leaps.windows.normal)
par(mfrow = c(1, 2))
par(mar=c(4,3,0,3))
par(oma=c(4,0,0,0))
#plot(leaps.windows.normal, scale = "r2")
plot(leaps.windows.normal, scale = "adjr2")
plot(leaps.windows.normal, scale = "bic")
summary.out.windows.normal <- summary(leaps.windows.normal)
which.max(summary.out.windows.normal$adjr2)
#summary.out$which[26, ]