Question
Which data transformation technique would be best for
converting categorical variables, such as “Gender” (Male, Female), into a format usable in machine learning models?Solution
One-hot encoding is a technique used to convert categorical variables into a numerical format, where each category is represented by a binary variable. For instance, in the “Gender” variable, one-hot encoding would create two binary columns: “Male” and “Female.” Each observation will have a value of 1 in one column and 0 in the other, making the data usable in machine learning algorithms that require numerical input. One-hot encoding prevents ordinal relationships from being falsely implied, ensuring accurate representation of non-numeric data in modeling. The other options are incorrect because: • Option 1 (normalization) scales data but is ineffective for categorical conversion. • Option 3 (logarithmic transformation) is used for continuous data to reduce skew, not categorical data. • Option 4 (binning) groups continuous data into categories rather than encoding existing categories. • Option 5 (polynomial transformation) applies to numerical features and is unrelated to categorical conversion.
- 60% of 180 – 30% of 60 = 15% of ?
√ (573 – 819 + 775) = ? ÷ 3
118 × 6 + 13 + 83 = ?
What will come in the place of question mark (?) in the given expression?
(70 × 8 ÷ 10) × 5 = ?
What should come in place of the question mark (?) in the following question?
2 – [6 – {3 + (–4 + 5 + 1) × 8} + 12] = ?
Simplify the following questions:
(11) 8.5 × (121) 5.5 ÷ (1331) 5.5 = (11) ?
...√225 + 27 × 10 + ? = 320
If (3 × 144 – 252 ÷ 14) ÷ 18 = √1024 – x, then find the value of ‘x’.
2/5 of 3/4 of 7/9 of 7200 = ?
672 ÷ 28 × 24 + 363 – 309 =?