フィルターのクリア

Training a Neural Network

1 回表示 (過去 30 日間)
Benjamin Currie
Benjamin Currie 2021 年 3 月 18 日
回答済み: Seth Furman 2021 年 3 月 18 日
Is it possible to use string data to train a NN? I am trying to use 'labels' obtained from a previous network that labels an image. I want to use this data to predict the image. When I am using th is data it is stating it has to be a numerical/logical value.
  1 件のコメント
Olof Engström
Olof Engström 2021 年 3 月 18 日
Neural networks can only take numbers as input, so you have to convert your text features to numerical features. If the 'labels' are categorical you could for example use one-hot encoding. There are also more advanced text embeddings where semantically similar texts are encoded into similar (numerical) vector representations (for example word2vec).

サインインしてコメントする。

回答 (1 件)

Seth Furman
Seth Furman 2021 年 3 月 18 日
To add to Olof's answer, the categorical type allows you to efficiently represent a finite set of discrete categories that you might otherwise represent with strings.
Take a look at the following example from the documentation demonstrating how to make predictions using categorical features.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by