Mjob
at_home
,
Mjob
health
, or
Mjob
. These new columns, for example, the
Mjob at_home
column will have
value
1
and the rest will have
0
. This means only one of the new columns generated will
have one.
This is know as
one-hot encoding
. The reason this name was given is for example, imagine
some wires going into a circuit. Suppose in the circuit there are five wires, and you want
use one-hot encoding method, you need to activate only one of these wires while keeping
the rest of wires off.
On performing
HFU@EVNNJFT
function on our dataset, You can notice for example
activities_no
and
activities_yes
columns. The originally associated columns that said no
had 1 as value under
activies_no
column followed by 0. The same as for
activities_yes
had
yes it would have a value 0 followed by 1 for others. This led to creation of many more new
columns around 57 in total but this made our dataset full of numeric data. The following
screenshot shows the columns
Do'stlaringiz bilan baham: |