Question

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

Was it helpful?

Solution

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).

OTHER TIPS

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.

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top