pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
pyclustering.cluster.center_initializer.random_center_initializer Class Reference

Random center initializer is for generation specified amount of random of centers for specified data. More...

Public Member Functions

def __init__ (self, data, amount_centers, **kwargs)
 Creates instance of random center initializer. More...
 
def initialize (self, **kwargs)
 Generates random centers in line with input parameters. More...
 

Detailed Description

Random center initializer is for generation specified amount of random of centers for specified data.

Definition at line 21 of file center_initializer.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.cluster.center_initializer.random_center_initializer.__init__ (   self,
  data,
  amount_centers,
**  kwargs 
)

Creates instance of random center initializer.

Parameters
[in]data(list): List of points where each point is represented by list of coordinates.
[in]amount_centers(unit): Amount of centers that should be initialized.
[in]**kwargsArbitrary keyword arguments (available arguments: 'random_state').

Keyword Args:

  • random_state (int): Seed for random state (by default is None, current system time is used).

Definition at line 27 of file center_initializer.py.

Member Function Documentation

◆ initialize()

def pyclustering.cluster.center_initializer.random_center_initializer.initialize (   self,
**  kwargs 
)

Generates random centers in line with input parameters.

Parameters
[in]**kwargsArbitrary keyword arguments (available arguments: 'return_index').

Keyword Args:

  • return_index (bool): If True then returns indexes of points from input data instead of points itself.
Returns
(list) List of initialized initial centers. If argument 'return_index' is False then returns list of points. If argument 'return_index' is True then returns list of indexes.

Definition at line 53 of file center_initializer.py.


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