0

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?

user4157124
  • 2,809
  • 13
  • 27
  • 42
BArtWell
  • 4,176
  • 10
  • 63
  • 106

1 Answers1

0

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

user4157124
  • 2,809
  • 13
  • 27
  • 42
  • Can you please to clarify few things? 1. Did you mean that the extra hidden layer will looks like a condition to include some values to analysys or not? 2. Create separate networks means create separate train configs, right? – BArtWell Jul 16 '23 at 09:07
  • 1
    @BArtWell 1. There's an input and output layer. Layers in between are hidden layers. How many are required depends on complexity of relations between input and output (and amount of neurons per hidden layer). Create a network with 0 hidden layers, then a network with 1 hidden layer of 10 neurons, then 2 hidden layers with 10 neurons each and finally a network with 2 hidden layers with 10 neurons in the first and 5 in de second hidden layer. Epochs required during training each one roughly indicates what to change for FANN to model this task (more/less layers/neurons). – user4157124 Jul 16 '23 at 12:27
  • 1
    Layers are no conditions; weights attributed to connections between neurons during training (how they're connected) determines how output relates to (combinations of) input values. Traditional feed-forward artificial neural networks are a black box (no strong rules about what topology and settings work better). 2. Yes. But there's a good chance data from question fits in one of these three models as is and training figures out itself what to ignore (if training data contains much more than one set of input/output of course). – user4157124 Jul 16 '23 at 12:27
  • 'But there's a good chance data from question fits in one of these three models as is...' > I am tried with set with 150 records and it was unsuccessul... So it looks to split it manually is a good idea. Thank you. – BArtWell Jul 16 '23 at 14:14
  • @BArtWell A common pitfall in training on sensor readings is unbalanced data; failing to include (enough) readings that *don't* signify a positive for example. Training what not to consider is the only way to keep it from assuming [causation from unintended correlation](https://jotterbach.github.io/content/posts/causal_noncausal_learning/2015-12-13-Causal_vs_Noncausal_Learning/) (training data should be sufficiently diverse on all inputs for both positive and negative outputs). – user4157124 Jul 30 '23 at 00:50