Class KMeans

    • Field Detail

      • input

        public TypedIOPort input
        The sequence of inputs to be classified.
      • clusters

        public TypedIOPort clusters
        Cluster indices for each element of the input.
      • clusterCenters

        public TypedIOPort clusterCenters
        Cluster centers.
      • numClusters

        public Parameter numClusters
        Number of clusters (k).
      • distanceMeasure

        public Parameter distanceMeasure
        Distance measure to be used in computation.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Description copied from class: NamedObj
        React to a change in an attribute. This method is called by a contained attribute when its value changes. In this base class, the method does nothing. In derived classes, this method may throw an exception, indicating that the new attribute value is invalid. It is up to the caller to restore the attribute to a valid value if an exception is thrown.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the change is not acceptable to this container (not thrown in this base class).
      • wrapup

        public void wrapup()
                    throws IllegalActionException
        Description copied from class: AtomicActor
        Do nothing except invoke the wrapup() methods of any objects that have been registered with addInitializable(). Derived classes override this method to define operations to be performed exactly once at the end of a complete execution of an application. It typically closes files, displays final results, etc.
        Specified by:
        wrapup in interface Initializable
        Overrides:
        wrapup in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - Not thrown in this base class.