Questions tagged [sliding-window]

In data analysis, sliding windows are advancing sub-lists inside lists which allow, e.g., computation of a record's change from the previous record or next record. In networking, a sliding window may refer to a flow control technique that maintains windows of sequential frames sent or received without a corresponding acknowledgement.

In data analysis, sliding windows are advancing sub-lists inside lists which allow, e.g., computation of a record's change from the previous record or next record. In SQL in particular, the analytic functions LEAD(), LAG(), and computations OVER() a changing subset of query results involve sliding windows.

In networking, a sliding window may refer to a flow control technique that maintains windows of sequential frames sent or received without a corresponding acknowledgement.

441 questions
9
votes
2 answers

R: fast sliding window with given coordinates

I have a data table with nrow being around a million or two and ncol of about 200. Each entry in a row has a coordinate associated with it. Tiny portion of the data: [1,] -2.80331471 -0.8874522 -2.34401863 -3.811584 -2.1292443 [2,] 0.03177716 …
Karolis Koncevičius
  • 7,687
  • 9
  • 48
  • 71
7
votes
4 answers

Generalized sliding-window computation on the GPU

Here's some Python code that implements a sliding-window computation on two 3D matrices, X and Y. import numpy def sliding_dot( X,Y ) : assert X.ndim == Y.ndim == 3 iw,ih,id = X.shape fw,fh,fd = Y.shape assert id == fd assert…
BrianTheLion
  • 2,440
  • 2
  • 22
  • 43
7
votes
5 answers

How to use a timer in C++ to force input within a given time?

I want to implement a time out feature in C++. If the user does not input the value within 2 seconds then the program must display the time-out statement and ask the input again EX(OUTPUT SCREEN): Timer=0; Please enter the input: //if…
Ankita Rane
  • 161
  • 1
  • 1
  • 10
7
votes
2 answers

Finding k-mers in a sliding window

I am trying to work through this bioinformatics problem: https://stepic.org/lesson/An-Explosion-of-Hidden-Messages-4/step/1?course=Bioinformatics-Algorithms-2&unit=8 The specific question is in the 5th window of the link above, and the question is: …
epicode
  • 73
  • 1
  • 3
7
votes
2 answers

Bigquery SQL for sliding window aggregate

Hi I have a table that looks like this Date Customer Pageviews 2014/03/01 abc 5 2014/03/02 xyz 8 2014/03/03 abc 6 I want to get page view aggregates grouped by week but showing aggregates for past 30 days…
7
votes
1 answer

contrast enhancement of an image using neighbourhoood

Hi I want to enhance the contrast of an image using the neighbourhood pixel values. Let the image be considered as u0. Then I want to enhance the image by using the formula Here, M1 is the minima and M2 is the maxima of u0 among the neighbourhood…
roni
  • 1,384
  • 3
  • 26
  • 48
6
votes
2 answers

SlidingWindows for slow data (big intervals) on Apache Beam

I am working with Chicago Traffic Tracker dataset, where new data is published every 15 minutes. When new data is available, it represents records off by 10-15 minutes from the "real time" (example, look for _last_updt). For example, at 00:20, I…
tyron
  • 2,223
  • 1
  • 18
  • 31
6
votes
1 answer

Forecasting model predict one day ahead - sliding window

I'm struggeling with a problem. I'm using SparkR for time series forecasting, but this scenario can also transferred to normal R environment. Instead of using ARIMA model I want to use regression models such as Random Forest Regression etc. to…
Daniel
  • 522
  • 1
  • 8
  • 27
6
votes
1 answer

Fast rolling-sum for list of data vectors (2d matrix)

I am looking for a fast way to compute a rolling-sum, possibly using Numpy. Here is my first approach: def func1(M, w): Rtn = np.zeros((M.shape[0], M.shape[1]-w+1)) for i in range(M.shape[1]-w+1): Rtn[:,i] = np.sum(M[:, i:w+i],…
user3329302
  • 527
  • 1
  • 7
  • 12
6
votes
1 answer

How to implement a better sliding window algorithm?

So I have been writing my own codes for HoG and its variant to work with depth images. However, I am stuck with testing my trained SVM in the detection window part. All that I've done right now is to first create image pyramids out of the original…
sub_o
  • 2,262
  • 4
  • 24
  • 39
5
votes
3 answers

Calculate median of a sliding window with awk

I need to produce a sliding window of millions of lines and to calculate the median of column 3. My data looks like this with column 1 always being the same, column 2 equaling the line number and column 3 being the information that I need the median…
acalcino
  • 195
  • 4
5
votes
2 answers

Fuzzy matching/chunking algorithm

Background: I have video clips and audio tracks that I want to sync with said videos. From the video clips, I'll extract a reference audio track. I also have another track that I want to synchronize with the reference track. The desync comes from…
Confluence
  • 1,271
  • 1
  • 9
  • 26
5
votes
2 answers

Numpy Vectorization of sliding-window operation

I have the following numpy arrays: arr_1 = [[1,2],[3,4],[5,6]] # 3 X 2 arr_2 = [[0.5,0.6],[0.7,0.8],[0.9,1.0],[1.1,1.2],[1.3,1.4]] # 5 X 2 arr_1 is clearly a 3 X 2 array, whereas arr_2 is a 5 X 2 array. Now without looping, I want to…
Nikhil
  • 405
  • 1
  • 4
  • 16
5
votes
2 answers

Non-Maximum Suppression on Detected Windows MATLAB

I am currently detecting heads in a CCTV image. I am using a HOG detector + SVM and I am using the sliding window technique to detect the heads. Of course, when I am scaling the image, I am having multiple detection/bounding boxes of the same head.…
5
votes
1 answer

Sliding window algorithm for activity recognition

I want to write a sliding window algorithm for use in activity recognition. The training data is <1xN> so I'm thinking I just need to take (say window_size=3) the window_size of data and train that. I also later want to use this algorithm on a…
csc
  • 61
  • 1
  • 4
1
2
3
29 30