Skip to content

Commit fe2c102

Browse files
committed
for CRAN
1 parent 97798ca commit fe2c102

File tree

11 files changed

+15
-12
lines changed

11 files changed

+15
-12
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: densratio
22
Type: Package
3-
Version: 0.2.0
3+
Version: 0.2.1
44
Title: Density Ratio Estimation
55
Description: Density ratio estimation.
66
The estimated density ratio function can be used in many applications such as

R/KLIEP.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#' @param x2 numeric vector or matrix. Data from a denominator distribution q(x).
55
#' @param sigma positive numeric vector. Search range of Gaussian kernel bandwidth.
66
#' @param kernel_num positive integer. Number of kernels.
7-
#' @param fold positive integer. Numer of the folds of cross validation.
8-
#' @param verbose logical(default TRUE).
7+
#' @param fold positive integer. Number of the folds of cross validation.
8+
#' @param verbose logical (default TRUE).
99
#'
1010
#' @return KLIEP object that contains a function to compute estimated density ratio.
1111
#'

R/compute_kernel_Gaussian.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ kernel_Gaussian <- function(x, y, sigma) {
1515
#' @param x a numeric vector.
1616
#' @param y a numeric vector.
1717
#'
18-
#' @return squared euclid distance
18+
#' @return squared Euclid distance
1919
squared_euclid_distance <- function(x, y) {
2020
sum((x - y) ^ 2)
2121
}

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ library(mvtnorm)
2424

2525
<!-- badges: start -->
2626
[![Travis-CI Build Status](https://travis-ci.org/hoxo-m/densratio.svg?branch=master)](https://travis-ci.org/hoxo-m/densratio)
27-
[![CRAN Version](http://www.r-pkg.org/badges/version/densratio)](https://CRAN.R-project.org/package=densratio)
28-
[![CRAN Downloads](http://cranlogs.r-pkg.org/badges/densratio)](http://cranlogs.r-pkg.org/badges/densratio/)
27+
[![CRAN Version](https://www.r-pkg.org/badges/version/densratio)](https://CRAN.R-project.org/package=densratio)
28+
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/densratio)](https://CRAN.R-project.org/package=densratio)
2929
[![Coverage Status](https://coveralls.io/repos/github/hoxo-m/densratio/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/densratio?branch=master)
3030
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/hoxo-m)
3131
<!-- badges: end -->

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
[![Travis-CI Build
1010
Status](https://travis-ci.org/hoxo-m/densratio.svg?branch=master)](https://travis-ci.org/hoxo-m/densratio)
1111
[![CRAN
12-
Version](http://www.r-pkg.org/badges/version/densratio)](https://CRAN.R-project.org/package=densratio)
12+
Version](https://www.r-pkg.org/badges/version/densratio)](https://CRAN.R-project.org/package=densratio)
1313
[![CRAN
14-
Downloads](http://cranlogs.r-pkg.org/badges/densratio)](http://cranlogs.r-pkg.org/badges/densratio/)
14+
Downloads](https://cranlogs.r-pkg.org/badges/densratio)](https://CRAN.R-project.org/package=densratio)
1515
[![Coverage
1616
Status](https://coveralls.io/repos/github/hoxo-m/densratio/badge.svg?branch=master)](https://coveralls.io/github/hoxo-m/densratio?branch=master)
1717
[![Say

man/KLIEP.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/squared_euclid_distance.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.

tests/testthat/test-KLIEP.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test_that("KLIEP", {
1414
expected_kernel_weights <- c(0.0885607375, 0.0178664639, 0.0240389107,
1515
0.0000000000, 0.0810753470, 0.0001353598)
1616

17+
testthat::skip_on_cran()
1718
expect_equal(head(kernel_weights), expected_kernel_weights)
1819
expect_equal(sigma, 0.09)
1920
})

tests/testthat/test-RuLSIF.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test_that("RuLSIF", {
1414
expected_kernel_weights <- c(0.070454411, 0.028303149, 0.003146211,
1515
0.010641579, 0.055200243, 0.012069721)
1616

17+
testthat::skip_on_cran()
1718
expect_equal(head(kernel_weights), expected_kernel_weights)
1819
expect_equal(sigma, 0.1)
1920
expect_equal(lambda, 0.1)

tests/testthat/test-uLSIF.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ test_that("uLSIF", {
1414
expected_kernel_weights <- c(0.0674550859, 0.0400446153, 0.0004589047,
1515
0.0168489465, 0.0670843163, 0.0189929309)
1616

17+
testthat::skip_on_cran()
1718
expect_equal(head(kernel_weights), expected_kernel_weights)
1819
expect_equal(sigma, 0.1)
1920
expect_equal(lambda, 1)

vignettes/densratio.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $$
2525

2626
where $x1$ and $x2$ are $d$-dimensional real numbers.
2727

28-
The estimated density ratio function $w(x)$ can be used in many applications such as **anomaly detection** [Hido et al. 2011], **changepoint detection** [Liu et al. 2013], and **covariate shift adaptation** [Sugiyama et al. 2007].
28+
The estimated density ratio function $w(x)$ can be used in many applications such as **anomaly detection** [Hido et al. 2011], **change-point detection** [Liu et al. 2013], and **covariate shift adaptation** [Sugiyama et al. 2007].
2929
Other useful applications about density ratio estimation were summarized by [Sugiyama et al. 2012].
3030

3131
The package **densratio** provides a function `densratio()` that returns an object with a method to estimate density ratio as `compute_density_ratio()`.

0 commit comments

Comments
 (0)