Normalizace v r

Příklady kódu

4
0

normalizace v r

# creating a normalize function for easy convertion.
normalize <- function(x) {
return ((x - min(x)) / (max(x) - min(x))) } 

# lapply creates list that is why it is converted to dataframe and it
# applies defined fundtion (which is 'normalize') to all the list values
# which is here column 2 to 8 as first column is target/response.
df.norm<- as.data.frame(lapply(df, normalize)) 

Související stránky

Související stránky s příklady

V jiných jazycích

Tato stránka je v jiných jazycích

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................