Skip to content

Commit

Permalink
wider
Browse files Browse the repository at this point in the history
  • Loading branch information
tdhock committed Jul 2, 2021
1 parent bf755e8 commit 04b80de
Show file tree
Hide file tree
Showing 8 changed files with 1,967 additions and 1,934 deletions.
11 changes: 11 additions & 0 deletions figure-candidates-interactive-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ seg.dt.list <- list()
cost.dt.list <- list()
for(penalty in 10^seq(-2, 3)){
segs.up.to <- list()
print(penalty)
for(tau in unique.tau){
for(model.name in names(label.list)){
label.dt <- data.table(label.list[[model.name]])
Expand Down Expand Up @@ -109,5 +110,15 @@ viz.data <- list(
cost=cost.dt,
labels=labels,
signal=signal.dt)

dir.create("figure-candidates-interactive-data")
for(data.type in names(viz.data)){
dt <- viz.data[[data.type]]
out.csv <- file.path(
"figure-candidates-interactive-data",
paste0(data.type, ".csv"))
data.table::fwrite(dt, out.csv)
}

saveRDS(viz.data, "figure-candidates-interactive-data.rds")

11 changes: 11 additions & 0 deletions figure-candidates-interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ library(data.table)
works_with_R('3.6.0', animint2="2019.7.3", data.table="1.12.8")

viz.data <- readRDS("figure-candidates-interactive-data.rds")

dir.create("figure-candidates-interactive-data")
for(data.type in names(viz.data)){
dt <- viz.data[[data.type]]
out.csv <- file.path(
"figure-candidates-interactive-data",
paste0(data.type, ".csv"))
data.table::fwrite(dt, out.csv)
}


viz.data$cost[, last.change := tau]
best.overall <- viz.data$cost[up.to.t == 100, {
.SD[which.min(cost_candidates)]
Expand Down
Binary file modified figure-signal-cost-standAlone.pdf
Binary file not shown.
1,935 changes: 970 additions & 965 deletions figure-signal-cost-standAlone.tex

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions figure-signal-cost.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ gg.model <- gg.data+
LOPART="black"))+
ylab("")+
scale_x_continuous(
"position",
breaks=seq(0, 100, by=10))+
"Position in data sequence",
limits=c(0, 105),
breaks=c(1, seq(10, 100, by=10)))+
geom_text(aes(
pos, cost_candidates,
hjust=hjust,
Expand All @@ -161,7 +162,7 @@ gg.model <- gg.data+
color=Algorithm, shape=Algorithm),
data=COST(cost.dt))+
scale_shape_manual(values=c(OPART=1, LOPART=2))
w=6
w=6.5
h=2.4
tikz("figure-signal-cost-standAlone.tex", width=w, height=h, standAlone=TRUE)
print(gg.model)
Expand Down
1,935 changes: 970 additions & 965 deletions figure-signal-cost.tex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion figure-signal.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Created by tikzDevice version 0.12.3 on 2020-10-15 16:14:39
% Created by tikzDevice version 0.12.3.1 on 2021-07-02 12:48:23
% !TEX encoding = UTF-8 Unicode
\begin{tikzpicture}[x=1pt,y=1pt]
\definecolor{fillColor}{RGB}{255,255,255}
Expand Down
Binary file modified slides.pdf
Binary file not shown.

0 comments on commit 04b80de

Please sign in to comment.