Buildings.Utilities.Clustering.Validation
Validation models for clustering functions.
Information
This package contains models for validation of clustering functions. The examples plot various outputs, which have been verified against comparative results. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
KMeans_1d | Model that verifies the k-means clustering function for 1d data |
KMeans_2d | Model that verifies the k-means clustering function for 2d data |
Buildings.Utilities.Clustering.Validation.KMeans_1d
Model that verifies the k-means clustering function for 1d data
Information
This example tests the k-means clustering algorithm on 1d data.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | n_clusters | 3 | Number of clusters to be generated |
Real | data[:, :] | [1; 2; 2; 3; 4] | Test data to be clustered |
Integer | nDat | size(data, 1) | Number of samples |
Integer | nDim | size(data, 2) | Number of features |
Real | centroids[n_clusters, nDim] | Centroids of the clusters | |
Integer | labels[nDat] | Cluster label associated with each data point | |
Integer | cluster_size[n_clusters] | Size of the clusters | |
Integer | labelsExp[nDat] | {2,2,2,1,3} | Expected cluster labels |
Modelica definition
Buildings.Utilities.Clustering.Validation.KMeans_2d
Model that verifies the k-means clustering function for 2d data
Information
This example tests the k-means clustering algorithm on 2d data.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Integer | n_clusters | 3 | Number of clusters to be generated |
Real | data[:, :] | [1, 1; 1, 2; 2, 1; 2, 1.2; 3... | Test data to be clustered |
Integer | nDat | size(data, 1) | Number of samples |
Integer | nDim | size(data, 2) | Number of features |
Real | centroids[n_clusters, nDim] | Centroids of the clusters | |
Integer | labels[nDat] | Cluster label associated with each data point | |
Integer | cluster_size[n_clusters] | Size of the clusters | |
Integer | labelsExp[nDat] | {2,2,1,2,1,3} | Expected cluster labels |