I have 5 inputs and 1 output for my ANN problem. Among the 5 inputs are 2 "text". One is name of manufacturer (3 unique) and the other is specimen exposure type (acid, alkaline, alkaline+salt, water). How should these text type input be modified to train the model?
Neeta Dsouza answered .
2025-11-20
exposure_types = {'acid', 'alkaline', 'alkaline+salt', 'water'};
and input data is something like this
inputs = {'acid', 'acid', 'acid', 'water', 'alkaline', 'acid', 'alkaline+salt'}
you can get an equivalent numeric form using ismember()
[~, inputs_numeric] = ismember(inputs, exposure_types);<?pre>
Result
>> inputs_numeric
inputs_numeric =
1 1 1 4 2 1 3