Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Hello, I am working on monte carlo markov chain to generate synthetic data for energy consumption values. Any heads up on this, will be really helpful.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have empirical data for 17520 records that I am reading from an excel file, discretizing those values into 8 bins and creating Transition Probability matrix after binning. However, I don't understand how to simulate this matrix to generate new consumption values. Here is the code I have so far:
filename = 'newTestingExcel.xlsx'; Furnace=xlsread(filename,'B:B'); %H1D1
edges = linspace(min(Furnace),max(Furnace),8); [counts,bins] = histc(Furnace, edges); [counts,bins] = histc(Furnace, edges);
%# transition matrix
m = max(bins); n = numel(bins); y = zeros(m,1); p = zeros(m,m); for k=1:n-1 y(bins(k)) = y(bins(k)) + 1; p(bins(k),bins(k+1)) = p(bins(k),bins(k+1)) + 1; end p = bsxfun(@rdivide,p,y); p(isnan(p)) = 0;
disp(trans);
0 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!