Main Content

reset

Reset incremental dynamic k-means clustering model

Since R2025a

    Description

    Mdl = reset(Mdl) returns the incrementalDynamicKMeans model Mdl with reset k-means clustering properties. The function resets these properties:

    • IsWarm to false

    • NumClusters and NumDynamicClusters to their initial values after object creation

    • Centroids and DynamicCentroids to their initial sizes after object creation, and their values to NaN

    • ClusterCounts and DynamicClusterCounts to their initial sizes after object creation, and their values to 0

    • NumTrainingObservations to 0

    • Metrics and DynamicMetrics to NaN

    reset preserves the NumPredictors, NumAdditionalClusters, EstimationPeriod, and WarmupPeriod properties of Mdl. However, if WarmupPeriod is 0, the reset function resets WarmupPeriod to the default value of 1000.

    example

    Examples

    collapse all

    Load the ionosphere data set.

    load ionosphere.mat

    Create an incremental dynamic k-means clustering model object Mdl with two clusters, and fit the model to the ionosphere data.

    Mdl = incrementalDynamicKMeans(NumClusters=2);
    Mdl = fit(Mdl,X);

    Display the property values of the fitted model.

    details(Mdl)
      incrementalDynamicKMeans with properties:
    
          NumAdditionalClusters: 10
                  MergeClusters: 0
                 MaxNumClusters: Inf
            GrowthPenaltyFactor: 10
               DynamicCentroids: [13×34 double]
           DynamicClusterCounts: [13×1 double]
             NumDynamicClusters: 13
                 DynamicMetrics: [1×2 table]
                             Mu: []
                          Sigma: []
               EstimationPeriod: 0
                      Centroids: [13×34 double]
                  ClusterCounts: [13×1 double]
                       Distance: "sqeuclidean"
               ForgettingFactor: 0.0500
                    NumClusters: 13
                         IsWarm: 0
        NumTrainingObservations: 351
                  NumPredictors: 34
                   WarmupPeriod: 1000
                        Metrics: [1×2 table]
              MetricsWindowSize: 200
    
      Methods, Superclasses
    

    Reset the model by calling the reset function.

    Mdl = reset(Mdl);

    Display the properties of the reset model.

    details(Mdl)
      incrementalDynamicKMeans with properties:
    
          NumAdditionalClusters: 10
                  MergeClusters: 0
                 MaxNumClusters: Inf
            GrowthPenaltyFactor: 10
               DynamicCentroids: [11×34 double]
           DynamicClusterCounts: [11×1 double]
             NumDynamicClusters: 11
                 DynamicMetrics: [1×2 table]
                             Mu: []
                          Sigma: []
               EstimationPeriod: 0
                      Centroids: [11×34 double]
                  ClusterCounts: [11×1 double]
                       Distance: "sqeuclidean"
               ForgettingFactor: 0.0500
                    NumClusters: 11
                         IsWarm: 0
        NumTrainingObservations: 0
                  NumPredictors: 34
                   WarmupPeriod: 1000
                        Metrics: [1×2 table]
              MetricsWindowSize: 200
    
      Methods, Superclasses
    

    The reset function resets the following properties of Mdl: IsWarm, NumClusters, NumDynamicClusters, Centroids, DynamicCentroids, ClusterCounts, DynamicClusterCounts, Metrics, DynamicMetrics, and NumTrainingObserations.

    Input Arguments

    collapse all

    Incremental dynamic k-means clustering model, specified as an incrementalDynamicKMeans model object. You can create Mdl by calling incrementalDynamicKMeans directly.

    Version History

    Introduced in R2025a