statcpp
C++17 Header-Only Statistics Library
Loading...
Searching...
No Matches
Public Attributes | List of all members
statcpp::kmeans_result Struct Reference

K-means clustering result. More...

#include <clustering.hpp>

Public Attributes

std::vector< std::size_t > labels
 Cluster assignments.
 
std::vector< std::vector< double > > centroids
 Cluster centroids.
 
double inertia
 Inertia (within-cluster sum of squares)
 
std::size_t n_iter
 Number of iterations until convergence.
 

Detailed Description

K-means clustering result.

Definition at line 83 of file clustering.hpp.

Member Data Documentation

◆ centroids

std::vector<std::vector<double> > statcpp::kmeans_result::centroids

Cluster centroids.

Definition at line 85 of file clustering.hpp.

◆ inertia

double statcpp::kmeans_result::inertia

Inertia (within-cluster sum of squares)

Definition at line 86 of file clustering.hpp.

◆ labels

std::vector<std::size_t> statcpp::kmeans_result::labels

Cluster assignments.

Definition at line 84 of file clustering.hpp.

◆ n_iter

std::size_t statcpp::kmeans_result::n_iter

Number of iterations until convergence.

Definition at line 87 of file clustering.hpp.


The documentation for this struct was generated from the following file: