資源簡介
復雜度只有O(N)的小波聚類,超級好用,代碼分塊詳細,帶范例可直接運行,在主程序可更改數據
代碼片段和文件信息
%Assigns?elements?to?cells?and?computes?cell?counts.
%Meant?as?a?helper?function;?don‘t?call?directly?unless?you?have?a?reason.
function?[counts]?=?assign_cells(datacells?weights?num_cells)
????%This?will?expand?the?2D?matrix?into?a?multidimensional?structure?(thus
????%no?size()?around?num_cells)...?num_cells?is?a?vector.
????counts?=?zeros(num_cells);
????
????idxcell?=?num2cell(datacells?1);
????countidx?=?sub2ind(size(counts)?idxcell{:});
????for?countpos?=?1:length(countidx)
????????%TODO:?Vectorize.
????????counts(countidx(countpos))?=?counts(countidx(countpos))?+?weights(countpos);
????end
????%Low-order:?use?sparse.?High-order:?use?sptensor.
????%counts?=?sparse(counts);????%Most?of?the?counts?will?be?0.?This?saves
????%memory.
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????771??2010-04-21?23:12??wavecluster\assign_cells.m
?????文件???????1646??2010-04-20?00:49??wavecluster\data2grid.m
?????文件???????1109??2011-01-29?00:00??wavecluster\dwtN.m
?????文件????????619??2017-11-14?19:08??wavecluster\EXAMPLE_USAGE.m
?????文件????????303??2011-01-28?23:41??wavecluster\fold.m
?????文件????????785??2009-06-25?17:48??wavecluster\grid_wavecluster_output.m
?????文件??????36519??2010-04-21?23:30??wavecluster\LICENSE.txt
?????文件???????1299??2011-01-29?00:16??wavecluster\swtN.m
?????文件????????268??2011-01-28?23:32??wavecluster\unfold.m
?????文件????????645??2009-01-29?08:30??wavecluster\vol2features.m
?????文件???????1525??2009-04-04?23:21??wavecluster\WaveCluster.m
?????文件??????11058??2011-03-26?14:07??wavecluster\wavecluster_example_data.mat
?????文件???????2416??2010-04-21?23:10??wavecluster\WaveCluster_Preprocess.m
?????目錄??????????0??2017-11-14?17:09??wavecluster
-----------?---------??----------?-----??----
????????????????58963????????????????????14
- 上一篇:基于matlab的改進的lzw的算法實現
- 下一篇:MATLAB提取灰度直方圖特征
評論
共有 條評論