casshare.blogg.se

Ordinal encoding in r
Ordinal encoding in r








These patterns may be illusional and false.Īnother example (internet connection type): DSL But I saw a lecture on youtube where it is been said not to encode features ordinally just because you see some ascending or descending patterns. Metal more expensive than Wood and so on. Simply Armored more expensive than Metal. Not clear.įrom my perspective this data can be ordered and encoded ordinally as 1,2,3,4. Let us look at the example: Strongly AgreeĪuthor decided to encode them ordinally. That features' nature is not instantly noticeable and to some extent can be attributed to ordinal data and categorical data at the same time. Also it is clear that such categorical feature as condition with possible values of 'old', 'renovated', 'new' can be ordered and encoded as 1, 2, 3 respectively.īut I am not sure how to encode not quite obvious features. I know that such categorical features as color, gender, district, nationality clearly must be coded using dummy coding. I am hesitant on what encoding method to use: one-hot encoding (used for categorical) or just ordinal mapping (for ordinal data). Some features are categorical and I am confused on how to treat them when encoding to numeric format. Some of them are clearly ordinal (for example year, number of rooms, storey). I am doing linear regression analysis on data concerned with houses.










Ordinal encoding in r