使用 keras 框架构建的 ANN 的输入值(使用 theano)
Input values of an ANN constructed with keras framework (using theano)
我想构建一个神经网络,它将根据我创建的数据进行训练。我的问题是 这些数据应该采用什么形式? 换句话说,keras 是否允许将 strings/characters 作为输入的神经网络?如果不是,并且只能接受 input/output 应该在什么范围内的数字?
输入数据(即特征)的唯一条件是它应该是数字。范围实际上没有任何限制,但做 Feature Scaling, Normalization etc to make sure that our model won't get confused. Neural Networks or other machine learning methods cannot accept string (characters, words) directly, therefore, you need to first convert string to numbers. There are many ways to do that, most common techniques include Bag of Words, tf-idf features, word embeddings 等总是一个好主意。
遵循教程(使用 scikit)可能是一个很好的起点:
我想构建一个神经网络,它将根据我创建的数据进行训练。我的问题是 这些数据应该采用什么形式? 换句话说,keras 是否允许将 strings/characters 作为输入的神经网络?如果不是,并且只能接受 input/output 应该在什么范围内的数字?
输入数据(即特征)的唯一条件是它应该是数字。范围实际上没有任何限制,但做 Feature Scaling, Normalization etc to make sure that our model won't get confused. Neural Networks or other machine learning methods cannot accept string (characters, words) directly, therefore, you need to first convert string to numbers. There are many ways to do that, most common techniques include Bag of Words, tf-idf features, word embeddings 等总是一个好主意。 遵循教程(使用 scikit)可能是一个很好的起点: