Пример #1
0
        public ActionResult <Cluster> Get(bool useCache)
        {
            var blogs   = blogDataRepository.GetBlogData();
            var pearson = new PearsonCorrelationSimilarityAlgorithm();
            var hierarchicalClustering = new HierarchicalClustering(pearson, useCache);

            return(hierarchicalClustering.Cluster(blogs));
        }
        public ActionResult <IEnumerable <Centroid> > Get(int numberOfClusters, int numberOfIterations)
        {
            var blogs            = blogDataRepository.GetBlogData();
            var pearson          = new PearsonCorrelationSimilarityAlgorithm();
            var kMeansClustering = new KMeansClustering(pearson);

            return(kMeansClustering.Cluster(blogs, numberOfClusters, numberOfIterations).ToArray());
        }