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.

583 questions
-1
votes
1 answer

How to do slidingwindow and DTW in r

i have multivariate time series data and want to do sliding window and dtw for graph matching : there is any example i can refer . Thank you in advance
-1
votes
2 answers

Dataset Time Windowing

I have a Dataset under this form I want to split the data set by making a windowing which includes the lines that happen every 2 minutes, then i m going to include the result in another data set which will be under this form i'm asking if anyone…
-1
votes
3 answers

C# Boolean Window Most Common

I'm looking to create a moving window that stores boolean values and outputs the most common boolean value. I want to be able to add new values on the fly, for example: bool[] window = { false, false, true, true, true }; New 'false' value added,…
embedded.95
  • 63
  • 1
  • 8
-1
votes
1 answer

Runtime error in following leetcode problem

Problem link - https://leetcode.com/problems/maximum-average-subarray-i/ class Solution { public: double findMaxAverage(vector& nums, int k) { deque> d; //deque since its a sliding window problem vector ans; …
Anu
  • 13
  • 1
-1
votes
3 answers

Write a program to find max sum of K size window in n*m matrix traversing in 8 possible directions linearly

I recently gave interview at a company and was rejected in final round having only one problem. The interviewer stated a 2D-array of n*m length. We can traverse left right top down as well as both diagonally. A fixed window k was provided to find…
-1
votes
1 answer

How to make this loop parallel and faster?

I have this set of images from which I want to create a set of sub images with a stride with sub image size of 128*128, original image must be greater than this size (row and column both), I have created the following functions : def…
-1
votes
1 answer

Pandas: Sliding window, summing app 14 day data

I do wonder how it is possible to make sliding windows in Pandas. I have a dataframe with three columns. Country | Number | DayOfTheYear =================================== No | 50 | 0 No | 20 | 1 No | 37 | 2 I would love…
Hemmelig
  • 803
  • 10
  • 22
-1
votes
1 answer

Longest substring with repeating characters in cpp

In one of my recent interviews I was given a question as follows - Divide the string into substrings with repeating characters, such that Example 1 Input : ababccdecfg Output : [abab, ccdec, f, g] Example 2 Input : bbbb Output : [bbbb] Example…
-1
votes
1 answer

Sliding Window Algorithm

I know that the time complexity of the sliding window algorithm is o(N) but what is the time complexity of a variable-sized sliding window algorithm. For eg- array = [1,2,3,4,5,6] when size of sliding window is = 1 window - [1], [2], [3], [4], [5],…
-1
votes
1 answer

Python - Iterate through a list and append n values every nth iteration to a vector

I am dealing with a deep reinforcement learning problem and the state I need to feed to my agent is contained in a vector of binary numbers. The list looks like that: [7.0, 1.0, 1.0, 0.0, 1.0, 5.0, 0.0, 1.0, 0.0, 1.0, 7.0, 1.0, 1.0, 0.0, 1.0,…
-1
votes
2 answers

sliding window to find minimums in MATLAB 2014a

I am new to MATLAB and I wonder is there any way for me to do the following: get a list of indices of minimum values in each 180 samples of my data which is 18000 samples in length This is how I used to do it in Python (with numpy.where), but now…
user10497058
-1
votes
2 answers

Count distinct elements in every window of size k*k

I found this on: http://www.geeksforgeeks.org/count-distinct-elements-in-every-window-of-size-k/ Given an array of size n and an integer k, return the of count of distinct numbers in all windows of size k. (...) An Efficient Solution is to use…
Tom
  • 29
  • 3
-1
votes
1 answer

Sliding window over numerical sequence

I am trying to build a sliding window approach that will slide over the numerical sequence of the elements in a list. This is important and, I believe, different from other sliding window approaches found in SO, in which the slide is usually made…
PedroA
  • 1,803
  • 4
  • 27
  • 50
-1
votes
1 answer

If I have a 15 min sliding window, how can I collect daily/weekly aggregates?

I have a 15 min sliding window, and can aggregate at any given time over this data within this window. Due to memory constraints, I can't increase the size of the window. I still think I should be able to get aggregates (like trending items which is…
-2
votes
1 answer

Leetcode: Time limit exceeded, Longest palindromic substring

I am wondering how to optimize my solution to the LeetCode question: 5. Longest palindromic substring: Given a string s, return the longest palindromic substring in s. I get Time Limit exceeded on really long strings (up to 1000 characters), but…
1 2 3
38
39