Sync portfolio laboratory source

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

40
dashboard.qmd Normal file
View file

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