-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* The classification section has a primer of factors * The regression section is empty...
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
--- | ||
format: | ||
html: | ||
code-overflow: wrap | ||
execute: | ||
cache: true | ||
knitr: | ||
opts_chunk: | ||
comment: "#>" | ||
messages: true | ||
warning: false | ||
--- | ||
|
||
# Classification functions {.unnumbered} | ||
|
||
In this section all classification evaluation metrics are listed. | ||
In this section all available classification metrics and related documentation is described. Common for all classifcation functions is that they use the class `factor`. | ||
|
||
## A primer on factors | ||
|
||
Consider a classification problem with three classes: `A`, `B`, and `C`. The actual vector of `factor` values is defined as follows: | ||
|
||
```{r} | ||
## set seed | ||
set.seed(1903) | ||
## actual | ||
factor( | ||
x = sample(x = 1:3, size = 10, replace = TRUE), | ||
levels = c(1, 2, 3), | ||
labels = c("A", "B", "C") | ||
) | ||
``` | ||
|
||
Here, the values 1, 2, and 3 are mapped to `A`, `B`, and `C`, respectively. Now, suppose your model does not predict any `B`'s. The predicted vector of `factor` values would be defined as follows: | ||
|
||
```{r} | ||
## set seed | ||
set.seed(1903) | ||
## predicted | ||
factor( | ||
x = sample(x = c(1, 3), size = 10, replace = TRUE), | ||
levels = c(1, 2, 3), | ||
labels = c("A", "B", "C") | ||
) | ||
``` | ||
|
||
In both cases, $k = 3$, determined indirectly by the `levels` argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Regression functions {.unnumbered} | ||
|
||
In this section all regression evaluation metrics are listed. | ||
In this section all available regression metrics and related documentation is described. Common for all regression functions is that they use the class `numeric`. | ||
|