Skip to content

Commit 0b092e5

Browse files
committed
Last fixes before cran release
1 parent 99ad741 commit 0b092e5

File tree

10 files changed

+163
-8
lines changed

10 files changed

+163
-8
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ License: GPL-3
1212
Encoding: UTF-8
1313
LazyData: true
1414
Roxygen: list(markdown = TRUE)
15-
RoxygenNote: 7.1.1
15+
RoxygenNote: 7.1.2
1616
Imports:
1717
DALEX,
1818
dendextend,

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ importFrom(grDevices,hcl)
3333
importFrom(graphics,plot)
3434
importFrom(ingredients,accumulated_dependence)
3535
importFrom(ingredients,partial_dependence)
36+
importFrom(sets,set)
3637
importFrom(sets,set_union)
3738
importFrom(stats,AIC)
3839
importFrom(stats,aggregate)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# version 0.1.3
22
- Updated DESCRIPTION (arxiv link changed to doi).
33
- Added citation to [Simpler is better: Lifting interpretability-performance trade-off via automated feature engineering](https://doi.org/10.1016/j.dss.2021.113556).
4+
- Small fixes for compatibility with `sets` package.
45

56
# version 0.1.2
67

R/safely_detect_changepoints.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#' data <- c(rnorm(15, 0), rnorm(20, 2), rnorm(30, 8))
2626
#' safely_detect_changepoints(data)
2727
#' safely_detect_changepoints(data, penalty = 25)
28-
#'
2928
#' @export
3029

3130
safely_detect_changepoints <- function(data, penalty = "MBIC", nquantiles = 10) {
@@ -120,7 +119,7 @@ cost <- function(data, u, v, sumstat, K) { #function that evaluates cost of data
120119

121120
}
122121

123-
#' @importFrom sets set_union
122+
#' @importFrom sets set_union set
124123
PELT_algorithm <- function(data, penalty_value, sumstat, K) {
125124

126125
if (is.null(data)) {
@@ -166,13 +165,13 @@ PELT_algorithm <- function(data, penalty_value, sumstat, K) {
166165
#updating R set for next iterations - removing those points that can never be the last optimal changepoint
167166
for (tau in R) {
168167
if (Q[tau+1] + cost(data, tau+1, v, sumstat, K) > Q[v+1] + epsilon) {
169-
R <- R - tau
168+
R <- R - set(tau)
170169
}
171170
}
172171
R <- set_union(R, v)
173172
}
174173

175-
cpts_final <- cp[[n+1]] - 0
174+
cpts_final <- cp[[n+1]] - set(0)
176175

177176
return(sort(unlist(cpts_final)))
178177

inst/CITATION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bibentry(bibtype = "Article",
55
pages = "113556",
66
year = "2021",
77
issn = "0167-9236",
8-
doi = "https://doi.org/10.1016/j.dss.2021.113556",
8+
doi = "10.1016/j.dss.2021.113556",
99
url = "https://www.sciencedirect.com/science/article/pii/S016792362100066X",
1010
author = "Alicja Gosiewska and Anna Kozak and Przemyslaw Biecek",
1111
)

inst/WORDLIST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Bemowo
44
Bielany
55
CMD
66
DALEX
7+
doi
8+
dss
79
GBM
810
Hannan
911
Kaggle
@@ -32,6 +34,7 @@ github
3234
glm
3335
https
3436
interpretable
37+
interpretability
3538
kaggle
3639
mcquitty
3740
param

man/rSAFE-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/safely_detect_changepoints.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 66 additions & 0 deletions
Loading
Lines changed: 86 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)