Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mstomp_par transposes rows and columns if there are more columns than rows #58

Open
awchisholm opened this issue Nov 5, 2019 · 1 comment
Assignees

Comments

@awchisholm
Copy link

Describe the bug
In mstomp-par.R and mstomp.R, the function documentation states
@param data a matrix of numeric, where each column is a time series

but the code transposes the data if the number of columns exceeds the number of rows.

if (ncol(data) > nrow(
    data <- t(
}

This causes the must_dim parameter to fail if the columns to include now exceeds the number of original rows

To Reproduce
Code with a multivariate time series containining more columns than rows

df = mp_toy_data$data
tdf = t(df)   
dim(tdf) # [1] 3 550
mp2 <- mstomp(tdf, 30, must_dim = c(1:4)) # should allow 1:4 out of 1:550 to be included

Expected behavior
The original data should not be transposed and must_dim should then work

Screenshots
none

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • Browser Chrome

Additional context
None

@franzbischoff
Copy link
Member

Thank you for open this issue. Indeed you are right. I'll address this issue in future releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants