📄 myseperateclusters.m
字号:
function [clusters_assignments] = MySeperateClusters(Samples,beta,quad,R,q)
%=====================================================================
% 对来的程序进行修改,去了对数据的分类估计和比较。
%
% SeperateClusters
% ----------------
%
% Parameters:
% Samples - The matrix holds the data points.
% beta - The vector of the Lagrangian multipliers.
% quad - The quadratic part of the distace from the sphere's
% center.
% R - The minimal sphere's radius.
% q - The width of the gaussian kernel.
% classification - The apriori classifications for each Data point.
%
% Return Value:
% clusters_assignments -
% A vector of the clusters assignments assigned by the algorithm
% to the data points.
% maj_class - The classifications assigned by the algorithm to each point.
% mis_class - The number of errors of the assigned classification against
% the apriori classifications.
% nof_samples_per_class_per_cluster
%
% The sphere is mapped back to data space, where it forms a set
% of contours which enclose the data points.
% These contours are interpeted as clusters boundaries.
%
%=====================================================================
[attr,N] = size(Samples);
% calculates the adjacent matrix
adjacent_matrix = FindAdjMatrix(Samples,N,beta,quad,R,q);
% Finds the cluster assignment of each data point
clusters_assignments = FindConnectedComponents(adjacent_matrix,N);
% end clock
toc
% finds the classification of each cluster according to the majority.
% [maj_class, mis_class,nof_samples_per_class_per_cluster] = Classify(classifications, clusters_assignments);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -