Sync portfolio laboratory source

This commit is contained in:
portfolio 2026-11-26 13:13:26 +03:00
commit 5ef4287091
5 changed files with 86 additions and 0 deletions

40
dashboard.qmd Normal file
View file

@ -0,0 +1,40 @@
---
title: "Кластеризация K-means"
lang: ru
format: dashboard
execute:
echo: false
---
```{r}
source("analysis.R", local = TRUE)
```
# Результаты
## Row
### График
```{r}
x <- result$k
y <- result$within_ss
if (is.numeric(x)) {
plot(x, y, xlab = "k", ylab = "within_ss", pch = 19, col = "#245d76")
} else {
par(mar = c(7, 4, 2, 1))
barplot(y, names.arg = x, ylab = "within_ss", las = 2, col = "#245d76")
}
```
### Таблица
```{r}
knitr::kable(result, digits = 3)
```
## Row
### Как читать результат
K-means минимизирует сумму квадратов евклидовых расстояний до центров. Масштабирование делает вклад координат сопоставимым. Метод локтя помогает выбрать k.