Domanda

Avvicinamento aggregato simbolico parla di convertire una serie temporale (x, t) in simboli. Basato su questo, ho poche query di base.Cosa succede se il segnale temporale è un composito di (x, y, z, t) che rappresenta le coordinate di posizione o semplicemente (x, y, t) per l'immagine dimensionale con un timestamp t.Allora come uso questo strumento per assegnare simboli / discretizzare. Punta aiuto.

È stato utile?

Soluzione

È possibile applicare il sax trasformazione a ciascuna dimensione separatamente, quindi combina I simboli / lettere per ogni momento Timbro.

Prendi il (X, Y, Z, T) Ad esempio, si ottiene la combinazione b,a,c per T= 1, quindi a,a,c per T= 2, ecc.

Puoi quindi combinare i simboli per formare "Mega-Symbols" se vuoi. Dì che il set di simboli era Symbols={a,b,c}. Quindi il nuovo set di lettere sarebbe semplicemente il prodotto cartesiano SxSxS (uno per ogni dimensione).

In altre parole aaa diventa la nuova lettera A, aab come B, quindi aac, aba, abb, ecc.


.

Modifica:

Ecco alcuni codice per mostrare cosa avevo in mente. Dal momento che non ho un'implementazione dell'algoritmo sax, utilizzerò la seguente funzione di segnaposto (restituisce la spazzatura):

%# use your actual SAX function instead of this one
my_sax_function = @(x,n,a) randi(a, [n 1]);
.

Ecco il codice:

%# time series of length=100, with (x,y,z) at each timestamp
data = cumsum(randn(100,3));

%# apply your SAX function to each dimension independently
N = 20;     %# number of segments to divide the signal into
A = 3;      %# size of alphabet (a,b,c)
dataSAX = zeros(N,3);
for i=1:3
    dataSAX(:,i) = my_sax_function(data(:,i), N, A);
end

%# we assume the above function returns integers denoting the symbols
%# therefore row i corresponds to A=3 symbols for each of the 3 x/y/z dimensions
dataSAX(1,:)

%# build cartesian product of all combinations of the A=3 symbols
[x y z] = ndgrid(1:A,1:A,1:A);
cartProd = [x(:) y(:) z(:)];

%# map to the new alphabet with 3*3*3 = 27 symbols
[~,V] = ismember(dataSAX, cartProd, 'rows')

%# A to Z with $ character to make up 27 symbols
oldSymbols = {'a';'b';'c'};             %# 1: a, 2: b, 3: c
newSymbols = cellstr(['A':'Z' '$']');   %# 1: A, ..., 26: Z, 27: $

%# SAX representation of the entire time series as a string
mappedV = char(newSymbols(V))'
.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top