Questions tagged [unfold]

An unfold function is the opposite (or dual) of a fold. Unfolds recursively generate a list (or other recursive data structure) of values from a seed value.

An unfold function is the opposite (or dual) of a . Unfolds recursively generate a list (or other recursive data structure) of values from a seed value.

Unfold functions are often used functional languages which support to construct a whose values are only created on demand.

48 questions
0
votes
1 answer

TCL error with "unfold" function in survival analysis

I am trying to use the unfold function from package RcmdrPlugin.survival. I used the following command: long.df <- unfold(testdf,time="deathint", event="death", cov=list(31:70,71:110), cov.names=c("adopted","age")) However, R is…
EdSeab
  • 3
  • 1
0
votes
2 answers

Generating list of iterations on own output in Python

Sorry for what seems like a basic question, but I could not find it anywhere. In Python 2, I would like to apply a 1-variable function to its own output storing the list of all steps, i.e. if f(x) returns x*x then iterating from 2, i need to get [2,…
gt6989b
  • 4,125
  • 8
  • 46
  • 64
-1
votes
1 answer

Is there an unfolding-folding operation, that will perform a matrix repetition in pytorch?

I have the following tensor in pytorch: i1 = torch.randn(1, 32, 320, 640) I would like to extract the following sliding blocks [:,:,i,0:15], [:,:,i+80,0:15], [:,:,i+160,0:15], [:,:,i+240,0:15] [:,:,i,1:16], [:,:,i+80,1:16], [:,:,i+160,1:16],…
Ilias
  • 1
  • 1
1 2 3
4