Skip to content

Commit

Permalink
add build target (#301)
Browse files Browse the repository at this point in the history
* add build target

* remove packages we dont need

* sort

* rebuild

* add randomForest

* remove kernlab models
  • Loading branch information
zachmayer authored Aug 7, 2024
1 parent 49e7f2a commit b3c088c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
41 changes: 17 additions & 24 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: caretEnsemble
Type: Package
Title: Ensembles of Caret Models
Version: 2.0.4
Version: 4.0.0
Date: 2024-08-06
Authors@R: c(person(c("Zachary", "A."), "Deane-Mayer", role = c("aut", "cre"),
email = "[email protected]"),
Expand All @@ -17,38 +17,31 @@ Description: Functions for creating ensembles of caret models: caretList()
Depends:
R (>= 3.2.0)
Suggests:
MASS,
caTools,
testthat,
devtools,
lintr,
covr,
randomForest,
devtools,
gbm,
glmnet,
rpart,
kernlab,
nnet,
e1071,
ipred,
pROC,
knitr,
lintr,
mlbench,
MASS,
gbm,
plyr,
klaR,
nnet,
randomForest,
rmarkdown,
usethis,
sass,
spelling
rpart,
spelling,
testthat,
usethis
Imports:
methods,
pbapply,
caret,
data.table,
ggplot2,
lattice,
data.table,
caret,
rlang,
patchwork
methods,
patchwork,
pbapply,
rlang
License: MIT + file LICENSE
VignetteBuilder: knitr
RoxygenNote: 7.3.2
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for R project

.PHONY: all install-deps install document update-test-fixtures test coverage-test coverage check fix-style lint spell build-vignettes release clean
.PHONY: all install-deps install document update-test-fixtures test coverage-test coverage check fix-style lint spell build-vignettes release clean build

# Default target
all: clean fix-style document install build-vignettes lint spell test check coverage
Expand Down Expand Up @@ -89,6 +89,9 @@ spell:
}; \
"

build:
Rscript -e "devtools::build()"

# Build vignettes
build-vignettes:
Rscript -e "devtools::build_vignettes()"
Expand Down
2 changes: 1 addition & 1 deletion cobertura.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverage SYSTEM "https://raw.githubusercontent.com/cobertura/cobertura/master/cobertura/src/site/htdocs/xml/coverage-04.dtd">
<coverage line-rate="1" branch-rate="0" lines-covered="593" lines-valid="593" branches-covered="0" branches-valid="0" complexity="0" version="3.6.4" timestamp="2024-08-06 18:34:27.174984">
<coverage line-rate="1" branch-rate="0" lines-covered="593" lines-valid="593" branches-covered="0" branches-valid="0" complexity="0" version="3.6.4" timestamp="2024-08-06 20:17:50.678775">
<sources>
<source>/Users/zach/source/caretEnsemble</source>
</sources>
Expand Down
Binary file modified coverage.rds
Binary file not shown.
8 changes: 4 additions & 4 deletions tests/testthat/test-caretList.R
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ testthat::test_that("Longer tests for Classification models", {
x = train[, -23L],
y = train[, "Class"],
metric = "ROC",
methodList = c("svmLinear", "knn", "glm")
methodList = c("rpart", "knn", "glm")
)

testthat::expect_is(test2, "caretList")
Expand Down Expand Up @@ -460,8 +460,8 @@ testthat::test_that("Users can pass a custom tuneList", {
tuneLength = 9L
),
svmRadial = caretModelSpec(
method = "svmRadial",
tuneLength = 3L
method = "lda2",
tuneLength = 1L
)
)

Expand All @@ -476,7 +476,7 @@ testthat::test_that("Users can pass a custom tuneList", {
testthat::expect_is(test2a, "caretList")
testthat::expect_identical(nrow(test2a[[1L]]$results), 4L)
testthat::expect_identical(nrow(test2a[[2L]]$results), 9L)
testthat::expect_identical(nrow(test2a[[3L]]$results), 3L)
testthat::expect_identical(nrow(test2a[[3L]]$results), 1L)
})

testthat::context("User tuneTest parameters are respected and model is ensembled")
Expand Down

0 comments on commit b3c088c

Please sign in to comment.