from core.clustering import KMeansAnalyzer


class ClusterService:
    def __init__(self):
        self.analyzer = KMeansAnalyzer()
    
    def get_cluster_result(self, n_clusters=3):
        return self.analyzer.get_cluster_results(n_clusters)
    
    def get_cluster_profile(self, n_clusters=3):
        return self.analyzer.get_cluster_profile(n_clusters)
    
    def get_scatter_data(self, n_clusters=3, x_axis='月均加班时长', y_axis='缺勤时长（小时）'):
        return self.analyzer.get_scatter_data(n_clusters, x_axis, y_axis)


cluster_service = ClusterService()
