machinery
machinery

Reputation: 6290

Normalizing time series measurements

I have read the following sentence:

Figure 3 depicts how the pressure develops during a touch event. It shows the mean over all button touches from all users. To account for the different hold times of the touch events, the time axis has been normalized before averaging the pressure values.

They have measured the touch pressure over touch events and made a plot. I think normalizing the time axis means to scale the time axis to 1s, for example. But how can this be made? Let's say for example I have a measurement which spans 3.34 seconds (1000 timestamps and 1000 measurements). How can I normalize this measurement?

Upvotes: 0

Views: 962

Answers (1)

Nikolaos Paschos
Nikolaos Paschos

Reputation: 426

If you want to normalize you data you can do as you suggest and simply calculate:

z_i=\frac{x_i-min(x)}{max(x)-min(x)}

(Sorry but i cannot post images yet but you can visit this )

where zi is your i-th normalized time data, and xi is your absolute data.

An example using numpy:

import numpy

x = numpy.random.rand(10) # generate 10 random values
normalized = (x-min(x))/(max(x)-min(x))

print(x,normalized)

Upvotes: 2

Related Questions