Skip to content

Commit

Permalink
Merge pull request #22 from l-ramirez-lopez/v2.0
Browse files Browse the repository at this point in the history
v2.0 is now on CRAN
  • Loading branch information
l-ramirez-lopez authored Nov 9, 2020
2 parents 443ae94 + 0da6a50 commit 54dd483
Show file tree
Hide file tree
Showing 67 changed files with 2,283 additions and 1,599 deletions.
6 changes: 5 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
^.*\.Rproj$
^\.Rproj\.user$
resemble_logo.png
code_ex.R
.travis.yml
^packrat/
^\.Rprofile$
^cran-comments\.md$
^my-comments\.md$
logo.R
^Rscript*
logo_large.png
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ r_packages:
- covr
- data.table
- magrittr
- dplyr
- testthat

after_success:
Expand Down
62 changes: 18 additions & 44 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
Package: resemble
Type: Package
Title:
Regression and Similarity Evaluation for Memory-Based Learning in
Spectral Chemometrics
Title: Memory-Based Learning in Spectral Chemometrics
Version: 2.0.0
Date: 2020-10-12
Authors@R:
c(person(given = "Leonardo",
family = "Ramirez-Lopez",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-5369-5120")),
person(given = "Antoine",
family = "Stevens",
role = "ctb",
comment = c(ORCID = "0000-0002-1588-7519")),
person(given = "Raphael",
family = "Viscarra Rossel",
role = "ctb",
comment = c(ORCID = "0000-0003-1540-4748")),
person(given = "Craig",
family = "Lobsey",
role = "ctb",
comment = c(ORCID = "0000-0001-5416-8640")),
person(given = "Alex",
family = "Wadoux",
role = "ctb",
comment = c(ORCID = "0000-0001-7325-9716")),
person(given = "Timo",
family = "Breure",
role = "ctb",
comment = c(ORCID = "0000-0001-5695-8064"))
)
Date: 2020-10-29
Author: Leonardo Ramirez-Lopez [aut, cre],
Antoine Stevens [aut, ctb],
Raphael Viscarra Rossel [ctb],
Craig Lobsey [ctb],
Alex Wadoux [ctb],
Timo Breure [ctb]
Maintainer:
Leonardo Ramirez-Lopez <[email protected]>
BugReports:
https://github.com/l-ramirez-lopez/resemble/issues
Description:
Functions for spectral similarity/dissimilarity
analysis and memory-based learning (MBL) for non-linear modeling
in complex spectral data sets. In chemometrics MBL is also known
as local modeling.
Functions for dissimilarity analysis and memory-based learning
(MBL, a.k.a local modeling) in complex spectral data sets.
Most of these functions are based the methods presented in
Ramirez-Lopez et al. (2013) <doi:10.1016/j.geoderma.2012.12.014>.
License: MIT + file LICENSE
URL: http://l-ramirez-lopez.github.io/resemble/
Depends:
Expand All @@ -49,26 +26,23 @@ Imports:
foreach,
iterators,
Rcpp (>= 1.0.3),
dplyr (>= 0.7.0),
mathjaxr (>= 1.0),
magrittr (>= 1.5.0),
lifecycle (>= 0.2.0),
lifecycle (>= 0.2.0),
data.table (>= 1.9.8)
Suggests:
prospectr,
parallel,
doParallel,
testthat,
doParallel,
testthat,
formatR,
bookdown,
rmarkdown,
bookdown,
knitr
LinkingTo:
Rcpp,
Rcpp,
RcppArmadillo
RdMacros:
mathjaxr,
lifecycle
RdMacros: mathjaxr
VignetteBuilder: knitr
NeedsCompilation: yes
LazyData: true
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ import(grDevices)
import(graphics)
import(iterators)
import(lifecycle)
importFrom(dplyr,if_else)
importFrom(dplyr,select)
import(mathjaxr)
importFrom(graphics,barplot)
importFrom(lifecycle,deprecate_soft)
importFrom(magrittr,"%>%")
Expand Down
134 changes: 122 additions & 12 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,20 +1,130 @@
# News for the resemble package

## Version 2.0 (gordillo)

* 11.10.2020
New vignette!
## resemble 2.0 (gordillo)

* 02.07.2020
During the recent lockdown we had the chance to inevest a enough time on the
development of a new version of the package resemble. This new version comes
with significant improvements as well as new functionality. For example, it now
matches the tidyverse R style guide, it includes unit tests, includes new
functionality for modeling, mbl is bit faster and a bit less memory-hungry, etc.
See changes.md file for further details.


## Version 1.3 (never released)
functionality for modeling, mbl is faster and a less memory-hungry.

### New features
- search_neighbors() function.
- dissimilarity() function.

## Improvements and fixes
- mbl is faster and a less memory-hungry.
- New vignette.
- unit tests have been introduced using the testthat package.

## Breaking changes

### orthoProjection, pcProjection, plsProjection (renamed to ortho_projection,
pc_projection, pls_projection respectively):
- X2 argument renamed to Xu (for consistency throughout all the fucntions)
- Argument scaled renamed to .scale
- Argument max.iter renamed to max_iter
- Bug fix: when the "pca.nipals method was used and the method to select the pcs wa "opc",
the function was returning 1 component less than the maximum requested.
- "pca.nipals" is now implemented in C++ via Rcpp
- Bug fix in plsProjection: when "cumvar" was used as the pcSelection method, an
error about data allocation in a matrix was retrieved
- Argument pcSelection renamed to pc_selection
- ... is deprecated in both pcProjection and plsProjection
- Argument cores is deprecated, it was used to set the number of cores in some
c++ internal functions via OpenMP in Rcpp.
- Names the following outputs have been changed: X.loadings, Y.loadings, sc.sdv
and n.components. Their new names are: X_loadings, Y_loadings, sc_sdv and
n_components.

