Skip to content

Commit

Permalink
Prepare the release of version 1.0.0 (#70)
Browse files Browse the repository at this point in the history
* Fix typos

* Update NEWS, bump version

* Fix moved link

* update cran_comments.md

* update cran_comments.md

* Add badges in README.md
  • Loading branch information
mikolajsp authored Mar 20, 2023
1 parent d311404 commit 76993e0
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: survex
Title: Explainable Machine Learning in Survival Analysis
Version: 0.2.2.9000
Version: 1.0.0
Authors@R:
c(
person("Mikołaj", "Spytek", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7111-2286")),
Expand Down
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* *breaking change:* refactored the structure of `model_performance_survival` object - calculated metrics are now in a `$result` list.
* added new `calculation_method` for `surv_shap()` called `"kernelshap"` that use `kernelshap` package and its implementation of improved Kernel SHAP (set as default) ([#45](https://github.com/ModelOriented/survex/issues/45))
* rename old method `"kernel"` to `"exact_kernel"`
* added new import ([`kernelshap`](https://github.com/mayer79/kernelshap) package)
* added new import ([`kernelshap`](https://github.com/ModelOriented/kernelshap) package)
* fixed invalid color palette order in plot feature importance
* fixed predict_parts survshap running out of memory with more than 16 variables ([#25](https://github.com/ModelOriented/survex/issues/25))
* added `max_vars` parameter for predict_parts explanations ([#27](https://github.com/ModelOriented/survex/issues/27))
Expand All @@ -26,7 +26,6 @@
* reduced the default number of time points for evaluation when creating the explainer to 50



# survex 0.2.2

* improved and unified API documentation ([#2](https://github.com/ModelOriented/survex/issues/2))
Expand Down
2 changes: 1 addition & 1 deletion R/explain.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' * `residual_function` - function that returns residuals, shall return a single numerical value for each observation.
#' * `class` - class/classes of a model.
#' * `label` - label of explainer.
#' * `model_info` - named list contating basic information about model, like package, version of package and type.
#' * `model_info` - named list containing basic information about model, like package, version of package and type.
#' * `times` - a vector of times, that are used for evaluation of survival function and cumulative hazard function by default
#' * `predict_survival_function` - function that is used for model predictions in the form of survival function
#' * `predict_cumulative_hazard_function` - function that is used for model predictions in the form of cumulative hazard function
Expand Down
2 changes: 1 addition & 1 deletion R/plot_model_parts_survival.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @section Plot options:
#'
#' * `title` - character, title of the plot
#' * `subtitle` - character, subtitle of the plot, if `NULL` automaticaly generated as "created for XXX, YYY models", where XXX and YYY are explainer labels
#' * `subtitle` - character, subtitle of the plot, if `NULL` automatically generated as "created for XXX, YYY models", where XXX and YYY are explainer labels
#' * `max_vars` - maximum number of variables to be plotted (least important variables are ignored)
#' * `colors` - character vector containing the colors to be used for plotting variables (containing either hex codes "#FF69B4", or names "blue")
#' * `rug` - character, one of `"all"`, `"events"`, `"censors"`, `"none"` or `NULL`. Which times to mark on the x axis in `geom_rug()`.
Expand Down
2 changes: 1 addition & 1 deletion R/plot_surv_feature_importance.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Plot Permuatational Feature Importance for Survival Models
#' Plot Permutational Feature Importance for Survival Models
#'
#' This function plots feature importance objects created for survival models using the
#' `model_parts()` function with a time-dependent metric, that is `loss_one_minus_cd_auc()` or
Expand Down
2 changes: 1 addition & 1 deletion R/predict_profile.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Instance Level Profile as Ceteris Paribus for Survival Models
#'
#' This function calculates Ceteris Paribus Proifles for a specific observation with the possibility to take the time dimension into account.
#' This function calculates Ceteris Paribus Profiles for a specific observation with the possibility to take the time dimension into account.
#'
#' @param explainer an explainer object - model preprocessed by the `explain()` function
#' @param new_observation a new observation for which the prediction need to be explained
Expand Down
2 changes: 1 addition & 1 deletion R/surv_feature_importance.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Helper functions for `model_parts.R`
#'
#' This function is used to calculate permutational feature imporance using
#' This function is used to calculate permutational feature importance using
#' a time-dependent metric. The result is the change in loss function at each
#' time point after permuting each selected variable.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ generate_discrete_color_scale <- function(n, colors = NULL) {

#' Transform Fixed Point Prediction into a Stepfunction
#'
#' Some models return the survival funciton or cumulative hazard function prediction at the times of events present in the training data set. This is a convenient utility to allow the prediction to be evaluated at any time.
#' Some models return the survival function or cumulative hazard function prediction at the times of events present in the training data set. This is a convenient utility to allow the prediction to be evaluated at any time.
#'
#' @param predict_function a function making the prediction based on `model` and `newdata` arguments, the `...` parameter is also passed to this function. It has to return either a numeric vector of the same length as `eval_times`, a matrix with this number of columns and the same number of rows as `nrow(newdata)`. It can also return a list, with one of the elements containing such an object.
#' @param eval_times a numeric vector of times, at which the fixed predictions are made. This can be `NULL`, if `predict_function` returns a list which contains such a vector.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
[![R-CMD-check](https://github.com/ModelOriented/survex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ModelOriented/survex/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/ModelOriented/survex/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ModelOriented/survex?branch=main)
[![CRAN status](https://www.r-pkg.org/badges/version/survex)](https://cran.r-project.org/package=survex)
[![Total downloads](https://cranlogs.r-pkg.org/badges/grand-total/survex?color=orange)](https://cranlogs.r-pkg.org/badges/grand-total/survex)
[![DrWhy-BackBone](https://img.shields.io/badge/DrWhy-BackBone-373589)](http://drwhy.ai/#BackBone)


## Overview

Expand Down
6 changes: 1 addition & 5 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
## Resubmission 30/11/2022

* wrapped long examples in \donttest{}
they no longer exceed 5s
* fixed NOTE about doi numbers using wrong tags
## Submission 20/03/2023 v.1.0.0

## R CMD check results

Expand Down
2 changes: 1 addition & 1 deletion man/explain_survival.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot.model_parts_survival.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot.surv_feature_importance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predict_profile.surv_explainer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/surv_feature_importance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/transform_to_stepfunction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 76993e0

Please sign in to comment.