Skip to content

Commit 907ea08

Browse files
new dataset : dermatology
1 parent 4dc9e0b commit 907ea08

File tree

4 files changed

+144
-0
lines changed

4 files changed

+144
-0
lines changed

R/data.R

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,50 @@
4040
#' }
4141
#' @source {KOKLU, M., SARIGIL, S. and OZBEK, O. (2021). The use of machine learning methods in classification of pumpkin seeds (Cucurbita pepo L.). Genetic Resources and Crop Evolution, 68(7), 2713-2726. doi:10.1007/s10722-021-01226-0}
4242
"pumpkins"
43+
44+
#' Dermatology Dataset
45+
#'
46+
#' 34 attributes are studied on 366 patients to determine the type of Eryhemato-Squamous Disease.
47+
#' 12 attributes are the clinical attributes and 22 attributes are the Histopathological attributes.
48+
#'
49+
#' @format A data frame with 35 variables and 366 observations:
50+
#' \describe{
51+
#' \item{\code{erythema}}{Clinical attributes: erythema}
52+
#' \item{\code{scaling}}{Clinical attribute: scaling}
53+
#' \item{\code{definite_borders}}{Clinical attribute: definite borders}
54+
#' \item{\code{itching}}{Clinical attribute: itching}
55+
#' \item{\code{koebner_phenomenon}}{Clinical attribute: koebner phenomenon}
56+
#' \item{\code{polygonal_papules}}{Clinical attribute: polygonal papules}
57+
#' \item{\code{follicular_papules}}{Clinical attribute: follicular papules}
58+
#' \item{\code{oral_mucosal_involvement}}{Clinical attribute: oral mucosal involvement}
59+
#' \item{\code{knee_elbow_involvement}}{Clinical attribute: knee and elbow involvement}
60+
#' \item{\code{scalp_involvement}}{Clinical attribute: scalp involvement}
61+
#' \item{\code{family_history}}{Clinical attribute: family history}
62+
#' \item{\code{melanin_incontinence}}{Histopathological attribute: melanin incontinence}
63+
#' \item{\code{eosinophils_infiltrate}}{Histopathological attribute: eosinophils in the infiltrate}
64+
#' \item{\code{pnl_infiltrate}}{Histopathological attribute: PNL infiltrate}
65+
#' \item{\code{fibrosis_papillary_dermis}}{Histopathological attribute: fibrosis of the papillary dermis}
66+
#' \item{\code{exocytosis}}{Histopathological attribute: exocytosis}
67+
#' \item{\code{acanthosis}}{Histopathological attribute: acanthosis}
68+
#' \item{\code{hyperkeratosis}}{Histopathological attribute: hyperkeratosis}
69+
#' \item{\code{parakeratosis}}{Histopathological attribute: parakeratosis}
70+
#' \item{\code{clubbing_rete_ridges}}{Histopathological attribute: clubbing of the rete ridges}
71+
#' \item{\code{elongation_rete_ridges}}{Histopathological attribute: elongation of the rete ridges}
72+
#' \item{\code{thinning_suprapapillary_epidermis}}{Histopathological attribute: thinning of the suprapapillary epidermis}
73+
#' \item{\code{spongiform_pustule}}{Histopathological attribute: spongiform pustule}
74+
#' \item{\code{munro_microabcess}}{Histopathological attribute: munro microabcess}
75+
#' \item{\code{focal_hypergranulosis}}{Histopathological attribute: focal hypergranulosis}
76+
#' \item{\code{disappearance_granular_layer}}{Histopathological attribute: disappearance of the granular layer}
77+
#' \item{\code{vacuolisation_damage_basal_layer}}{Histopathological attribute: vacuolisation and damage of basal layer}
78+
#' \item{\code{spongiosis}}{Histopathological attribute: spongiosis}
79+
#' \item{\code{saw_tooth_appearance_retes}}{Histopathological attribute: saw-tooth appearance of retes}
80+
#' \item{\code{follicular_horn_plug}}{Histopathological attribute: follicular horn plug}
81+
#' \item{\code{perifollicular_parakeratosis}}{Histopathological attribute: perifollicular parakeratosis}
82+
#' \item{\code{inflammatory_monoluclear_inflitrate}}{Histopathological attribute: inflammatory monoluclear inflitrate}
83+
#' \item{\code{band_like_infiltrate}}{Histopathological attribute: band-like infiltrate}
84+
#' \item{\code{age}}{Histopathological attribute: age}
85+
#' \item{\code{class}}{A **factor** with six levels: psoriasis, seboreic dermatitis, lichen planus, pityriasis rosea, cronic dermatitis, pityriasis rubra pilaris.}
86+
#'}
87+
#'
88+
#' @source {Ilter, Nilsel & Guvenir, H.. (1998). Dermatology. UCI Machine Learning Repository.}
89+
"dermatology"

data-raw/dermatology.R

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# dermatology
2+
# citation : Ilter, Nilsel & Guvenir, H.. (1998). Dermatology. UCI Machine Learning Repository.
3+
# url for dataset
4+
# https://archive.ics.uci.edu/ml/machine-learning-databases/dermatology/
5+
# Dataset : https://archive.ics.uci.edu/ml/machine-learning-databases/dermatology/dermatology.data
6+
# Dictionnary : https://archive.ics.uci.edu/ml/machine-learning-databases/dermatology/dermatology.names
7+
derma <- read.table("https://archive.ics.uci.edu/ml/machine-learning-databases/dermatology/dermatology.data", sep = ",")
8+
9+
# names of variables ----
10+
vars <- c(
11+
"erythema", "scaling", "definite_borders",
12+
"itching", "koebner_phenomenon", "polygonal_papules",
13+
"follicular_papules", "oral_mucosal_involvement", "knee_elbow_involvement",
14+
"scalp_involvement", "family_history", "melanin_incontinence",
15+
"eosinophils_infiltrate", "pnl_infiltrate", "fibrosis_papillary_dermis",
16+
"exocytosis", "acanthosis", "hyperkeratosis",
17+
"parakeratosis", "clubbing_rete_ridges", "elongation_rete_ridges",
18+
"thinning_suprapapillary_epidermis", "spongiform_pustule", "munro_microabcess",
19+
"focal_hypergranulosis", "disappearance_granular_layer", "vacuolisation_damage_basal_layer",
20+
"spongiosis", "saw_tooth_appearance_retes", "follicular_horn_plug",
21+
"perifollicular_parakeratosis", "inflammatory_monoluclear_inflitrate", "band_like_infiltrate",
22+
"age", "class")
23+
24+
names(derma) <- vars
25+
#derma <- janitor::clean_names(derma)
26+
# Rework variable
27+
derma$age[derma$age =="?"] <- NA
28+
29+
derma$class <- factor(derma$class, levels= 1:6, labels = c(
30+
"psoriasis", "seboreic dermatitis", "lichen planus",
31+
"pityriasis rosea", "cronic dermatitis", "pityriasis rubra pilaris")
32+
)
33+
34+
dermatology <- derma
35+
# write data
36+
usethis::use_data(dermatology, overwrite = TRUE)

data/dermatology.rda

3.62 KB
Binary file not shown.

man/dermatology.Rd

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)