<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def xmeans(cls, initial_centers=None, kmax=20, tolerance=0.025, criterion=splitting_type.BAYESIAN_INFORMATION_CRITERION, ccore=False):
 """ Constructor of the x-means clustering.rst algorithm Note: The dimensions of the initial centers should be same as of the dataset. :param kmax: Maximum number of clusters that can be allocated. :param tolerance: Stop condition for each iteration: if maximum value of change of centers of clusters is less than tolerance than algorithm will stop processing :param criterion: Type of splitting creation. :param ccore: Defines should be CCORE (C++ pyclustering library) used instead of Python code or not. :return: returns the clustering.rst object """

        model = xmeans(None, initial_centers, kmax, tolerance, criterion, ccore)
        return cls(model)