Questions tagged [decomposition]

Decomposition might refer to Time Series Decomposition. Decomposing a time-series into Seasonal and Trend components can be achieved by using several methods, such as STL (which uses a Loess smoothing algorithm).

Prefer using if applicable.


Time series data can exhibit a variety of patterns, and it is often helpful to split a time series into several components, each representing an underlying pattern category.

There are three types of time series patterns: trend, seasonality and cycles. When we decompose a time series into components, we usually combine the trend and cycle into a single trend-cycle component (often just called the trend for simplicity). Thus we can think of a time series as comprising three components: a trend-cycle component, a seasonal component, and a remainder component (containing anything else in the time series). For some time series (e.g., those that are observed at least daily), there can be more than one seasonal component, corresponding to the different seasonal periods.

345 questions
2
votes
0 answers

How to decompose linear regression error in statsmodel

I want to decompose the error sum of the squares into the lack of fit error and pure error. I am using the statsmodel library. model = sm.OLS(y, X) res= model.fit() I know how to decompose the total sum of squares(res.centered_tss) into the…
Borut Flis
  • 15,715
  • 30
  • 92
  • 119
2
votes
3 answers

should this method be decomposed into separate methods?

This method takes search a search keyword and parsed mysql query, and rewrites the where expression to include LIKE %keyword%. It works well, but I dont know if its good or bad practice to have a method with this many loops... private function…
Peter
  • 2,276
  • 4
  • 32
  • 40
2
votes
2 answers

How well to decompose the subject area into OOP?

Please recommend how to properly decompose the domain in the OOP ? We need an in-depth book for this topic. Please do not write these books (GOF , Head First Object Oriented Analysis , Object-Oriented Software Construction 'Bertrand Meyer'). if…
Rasul
  • 161
  • 1
  • 5
2
votes
1 answer

What is the auto Bracketed List Syntax?

W.F. gave a now-deleted answer to my question here which used the line: auto [x, y] = div_t{ 1, 0 }; From the code in the answer it looks like that's like a tie for the div_t struct. I was hoping that someone could explain what was going on here.…
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
2
votes
1 answer

Quadtree decomposition in MATLAB: qtdecomp function input

Does anyone have experience with defining an input function as threshold criterion for the qtdecomp function in MATLAB? I tried the following but it did not work: MyFunc = @(A,threshold) std2(A)>threshold; S = qtdecomp(Image,MyFunc,threshold);…
S.C. Graaf
  • 21
  • 2
2
votes
0 answers

Mulithreading Example: Data Decomposition in Picture Processing

Currently I am programming an example for a java program which uses basic Multithreading. I want to show the advantage of the data composition principle in an image processing application that resembles a monochromatic filter. I load a picture in a…
2
votes
1 answer

Decomposing 3rd Order Tensor in Python

I have a tensor in the shape (n_samples, n_steps, n_features). I want to decompose this into a tensor of shape (n_samples, n_components). I need a method of decomposition that has a .fit(...) so that I can apply the same decomposition to a new…
Ty Pavicich
  • 1,050
  • 3
  • 9
  • 24
2
votes
3 answers

Eigenvector (Spectral) Decomposition

I am trying to find a program in C code that will allow me to compute a eigenvalue (spectral) decomposition for a square matrix. I am specifically trying to find code where the highest eigenvalue (and therefore its associated eigenvalue) are located…
Spencer
  • 245
  • 2
  • 5
  • 9
2
votes
1 answer

Modular Partitioning

Given a list of non-negative integers say a0,a1,a2, . . . ,an and a constant positive integer m. We want to generate all lists of non-negative integers of the form a'0,a'1,a'2, . . . ,a'n such that: There exists an i such that ai ≠ a'i. For all i,…
Halbort
  • 742
  • 1
  • 6
  • 19
2
votes
2 answers

Polygon decomposition in special direction

I am searching for a library which can do the decomposition of polygons. I want define define directions or lines in which the polygon should be fragmented, as seen here: So that I get the small polygons. Anyone know a library which supports…
Hunk
  • 479
  • 11
  • 33
2
votes
1 answer

Armadillo C++ LU decomposition

I am using the Armadillo C++ library for solving linear systems of medium/large dimensions (1000-5000 equations). Since I have to solve different linear systems AX=b in which A is always the same and B changes, I would like to LU factorize A only…
2
votes
1 answer

Is a low number of members in a class considered a code smell?

I am currently making a simple to-do list program using the MVC pattern, and thus have a model class for the Notebook. However, something feels "off" as it has a very low number of members. The Notebook is composed of categories, which are composed…
LDM91
  • 437
  • 1
  • 7
  • 16
2
votes
2 answers

I tried decomposing my function, but I'm not sure if I did it right

Originally, this function was embedded into the main function, creating a very cluttered main function. The program replaces tabs with the number of spaces. I'm still confused as to what goes inside the argument lists for my functions and how to…
user2387766
2
votes
2 answers

Generating Positive definite matrix of dimensions 8x8

I am trying to generate a positive definite matrix (A'*A) of dimensions 8x8. where A is 1x8. I tried it for many randomly generated matrix A but not able to generate it. octave-3.6.1.exe:166> A= (rand(1,8)+rand(1,8)*1i); octave-3.6.1.exe:167>…
complex22
  • 23
  • 3
2
votes
3 answers

Finding slope before and after breakpoint

I'm currently using the bfast package in R to decompose a time series. I was curious if it was possible to extract the slope of the trend segment before and after a breakpoint (until an end or another breakpoint)? The example below was taken from…
rj2700
  • 1,770
  • 6
  • 28
  • 55