Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
S
smurf
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tom Reynkens
  • smurf
  • Issues
  • #4

Closed
Open
Opened Nov 21, 2018 by Tom Reynkens@TReynkensMaintainer

Sweep in standardization

When running glmsmurf with a continuous predictor that has a Lasso or Group Lasso penalty, there is an error in the standardization. The default behavior of R is to reduce a matrix with one column to a vector which causes the error in the sweep function which is used in the standardization. This can only happen when there is a single column corresponding to a feature that needs to be standardized, i.e. it has a Lasso or Group Lasso penalty.

Example:

require(smurf)

data("rent", package = "catdata")

rent$kitchen <- factor(rent$kitchen, labels = c("no", "yes"))
formu <- rentm ~ p(rent, pen ="lasso") + p(kitchen, pen ="lasso")
munich.fit <- glmsmurf(formula = formu, family = gaussian(), data = rent, lambda = 0.008914)

which gives the error

Error in array(STATS, dims[perm]) : 'dims' must be of length 0".
Edited Nov 21, 2018 by Tom Reynkens
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: TReynkens/smurf#4