### corDiss (renamed to cor_diss):
- X2 argument renamed to Xu (for consistency throughout all the fucntions)
- Argument scaled renamed to .scale
- default for .scale has changed from TRUE to FALSE
- the dimnames of the resulting matrix are now Xr_1... Xr_n (previusly Xr.1... Xr.n)

### fDiss (renamed to f_diss):
- X2 argument renamed to Xu (for consistency throughout all the fucntions)
- Argument scaled renamed to .scale
- default for .scale has changed from TRUE to FALSE
- the dimnames of the resulting matrix are now Xr_1... Xr_n (previusly Xr.1... Xr.n)
- argument method changed to diss_method

### sid:
- X2 argument renamed to Xu (for consistency throughout all the fucntions)
- Argument scaled renamed to .scale
- default for .scale has changed from TRUE to FALSE
- the dimnames of the resulting matrix are now Xr_1... Xr_n (previusly Xr.1... Xr.n)


### orthoDiss (renamed to ortho_diss):
- X2 argument renamed to Xu (for consistency throughout all the fucntions)
- Argument scaled renamed to .scale
- Argument local renamed to .local
- Argument pcSelection renamed to pc_selection
- Argument return.all renamed to compute_all
- Argument cores is deprecated, it wwas used to set the number of cores in some
c++ internal functions via OpenMP in Rcpp.
- When \code{.local = TRUE} a new output is produced: 'neighborhood_info' which
is a data.frame containing the relevant information about the neighborhood of
each sample (e.g. neighborhood indices, number of components used at each
neighborhood, etc)
- Output global.variance.info has been renamed to global_variance_info


### simEval (renamed to sim_eval):
- argument sideInf renamed to side_info
- argument lower.tri renamed to lower_triangle
- argument cores renamed to omp_threads
- lower_triangle is deprecated. Now if a vector is passed to d, the function assumes
that it is a lower triangle of a distance matrix
- Argument cores is deprecated, it wwas used to set the number of cores in some
c++ internal functions via OpenMP in Rcpp.


