<p>You could use character-level embeddings (i.e. your input classes are the different characters, so 'a' is class 1, 'b' is class 2 etc..). One-hot encoding the classes and then passing them through an embedding layer will yield unique representations for each character. A string can then be treated as a character-sequence (or equally a vector-sequence), which can be used as an input for either a recurrent or convolutional network. If you feel like reading, this <a href="https://arxiv.org/abs/1508.06615" rel="nofollow noreferrer">paper</a> by Kim et al. will provide you all the necessary theoretical backbone.</p>
what are the best methods to classify the user gender based on names?
<p>If you check my <a href="https://github.com/raady07" rel="nofollow noreferrer">github</a>, I have successfully implemented CNN, KNN for classifying signal faults. For that, I have taken the signal with little preprocessing for dimensionality reduction and provided it to the network, using its class information I trained the network, later the trained network is tested with testing samples to determine the class and computed the accuracy.</p>
<p>My question here how do I input the text information to CNN or any other network. For inputs, I took the Twitter database from kaggle, I have selected 2 columns which have names and gender information. I have gone through some algorithms which classify gender based on their blog data. I wasn't clear how I implement to my data (In my case, if I just want to classify using only names alone).</p>
<p>In some examples, which I understood I saw computing sparse matrix for the text, but for 20,000 samples the sparse matrix is huge to give as input. I have no problem in implementing the CNN architectures(I want to implement because no features are required) or any other network.  I am stuck here, how to input data to the network. What kind of conversations can I make so that I take the names and gender information can be considered to train the network?</p>
<p>If my method of thinking is wrong please provide me suggestion which algorithm is the best way. Deep learning or any other methods are ok!</p>