神经网络输入/输出

发布于 2024-07-30 06:03:04 字数 136 浏览 2 评论 0原文

谁能向我解释如何处理更复杂的数据集,例如团队统计数据、天气、骰子、复数类型

我理解所有数学以及一切如何工作我只是不知道如何输入更复杂的数据,然后如何读取数据它指出

如果有人可以提供 python 中的示例,这将是一个很大的帮助

Can anyone explain to me how to do more complex data sets like team stats, weather, dice, complex number types

i understand all the math and how everything works i just dont know how to input more complex data, and then how to read the data it spits out

if someone could provide examples in python that would be a big help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

凹づ凸ル 2024-08-06 06:03:04

您必须将输入和输出编码为可以由神经网络单元表示的内容。 (例如,如果单位范围在 [-1, 1] 内,则 1 表示“x 具有特定属性 p”,-1 表示“x 不具有属性 p”)对

输入进行编码的方式以及解码你的输出取决于你想要训练神经网络的目的。

此外,还有许多针对不同任务的“神经网络”算法和学习规则(反向传播、玻尔兹曼机、自组织映射)。

You have to encode your input and your output to something that can be represented by the neural network units. ( for example 1 for "x has a certain property p" -1 for "x doesn't have the property p" if your units' range is in [-1, 1])

The way you encode your input and the way you decode your output depends on what you want to train the neural network for.

Moreover, there are many "neural networks" algoritms and learning rules for different tasks( Back propagation, boltzman machines, self organizing maps).

掩耳倾听 2024-08-06 06:03:04

您的特征必须分解为可以表示为实数的部分。 神经网络的神奇之处在于它是一个黑匣子,在训练过程中将建立正确的关联(使用内部权重)


输入

选择准确描述情况所需的尽可能少的特征,然后分解每个特征转化为一组实数值。

  • 天气:[今天的温度、今天的湿度、昨天的温度、昨天的湿度...] 今天的温度和今天的湿度之间的关联是内部建立的
  • 团队统计数据:[平均身高、平均体重、最大身高、顶部分数,...]
  • 骰子:不确定我是否理解这个,您的意思是如何编码离散值?*
  • 复数:[a,ai,b,< em>bi,...]

* 离散值特征很棘手,但仍然可以编码为 (0.0,1.0)。 问题是他们不提供学习阈值的梯度。


输出

您决定输出的含义,然后以该格式对训练示例进行编码。 输出值越少,训练就越容易。

  • 天气:[明天下雨的机会,明天的气温,...] **
  • 球队统计数据:[获胜机会,获胜机会超过 20,...]
  • 复数:[x,xi,...]

** 这里你的训练向量将是:如果第二天下雨,则为 1.0;如果没有,则为 0.0


当然,无论问题是否实际上可以通过神经网络是另一个问题。

Your features must be decomposed into parts that can be represented as real numbers. The magic of a Neural Net is it's a black box, the correct associations will be made (with internal weights) during the training


Inputs

Choose as few features as are needed to accurately describe the situation, then decompose each into a set of real valued numbers.

  • Weather: [temp today, humidity today, temp yesterday, humidity yesterday...] the association between today's temp and today's humidity is made internally
  • Team stats: [ave height, ave weight, max height, top score,...]
  • Dice: not sure I understand this one, do you mean how to encode discrete values?*
  • Complex number: [a,ai,b,bi,...]

* Discrete valued features are tricky, but can still still be encoded as (0.0,1.0). The problem is they don't provide a gradient to learn the threshold on.


Outputs

You decide what you want the output to mean, and then encode your training examples in that format. The fewer output values, the easier to train.

  • Weather: [tomorrow's chance of rain, tomorrow's temp,...] **
  • Team stats: [chance of winning, chance of winning by more than 20,...]
  • Complex number: [x,xi,...]

** Here your training vectors would be: 1.0 if it rained the next day, 0.0 if it didn't


Of course, whether or not the problem can actually be modeled by a neural net is a different question.

猫腻 2024-08-06 06:03:04

更复杂的数据通常意味着在输入层和输出层中添加更多神经元。

您可以将寄存器的每个“字段”提供给每个输入神经元,将其正确编码为实际值(标准化等),或者您甚至可以进一步分解为位字段,将 1 或 0 的饱和输入分配给神经元...对于输出,这取决于你如何训练神经网络,它会尝试模仿训练集的输出。

More complex data usually means adding more neurons in the input and output layers.

You can feed each "field" of your register, properly encoded as a real value (normalized, etc.) to each input neuron, or maybe you can even decompose even further into bit fields, assigning saturated inputs of 1 or 0 to the neurons... for the output, it depends on how you train the neural network, it will try to mimic the training set outputs.

土豪 2024-08-06 06:03:04

您必须添加问题所需的输入和输出单位数。 如果要近似的未知函数取决于n参数,则您将有n个输入单元。 输出单元的数量取决于函数的性质。 对于具有 n 个实参数的实函数,您将有一个输出单元。

有些问题,例如在预测时间序列时,函数的 m 个连续值将有 m 个输出单位。 编码很重要并且取决于所选择的算法。 例如,在前馈网络的反向传播中,如果可能的话,最好在离散输入中转换更多数量的特征,就像分类任务一样。

编码的另一个方面是,您必须根据数据量来评估输入和隐藏单元的数量。 由于过程维数问题,与数据相关的太多单元可能会给出较差的近似值。 在某些情况下,您可能会以某种方式聚合一些输入数据以避免该问题或使用某种缩减机制(如 PCA)。

You have to add the number of units for input and output you need for the problem. If the unknown function to approximate depends on n parameter, you will have n input units. The number of output units depends on the nature of the funcion. For real functions with n real parameters you will have one output unit.

Some problems, for example in forecasting of time series, you will have m output units for the m succesive values of the function. The encoding is important and depends on the choosen algorithm. For example, in backpropagation for feedforward nets, is better to transform, if possible, the greater number of features in discrete inputs, as for classification tasks.

Other aspect of the encoding is that you have to evaluate the number of input and hidden units in function of the amount of data. Too many units related to data may give poor approximation due the course ff dimensionality problem. In some cases, you may to aggregate some of the input data in some way to avoid that problem or use some reduction mechanism as PCA.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文