Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • See what's new at GitLab
    • 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 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tom Reynkens
  • smurf
  • Issues
  • #4

You need to sign in or sign up before continuing.
Closed
Open
Opened Nov 21, 2018 by Tom Reynkens@TReynkensMaintainer
  • Report abuse
  • New issue
Report abuse New issue

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 admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: TReynkens/smurf#4