Beispiel #1
0
        public IActionResult Index()
        {
            var            kmeans       = new KmeansAlgo();
            List <Product> topProductds = kmeans.distans();

            ViewBag.TopProducts = topProductds;
            return(View());
        }
Beispiel #2
0
        public IActionResult ProductsLabels()
        {
            KmeansAlgo      kmeans    = new KmeansAlgo();
            KmeansViewModel viewModel = new KmeansViewModel
            {
                labels      = kmeans.k_means2(),
                topproducts = kmeans.distans()
            };

            return(View(viewModel));
        }