### mbl
- pls.max.iter, pls.tol and noise.v were moved to mbl from mbl_control()
- Argument scaled (from mbl_control()) renamed to .scale and moved to mbl
- new arguments: gh and spike
- Argument pcSelection renamed to pc_selection
- Argument mblCtrl renamed to control
- Argument dissUsage renamed to diss_usage
- order of the Yr, Xr, Yu and Xu arguments has changed to Xr, Yr, Xu and Yu
- input type for the argument method has changed. Previously it received a
character string indicating the type of local regresion (i.e. "pls",
"wapls1" or "gpr"). Now it receives an object of class local_fit which is output
by the new local_fit fucntions.
- dissimilarityM has been deprecated. It was used to pass a dissimilarity matrix
computed outiside the mbl fucntion. This can be done now with the new argument
diss_method of mbl which was previosly named "sm" and it was in mblControl()


### neigCleaning (now search_neighbors)
- Function renamed to search_neighbors
- Argument cores is deprecated, it was used to set the number of cores in some
c++ internal functions via OpenMP in Rcpp.


### mblControl (renamed to mbl_control):
- sm argument is deprecated. Now the dissmilarity metric is an argument of the
mbl fucntion
- scale and center arguments have been moved to the mbl fucntion
- Argument range.pred.lim renamed to range_prediction_limits
- Argument cores is deprecated, it was used to set the number of cores in some
c++ internal functions via OpenMP in Rcpp.
- k0, pcMethod, ghMethod are deprecated
- localOptimization has been renamed to tune_locally
- valMethod has been renamed to validation_type
- Option "loc_crossval" in validation_type has been renamed to "local_cv"

### plot.mbl
- option "pca" was replaced by option "gh" which plots the pls projection used
for computing the gh distance in mbl



## resemble 1.3 (never released)

* 11.04.2020
The option 'movcor' for the argument sm of mblControl() is deprecated. The
Expand All @@ -37,7 +147,7 @@ differences, dividing it by the number of variables and then compute the squared
root i.e. sqrt(mean((Xi-Xj)^2)/ncol(Xi)). This bug had no effect on the
computations of the nearest neighbors.

## Version 1.2.0001 (alma de coco)
## resemble 1.2.0001 (alma de coco)
* 13.09.2016
A bug in the computation of the Mahalanobis distance in the PLS space was fixed.

Expand All @@ -60,7 +170,7 @@ corrected in the documentation.
the projection Matrix (projectionM) returned by plsProjection now only contains
the columns corresponding only to the number components retrieved

## Version 1.2 (alma de coco)
## resemble 1.2 (alma de coco)
* 04.03.2016
A patch was released for and extrange bug that prevented to run mbl
in parallel when the gpr method was used.
Expand Down Expand Up @@ -96,5 +206,5 @@ The function movcorDist was removed since. it was included by mistake in the
previous version of the package. The corDiss function can be used in
raplacement of movcorDist.

## Versions 1.0 and 1.1.1
## resemble 1.1.1
* 19.03.2013 Hello world! Initial release of the package
19 changes: 16 additions & 3 deletions R/AAA.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@

.onAttach <- function(lib, pkg) {
# assign("gpclib", FALSE, envir=.RESEMBLE_CACHE)
resemble_v <- read.dcf(file = system.file("DESCRIPTION", package = pkg), fields = "Version")
packageStartupMessage(paste0("\033[34m", pkg, " version ", resemble_v, " -- 'gordillo'\033[39m"))
packageStartupMessage("\033[34mcheck the package repository at https://github.com/l-ramirez-lopez/resemble/\033[39m")
resemble_v <- read.dcf(
file = system.file("DESCRIPTION", package = pkg),
fields = "Version"
)
mss <- paste0(
"\033[34m",
pkg, " version ",
resemble_v,
" -- 'gordillo'\033[39m"
)
mss2 <- paste0(
"\033[34mcheck the package repository at: ",
"https://github.com/l-ramirez-lopez/resemble/\033[39m"
)
packageStartupMessage(mss)
packageStartupMessage(mss2)
}

# .onUnload <- function(libpath) {
Expand Down
Loading

0 comments on commit 54dd483

Please sign in to comment.