matloff / matloff/polyreg

example(xvalPoly) throws error

Open
#13 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
183
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I have been trying to run (working) code from a colleague on two different ubuntu machines. I can't get their code to run, and I can't even get the xvalPoly example to run.

Here is the unexpected error, followed by the complete R session in which it was produced (with sessionInfo). I get similar results from another machine. I'm not aware of anything weird I've done.


example(xvalPoly)

xvlPly> y <- mtcars[,1]

xvlPly> data <- cbind(mtcars[,-1], y) # make y column the last column

xvlPly> pf1 <- xvalPoly(data,2,2,"lm",0.8,FALSE)
Error in polyFit(training, i, m, use, pcaMethod, pcaLocation, pcaPortion, :
pcaMethod should be either NULL, prcomp, or RSpectra


R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

library(polyreg)
Loading required package: regtools
Loading required package: FNN
Loading required package: mvtnorm
Loading required package: dummies
dummies-1.5.6 provided by Decision Patterns

Loading required package: car
Loading required package: carData

packageVersion("polyreg")
[1] ‘0.2’
example(xvalPoly)

xvlPly> y <- mtcars[,1]

xvlPly> data <- cbind(mtcars[,-1], y) # make y column the last column

xvlPly> pf1 <- xvalPoly(data,2,2,"lm",0.8,FALSE)
Error in polyFit(training, i, m, use, pcaMethod, pcaLocation, pcaPortion, :
pcaMethod should be either NULL, prcomp, or RSpectra

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
[5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8
[7] LC_PAPER=en_CA.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] polyreg_0.2 regtools_1.0.1 car_3.0-2 carData_3.0-1 dummies_1.5.6
[6] mvtnorm_1.0-8 FNN_1.1.2.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rio_0.5.10 crayon_1.3.4 cellranger_1.1.0
[5] magrittr_1.5 zip_1.0.0 pillar_1.3.0 rlang_0.2.2
[9] readxl_1.1.0 curl_3.2 data.table_1.11.4 openxlsx_4.1.0
[13] tools_3.5.1 forcats_0.3.0 foreign_0.8-71 hms_0.4.2
[17] abind_1.4-5 compiler_3.5.1 pkgconfig_2.0.2 haven_1.1.2
[21] tibble_1.4.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing example(xvalPoly) in an R session using the reported call and inspect the xvalPoly and polyFit entry points, especially pcaMethod handling. The issue is done when the documented example runs without the reported pcaMethod error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.