Search code examples
phpneural-networkfann

How to ignore specific inputs for some outputs?


I am trying to implement a neural network with "PHP wrapper for FANN" library. As inputs I have 10 sensors which return different float and integer values (for example, presence detector returns 1/0, light sensor returns 0-1000, temperature sensor returns 15.0-30.0). As outputs I need to get a probabilities of 5 states (is there somebody in a room, is it too hot in the room, etc.).

I created train data like:

1 10 5
57 740.02 25.9 95 0.09 747 21.1 5.4 0 42.17
1 0 1 1 0
...

It looks like the neural network analyzes all input values for all output results. Is it possible to specify which value to analyze and which to ignore for a specific output? For example do not consider temperature value to calculate probability of somebody's presence in a room?


Solution

  • "Is it possible to specify which value to analyze and which to ignore for a specific output?"

    No. Options:

    • Train the network to let FANN figure this out itself.
      • Increased complexity (usually) requires extra hidden layer(s).
      • A sparse network (as opposed to default/fully connected network) makes it easier during training to discard relations entirely (which would be represented by low-value connections in a fully connected network otherwise).
    • Cascade train on a shortcut network to let FANN figure out most successful network topology and parameters entirely.
    • Create separate networks for each classification task using relevant input/output only.

    More information (PHP binding for FANN manual doesn't include enough information to understand how FANN works).