Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/adapt new bh #138

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: FeatureHashing
Type: Package
Title: Creates a Model Matrix via Feature Hashing with a Formula Interface
Version: 0.9.1.5
Date: 2019-11-24
Version: 0.9.2
Date: 2024-01-10
Authors@R: c(
person("Wush", "Wu", email = "[email protected]", role = c("aut", "cre")),
person("Michael", "Benesty", email = "[email protected]", role = c("aut", "ctb")))
Expand All @@ -16,7 +16,7 @@ Description: Feature hashing, also called as the hashing trick, is a method to t
Please see the README in <https://github.com/wush978/FeatureHashing> for more information.
License: GPL(>= 3) | file LICENSE
Depends:
R (>= 3.1),
R (>= 4.0),
methods
Imports:
Rcpp (>= 0.11),
Expand All @@ -25,8 +25,7 @@ Imports:
magrittr (>= 1.5)
LinkingTo: Rcpp, digest(>= 0.6.8), BH(>= 1.54.0-1)
Suggests: RUnit, glmnet, knitr, xgboost, rmarkdown, pROC
SystemRequirements: C++11
BugReports: https://github.com/wush978/FeatureHashing/issues
URL: https://github.com/wush978/FeatureHashing
VignetteBuilder: knitr
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by roxygen2 (4.1.1): do not edit by hand
# Generated by roxygen2: do not edit by hand

export(hash.mapping)
export(hash.sign)
Expand Down
8 changes: 4 additions & 4 deletions R/hashed.model.matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#'@details
#'The \code{hashed.model.matrix} hashes the feature during
#'the construction of the model matrix. It uses the 32-bit variant of MurmurHash3
#'\url{https://code.google.com/p/smhasher/wiki/MurmurHash3}. Weinberger
#'\url{https://github.com/aappleby/smhasher}. Weinberger
#'et. al. (2009) used two separate hashing function \eqn{h}(\code{hashed.value}) and
#'\eqn{\xi}(\code{hash.sign}) to determine the indices and the sign of the values
#'respectively. Different seeds are used to implement the hashing function
Expand Down Expand Up @@ -73,7 +73,7 @@
#'Dhillon, Y. Koren, R. Ghani, T. E. Senator, P. Bradley, R. Parekh,
#'J. He, R. L. Grossman and R. Uthurusamy. ACM, 2013, pp. 1222-1230.
#'DOI: 10.1145/2487575.2488200. <URL:
#'\url{http://doi.acm.org/10.1145/2487575.2488200}>.
#'\url{https://doi.acm.org/10.1145/2487575.2488200}>.
#'
#'Kilian Q. Weinberger, Anirban Dasgupta, John Langford,
#'Alexander J. Smola, and Josh Attenberg. ICML, volume 382 of ACM
Expand Down Expand Up @@ -201,9 +201,9 @@ hashed.model.matrix <- function(formula, data, hash.size = 2^18, transpose = FAL
progress = FALSE) {
stopifnot(hash.size >= 0)
stopifnot(is.data.frame(data))
stopifnot(class(formula) %in% c("formula", "character"))
stopifnot(inherits(formula, "formula") | inherits(formula, "character"))

if(class(formula) == "character") formula %<>% paste(collapse = " + ") %>% paste("~", .) %>% as.formula
if(inherits(formula, "character")) formula %<>% paste(collapse = " + ") %>% paste("~", .) %>% as.formula

tf.idf.string <- "type = \"tf-idf\""

Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ output:
FeatureHashing
==============

Linux: [![Travis-ci Status](https://travis-ci.org/wush978/FeatureHashing.svg?branch=master)](https://travis-ci.org/wush978/FeatureHashing)
Linux: [![Travis-ci Status](https://app.travis-ci.com/wush978/FeatureHashing.svg?branch=master)](https://app.travis-ci.com/wush978/FeatureHashing)
Win : [![Build status](https://ci.appveyor.com/api/projects/status/bm4lpxn5f07d8klj/branch/master?svg=true)](https://ci.appveyor.com/project/wush978/featurehashing/branch/master)
OS X: [![Travis-ci Status](https://travis-ci.org/wush978/FeatureHashing.svg?branch=osx)](https://travis-ci.org/wush978/FeatureHashing)
OS X: [![Travis-ci Status](https://app.travis-ci.com/wush978/FeatureHashing.svg?branch=osx)](https://app.travis-ci.com/wush978/FeatureHashing)


[![Coverage Status](https://img.shields.io/coveralls/wush978/FeatureHashing.svg)](https://coveralls.io/r/wush978/FeatureHashing?branch=master)
[![Coverage Status](https://img.shields.io/coveralls/wush978/FeatureHashing.svg)](https://coveralls.io/github/wush978/FeatureHashing)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/FeatureHashing)](https://cran.r-project.org/package=FeatureHashing/)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/FeatureHashing)](https://github.com/metacran/cranlogs.app)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/FeatureHashing)](https://github.com/r-hub/cranlogs.app)

Implement feature hashing with R

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ output:
FeatureHashing
==============

Linux: [![Travis-ci Status](https://travis-ci.org/wush978/FeatureHashing.svg?branch=master)](https://travis-ci.org/wush978/FeatureHashing)
Linux: [![Travis-ci Status](https://app.travis-ci.com/wush978/FeatureHashing.svg?branch=master)](https://app.travis-ci.com/wush978/FeatureHashing)
Win : [![Build status](https://ci.appveyor.com/api/projects/status/bm4lpxn5f07d8klj/branch/master?svg=true)](https://ci.appveyor.com/project/wush978/featurehashing/branch/master)
OS X: [![Travis-ci Status](https://travis-ci.org/wush978/FeatureHashing.svg?branch=osx)](https://travis-ci.org/wush978/FeatureHashing)
OS X: [![Travis-ci Status](https://app.travis-ci.com/wush978/FeatureHashing.svg?branch=osx)](https://app.travis-ci.com/wush978/FeatureHashing)


[![Coverage Status](https://img.shields.io/coveralls/wush978/FeatureHashing.svg)](https://coveralls.io/r/wush978/FeatureHashing?branch=master)
[![Coverage Status](https://img.shields.io/coveralls/wush978/FeatureHashing.svg)](https://coveralls.io/github/wush978/FeatureHashing)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/FeatureHashing)](https://cran.r-project.org/package=FeatureHashing/)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/FeatureHashing)](https://github.com/metacran/cranlogs.app)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/FeatureHashing)](https://github.com/r-hub/cranlogs.app)

Implement feature hashing with R

Expand Down
12 changes: 6 additions & 6 deletions man/CSCMatrix-class.Rd

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

6 changes: 3 additions & 3 deletions man/hash.mapping.Rd

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

12 changes: 6 additions & 6 deletions man/hash.size.Rd

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

Loading