2
$\begingroup$

My thesis topic is about building a (deep) neural-network classifier to classify the type of a place. I am given both labels and some inputs in string type. So for example the label "Supermarket" might have a feature like "Food".

How should I feed my string input features to the neural network?

In other words, is there any efficient way to substitute those string inputs with numerical values knowing that there are A LOT of them?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

You always avoid feeding direct strings into neural networks. This thread here explains why you should avoid doing this : Neural Network parse string data?

Once you convert the strings you have into vectors or any other form of numerical representation and encoding your labels as categorical, it will solve the problem you have at hand.

If you need me to elaborate more on this, I would be more than happy to do so.

$\endgroup$
1
$\begingroup$

First thing that comes to my mind is one-hot encoding but if you say that you have so many different strings and if you want to capture the semantics within the encoding step you should consider word embeddings.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.