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
1
vote
1 answer

how to write a method (decompose) that takes as input a string and returns the array of characters that compose the string in java?

Hint: The expression s.charAt(i) returns the character at position i of the string s. Test: String word = "Hello"; System.out.println("The word \""+word+"\" decomposes as "+Arrays.toString(decomposeString(word))); Result: The word "Hello"…
ClaraC
  • 13
  • 2
1
vote
1 answer

How can I modify the aesthetics of a graphic made by the decompose function?

I need to decompose my time series using the function decompose() but I have to change some of the aesthetics of the graphic in order to fit in my work. I need the variables (trend, seasonal, random,...) to be on an opposite side of the scales for…
macs2021
  • 85
  • 1
  • 7
1
vote
1 answer

PyEMD returning different number of IMFs for train, test data

I am using PyEMD (Empirical Mode Decomposition) on a signal (train & test ) data. All seems be working fine for all signals (datasets), but in my one of the dataset number of IMFs it is decomposing is different for train & test dataset. I have tried…
Mohd Naved
  • 358
  • 3
  • 12
1
vote
1 answer

How do I write a Python code for partial fraction decomposition without using "apart"?

So I am very unexperienced with Python, I know basically nothing, and our teacher gave us the task to write a code that makes a partial fraction decomposition with this function: I don't really know how to start or even how to define that function.…
Phie Phie
  • 11
  • 1
  • 3
1
vote
1 answer

F# type test pattern matching: decomposing tuple objects

Just curious why I can't do this: let myFn (data : obj) = match data with | :? (string * string) as (s1, s2) -> sprintf "(%s, %s)" s1 s2 |> Some | :? (string * string * int) as (s1, s2, i) -> sprintf "(%s, %s, %d)" s1 s2 i |> Some |…
MiloDC
  • 2,373
  • 1
  • 16
  • 25
1
vote
1 answer

Is there a equivalent of "js ...array decomposition" for php?

function f(x, y, z) { } var args = [0, 1, 2]; f(...args); // <= Like this Is there a equivalent of "js ...array decomposition" for php? (PS: I have already search on google with keyword like : "php array decomposition" but no luck)
Mahefa
  • 418
  • 3
  • 12
1
vote
1 answer

Forecasting using mutiple seasonal STL and arima

I am attempting to forecast half hourly electricity data. The method I am using is to decompose the electricity consumption data using 'mstl' from the 'Forecast' package by Rob Hyndman and then forecast the seasonally adjusted data using ARIMA. df…
shaodong
  • 11
  • 2
1
vote
1 answer

PCA().fit() is using the wrong axis for data input

I'm using sklearn.decomposition.PCA to pre-process some training data for a machine learning model. There is 247 data points with 4095 dimensions, imported from a csv file using pandas. I then scale the data training_data =…
Dan Pollard
  • 51
  • 1
  • 7
1
vote
2 answers

Backtraking with list Monad in Haskell

I'm trying to solve a decomposition problem with backtracking and list Monad in Haskell. Here is the problem statement: given a positive integer n, find all lists of consecutive integers (in range i..j) whose sum is equal to n. I came out with the…
1
vote
1 answer

Error with oaxaca package in r - non-conformable arguments

I am trying to run a Oaxaca decomposition using the oaxaca package, but the inclusion of certain variables seems to trigger the error "non-conformable arguments." As far as I can tell, the error seems to only arise with the inclusion of certain…
Ella Wind
  • 121
  • 12
1
vote
0 answers

OOP, Python: how to (architecturally correctly) implement different text files parsers?

Good day everyone. I'm building a RESTful API which returns content of some text files (.pdd). The files are organized as follows: |-- 10200 # some patient's id | |-- Cardio | | |-- 3002 # some event…
Larleyt
  • 83
  • 1
  • 1
  • 5
1
vote
4 answers

Methods and decomposition

I'm just starting learning Java after a few years of HTML/CSS coding so hopefully I'm not asking a old or stupid question here but any help explaining this problem would be very much appreciated. I'm currently working through the Stanford CS106A…
sh3llcmdr
  • 21
  • 1
  • 6
1
vote
1 answer

Dependency preservation: Why is this decomposition dependency preserving?

In our database class, our instructor showed this as an example of a dependency-preserving decomposition: R(A, B, C) with F = { A->B, B->C } decomposed into R1(A, B) and R2(A, C) In order for a decomposition to be dependency preserving, the…
1
vote
0 answers

Is PCA considered as a data pre-processing algorithm or a standalone clustering algorithm?

For many times I am told that PCA is a data preprocessing procedure; we could represent the characteristics of sample data by using principal components. Some times, however, I see a clear clustering trend if we plot the sample with PC1 and PC2. So…
GDJi
  • 21
  • 2
1
vote
0 answers

Which numbers on binary number line are used in a sum?

Looking for an algorithm to determine which numbers in a continuous binary number line that are equal to a given sum. For example given the binary numbers 1,2,4,8 which are required to sum to 13? The only answer is 1+4+8. My solution so far is to…