diff --git a/DESCRIPTION b/DESCRIPTION index f72a8a6..e2907b0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,4 +21,4 @@ License: GPL-2 | file LICENSE URL: https://github.com/EpistasisLab/pmlbr Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.0 +RoxygenNote: 7.2.3 diff --git a/R/nearest.R b/R/nearest.R index 2fc1fc7..704b6ec 100644 --- a/R/nearest.R +++ b/R/nearest.R @@ -165,9 +165,9 @@ compute_imbalance <- function(target_col){ get_type <- function(x, include_binary = FALSE){ x <- stats::na.omit(x) - if (class(x) == 'numeric'){ + if (inherits(x, 'numeric')){ return('continuous') - } else if (class(x) %in% c('integer', 'factor')){ + } else if (inherits(x, 'integer') || inherits(x, 'factor')){ if (include_binary){ if (length(unique(x)) == 2) return('binary')} return('categorical') diff --git a/R/pmlbr-package.R b/R/pmlbr-package.R new file mode 100644 index 0000000..a65cf64 --- /dev/null +++ b/R/pmlbr-package.R @@ -0,0 +1,6 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/man/fetch_data.Rd b/man/fetch_data.Rd index 00983ab..866693e 100644 --- a/man/fetch_data.Rd +++ b/man/fetch_data.Rd @@ -27,15 +27,14 @@ Download a data set from the PMLB repository, (optionally) store it locally, and You must be connected to the internet if you are fetching a data set that is not cached locally. } \examples{ - # Features and labels in single data frame - penguins <- fetch_data('penguins') - penguins - - # Features and labels stored in separate data structures - penguins <- fetch_data('penguins', return_X_y=TRUE) - penguins$x # data frame - penguins$y # vector +# Features and labels in single data frame +penguins <- fetch_data("penguins") +head(penguins) +# Features and labels stored in separate data structures +penguins <- fetch_data("penguins", return_X_y = TRUE) +penguins$x # data frame +penguins$y # vector } \seealso{ \code{\link{summary_stats}}. diff --git a/man/figures/logo.png b/man/figures/logo.png index 1fe918f..d58d3b9 100644 Binary files a/man/figures/logo.png and b/man/figures/logo.png differ diff --git a/man/pmlbr-package.Rd b/man/pmlbr-package.Rd new file mode 100644 index 0000000..4dbcf67 --- /dev/null +++ b/man/pmlbr-package.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/pmlbr-package.R +\docType{package} +\name{pmlbr-package} +\alias{pmlbr} +\alias{pmlbr-package} +\title{pmlbr: Interface to the Penn Machine Learning Benchmarks Data Repository} +\description{ +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} + +Check available classification and regression data sets from the PMLB repository and download them. The PMLB repository (\url{https://github.com/EpistasisLab/pmlbr}) contains a curated collection of data sets for evaluating and comparing machine learning algorithms. These data sets cover a range of applications, and include binary/multi-class classification problems and regression problems, as well as combinations of categorical, ordinal, and continuous features. There are currently over 150 datasets included in the PMLB repository. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/EpistasisLab/pmlbr} + \item Report bugs at \url{https://github.com/EpistasisLab/pmlbr/issues} +} + +} +\author{ +\strong{Maintainer}: Trang Le \email{grixor@gmail.com} (https://trang.page/) + +Authors: +\itemize{ + \item makeyourownmaker \email{makeyourownmaker@gmx.com} (https://github.com/makeyourownmaker) + \item Jason Moore \email{jhmoore@upenn.edu} (http://www.epistasisblog.org/) +} + +Other contributors: +\itemize{ + \item University of Pennsylvania [copyright holder] +} + +} +\keyword{internal}