Skip to content

Commit

Permalink
Merge pull request #1 from edahelsinki/update
Browse files Browse the repository at this point in the history
Update to match the journal version
  • Loading branch information
Aggrathon authored Jan 31, 2022
2 parents a1917bc + 603be80 commit 8cd0165
Show file tree
Hide file tree
Showing 141 changed files with 10,566 additions and 3,712 deletions.
14 changes: 10 additions & 4 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.vscode
^experiments$
^.*\.Rproj$
^\.Rproj\.user$
^.*\.Rcheck$
^\.vscode$
^experiments$
^.*.zip
^.*.tar.gz
^\.lintr$
^CITATIONS.bib$
^\.github$
44 changes: 44 additions & 0 deletions .github/workflows/r_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: '3.6'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
115 changes: 61 additions & 54 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,54 +1,61 @@
.env/
env/
__pycache__
*.so
*.o
*.pcm
*.d
*.root
.vscode
*.cxx_tmp_*
*.rds
*ACLiC*
.Rproj.user
r/*.html
*.RData
*.aux
*.log
*.fls
*.fdb_latexmk
*.pdf
*.synctex.*
*.nb.html
.Rhistory
.Rapp.history
.RData
*-Ex.R
/*.tar.gz
/*.Rcheck/
vignettes/*.html
vignettes/*.pdf
.httr-oauth
/*_cache/
/cache/
*.utf8.md
*.knit.md
rsconnect/
experiments/results/*
!experiments/results/*.jpg
experiments/data/*
!experiments/data/*.r
!experiments/data/*.R
!experiments/data/*.py
!experiments/data/*.cpp
!experiments/data/*.h
tmp
*.html
*.zip
*~
*.~
todo.md
.lintr
!vignettes/paper.pdf
!vignettes/presentation.pdf
!vignettes/poster.pdf
.env/
env/
__pycache__
*.so
*.o
*.pcm
*.d
*.root
.vscode
*.cxx_tmp_*
*.rds
*ACLiC*
.Rproj.user
*Rproj
r/*.html
*.RData
*.Rcheck
*.aux
*.log
*.fls
*.fdb_latexmk
*.pdf
*.synctex.*
*.nb.html
.Rhistory
.Rapp.history
.RData
*-Ex.R
/*.tar.gz
/*.Rcheck/
vignettes/*.html
vignettes/*.pdf
.httr-oauth
/*_cache/
/cache/
*.utf8.md
*.knit.md
rsconnect/
experiments/results/*
!experiments/results/*.png
!experiments/results/*.jpg
experiments/data/*
!experiments/data/*.r
!experiments/data/*.R
!experiments/data/*.py
!experiments/data/*.cpp
!experiments/data/*.h
tmp
*.html
*.zip
*.tar.gz

*~
*.~
todo.md
*.dll
data/*
log*.txt
!vignettes/paper.pdf
!vignettes/presentation.pdf
!vignettes/poster.pdf
7 changes: 7 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
linters: with_defaults(
line_length_linter(120),
commented_code_linter = NULL,
object_name_linter = NULL,
object_usage_linter = NULL
)
encoding: "utf-8"
22 changes: 22 additions & 0 deletions CITATIONS.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@article{bjorklund2022robust,
title = {Robust regression via error tolerance},
author = {Bj{\"o}rklund, Anton and Henelius, Andreas and Oikarinen, Emilia and Kallonen, Kimmo and Puolam{\"a}ki, Kai},
year = {2022},
month = jan,
journal = {Data Mining and Knowledge Discovery},
issn = {1384-5810, 1573-756X},
doi = {10.1007/s10618-022-00819-2}
}
@inproceedings{bjorklund2019sparse,
title = {Sparse Robust Regression for Explaining Classifiers},
booktitle = {Discovery Science},
author = {Bj{\"o}rklund, Anton and Henelius, Andreas and Oikarinen, Emilia and Kallonen, Kimmo and Puolam{\"a}ki, Kai},
year = {2019},
series = {Lecture Notes in Computer Science},
volume = {11828},
pages = {351--366},
publisher = {Springer International Publishing},
doi = {10.1007/978-3-030-33778-0_27},
isbn = {978-3-030-33777-3 978-3-030-33778-0}
}
35 changes: 18 additions & 17 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Package: slise
Title: Sparse Linear Subset Explanations
Version: 1.0.0
Authors@R: person("Anton", "Björklund", email = "anton.bjorklund@helsinki.fi", role = c("aut", "cre"))
Description: An implementation of the SLISE
algorithm for robust regression and
explaining outcomes from black box models.
Depends: R (>= 3.5), Rcpp
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: lbfgs, RcppArmadillo, ggplot2, stats, utils, methods, graphics, grDevices
Suggests: scatterplot3d, grid, gridExtra, reshape2, crayon, wordcloud, testthat, stringr, numDeriv, R.rsp
URL: https://github.com/edahelsinki/slise
LinkingTo: Rcpp, RcppArmadillo
RoxygenNote: 6.1.1.9000
VignetteBuilder: R.rsp
Package: slise
Title: Sparse Linear Subset Explanations
Version: 2.0.0
Authors@R: c(
person("Anton", "Björklund", email = "anton.bjorklund@helsinki.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7749-2918")),
person("Andreas", "Henelius", role = "aut", comment = c(ORCID = "0000-0002-4040-6967")),
person("Kai", "Puolamäki", role = "aut", comment = c(ORCID = "0000-0003-1819-1047")))
Description: An implementation of the SLISE algorithm (for robust regression and explaining outcomes from black box models).
Depends: R (>= 3.5), Rcpp
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: lbfgs, stats, utils, methods, graphics, base
Suggests: ggplot2, grid, gridExtra, reshape2, wordcloud, testthat, numDeriv, R.rsp
URL: https://github.com/edahelsinki/slise
LinkingTo: Rcpp, RcppArmadillo
RoxygenNote: 7.1.1
VignetteBuilder: R.rsp
40 changes: 20 additions & 20 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2019 Anton Björklund, University of Helsinki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
MIT License
Copyright (c) 2022 Anton Björklund, University of Helsinki
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 29 additions & 14 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
# Generated by roxygen2: do not edit by hand

S3method(explain,slise)
S3method(plot,slise)
S3method(predict,slise)
S3method(print,slise)
export(explain)
export(slise.explain)
export(slise.explain_comb)
export(slise.explain_find)
export(slise.fit)
export(slise.raw)
importFrom(Rcpp,sourceCpp)
useDynLib(slise)
# Generated by roxygen2: do not edit by hand

S3method(plot,slise)
S3method(predict,slise)
S3method(print,slise)
export(graduated_optimisation)
export(scale_robust)
export(simple_pca)
export(slise.explain)
export(slise.explain_comb)
export(slise.explain_find)
export(slise.fit)
export(slise_initialisation_candidates)
export(slise_initialisation_candidates2)
export(slise_initialisation_lasso)
export(slise_initialisation_ols)
export(slise_initialisation_zeros)
importFrom(Rcpp,sourceCpp)
importFrom(graphics,legend)
importFrom(stats,.lm.fit)
importFrom(stats,lm.wfit)
importFrom(stats,mad)
importFrom(stats,median)
importFrom(stats,predict)
importFrom(stats,quantile)
importFrom(stats,sd)
importFrom(stats,uniroot)
importFrom(utils,combn)
useDynLib(slise)
Loading

0 comments on commit 8cd0165

Please sign in to comment.