Giter Club home page Giter Club logo

plsdepot's Introduction

plsdepot

The R package "plsdepot" provides a general framework for Partial Least Squares (PLS) Data Analysis Methods. "plsdepot" comes with a set of functions for PLS analysis of one or two data tables such as Tucker's Inter-Battery, NIPALS, SIMPLS, SIMPLS-CA, PLS Regression, as well as PLS Canonical Analysis.

Donation

As a Data Science and Statistics educator, I love to share the work I do. Each month I spend dozens of hours curating learning materials and computational tools like this R package. If you find any value and usefulness in plsdepot, please consider making a one-time donation---via paypal---in any amount (e.g. the amount you would spend inviting me a coffee or any other drink). Your support really matters.

Installation

To install the stable version of "plsdepot" from CRAN, run in your R console:

install.packages("plsdepot")

To install the development version of "plsdepot" from github (using the package "devtools"), simply run in your R console:

# install.packages("devtools") 
library(devtools)
install_github('plsdepot',  username='gastonstat')

Motivation

It's been more than 3 years since I first launched the R package plspm. From the feedback of several colleagues, analysts and practitioners, I believe that I did the right thing in releasing and sharing the work of my doctoral adventure. I've received a lot of emails with nice comments, compliments, and congratulations. But I've also received constructive criticism, proposals, improvement suggestions... and bug reports.

If there is something in particular that I've learned over the last 3 years, is that being the maintainer of a package can be a really tough task. And this is the main reason for me to launch "plsdepot".

I've decided to split "plspm" in order to separate those methods specifically designed for PLS Path Modeling from the rest of the PLS methods. This makes much easier the maintainance of the functions, and it also allows me to kill the bugs in a more efficient way.

I know this decision may affect the work of some people, but in the long run is the only feasible solution that I can offer to keep my altruistic work alive.

plsdepot's People

Contributors

gastonstat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plsdepot's Issues

Error raised when one of the columns of the target matrix Y is constant

When one of the columns of the target matrix Y is constant the following error is raised both for plsca and plsreg2 :

Error in if (ah.dif < 1e-06 || iter == 100) break : 
  missing value where TRUE/FALSE needed

The following code snippet will allow to reproduce this:

data(linnerud)
X = linnerud[4:6]
Y = linnerud[1:3]
Y[,2] = 1
plsreg2(X, Y)
plsca(X, Y)

Is this behaviour expected?

Problems with installation from source

Hi, nice package. However, there is some problem to build the package from source:
C:\Program Files\R\R-3.2.0\bin\x64>rcmd INSTALL "C:/R/Package clones/plsdepot"

  • installing to library 'c:/R/win-library/3.2'
  • installing source package 'plsdepot' ...
    ** R
    Error in .install_package_code_files(".", instdir) :
    files in 'C:/R/Package clones/plsdepot/R' missing from 'Collate' field:
    plsdepot.R
    ERROR: unable to collate and parse R files for package 'plsdepot'
  • removing 'c:/R/win-library/3.2/plsdepot'

scaling is applied before cross validation

Scaling should applied separately on the training set and the test set (using the mean and sd from the training set).
The current code provides an over-optimistic result.

Correlation loading plot with with observations

Dear author of plsdepot package,
Sometimes, its is interesting to explore how individual observations relate to the X and Y variables analyzed.
In this regard that would be interesting to project the observations on the correlation plot, as suggested in this thread (https://stackoverflow.com/questions/52906389/correlation-loading-plot-from-plsr-with-observations-using-ggplot2). The plot example in the thread was produced from a commercial software. I tried to reproduce a similar plot using pls/plsdepot packages and ggplot.
I guess that would require a transformation step of both the x.scores and y.scores so that individual observations (rows) can be projected on a correlation loading scale (-1: 1). I haven't yet found a solution to that. Any suggestions will be much appreciated.

Predict plsreg2 model to project area

Hello,

I have used the plsreg2() function to create a model to predict rangeland condition using various remote sensing variables. I have, however, been unable to determine a way to predict the model over my project area. It seems that the predict() function does not exist within the package. Any suggestions on how to predict the model would be highly appreciated.

Thank you and apologies if I am misunderstanding the package use!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.