Body: <p>I am trying to do classification using <a href="https://neat-python.readthedocs.io/en/latest/" rel="nofollow noreferrer">NEAT-python</a> for the first time, and I am having difficulty getting the accuracy rate. I tried the same problem with an ANN and was able to get a good accuracy rate (96%+), but NEAT-Python gives barely 40%. </p>
  
  <p>Here's how I set up:</p>
  
  <ul>
  <li><p><strong>Problem</strong>: Train 100 probability values to predict classification (1-10)</p></li>
  <li><p><strong>Input and output setup:</strong> inputs = number of input shape (100 values of prob), and output is 10 values of probability assoc with 10 classes. </p></li>
  <li><p><strong>Activation</strong>: I applied ReLU for feedforward, then applied
  softmax</p>
  
  <ul>
  <li><strong>Fitness function</strong>: I used the loglikelihood. I was unsure about how to set up the fitness function. I also used mean accuracy rate in the genome. Both gave similar results.</li>
  </ul></li>
  </ul>
  
  <p>In terms of hyperparameters, I am trying various values and haven't had any luck with it. Today I am trying with an increase in population size and generations. I have another feature input that can be used. </p>
  
  <p>Are there any resources that discuss how to handle mixed data for NEAT?</p>
  
  <p>Any help is greatly appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-09T23:45:39.493Z
Comments.Text: Hi and welcome to AI SE! What do you mean by "Train 100 probability values to predict classification"? Also, isn't NEAT used to find the hyper-parameters of neural networks? What exactly do you want to classify here?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-10T01:06:10.727Z
Comments.Text: Thank you @nbro  My input values are array of float values between 0 and 1.  yes, NEAT is used to optimize not only the weights but also the number of nodes and layers.  NEAT however has its own hyperparameters (more for GA) such as no of generations, no. of populations, mutation rate, etc.  I have 10 values  range from 0 and 9.  The input should predict one of the 10 values..  Multi label classification problem
Comments.UserDisplayName: Linkuz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-10T03:40:36.893Z
Comments.Text: Are you saying that you're using NEAT to evolve NNs that receive a certain array as input and needs to predict one or more labels for each input?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-10T17:17:50.967Z
Comments.Text: @nbro I am using NEAT to predict one label for each input
Comments.UserDisplayName: Linkuz
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-07T17:23:50.740Z
Comments.Text: Hi! @Linkuz I would suggest that you take a look into the paper https://papers.nips.cc/paper/2019/file/e98741479a7b998f88b8f8c9f0b6b6f1-Paper.pdf. There is a section about weight-agnostic classification in it using NEAT - maybe you can transfer some of that into your implementation?
Comments.UserDisplayName: Rohan Asokan
Tags: <python><genetic-algorithms><neat><fitness-functions>
Title: How to perform classification with NEAT-Python?
UserDisplayName: Linkuz
ThreadText: # How to perform classification with NEAT-Python?
  
  (Asked by: username_0 on 2020-04-09)
  
  I am trying to do classification using [NEAT-python](https://neat-python.readthedocs.io/en/latest/) for the first time, and I am having difficulty getting the accuracy rate. I tried the same problem with an ANN and was able to get a good accuracy rate (96%+), but NEAT-Python gives barely 40%.
  
  Here's how I set up:
  
  * **Problem**: Train 100 probability values to predict classification (1-10)
  * **Input and output setup:** inputs = number of input shape (100 values of prob), and output is 10 values of probability assoc with 10 classes.
  * **Activation**: I applied ReLU for feedforward, then applied
    softmax
  
    + **Fitness function**: I used the loglikelihood. I was unsure about how to set up the fitness function. I also used mean accuracy rate in the genome. Both gave similar results.
  
  In terms of hyperparameters, I am trying various values and haven't had any luck with it. Today I am trying with an increase in population size and generations. I have another feature input that can be used.
  
  Are there any resources that discuss how to handle mixed data for NEAT?
  
  Any help is greatly appreciated.
  
  **Tags:** python, genetic-algorithms, neat, fitness-functions
  > **Comments:**
  > **username_1**: Hi and welcome to AI SE! What do you mean by "Train 100 probability values to predict classification"? Also, isn't NEAT used to find the hyper-parameters of neural networks? What exactly do you want to classify here?  
  > **username_0**: Thank you @nbro  My input values are array of float values between 0 and 1.  yes, NEAT is used to optimize not only the weights but also the number of nodes and layers.  NEAT however has its own hyperparameters (more for GA) such as no of generations, no. of populations, mutation rate, etc.  I have 10 values  range from 0 and 9.  The input should predict one of the 10 values..  Multi label classification problem  
  > **username_1**: Are you saying that you're using NEAT to evolve NNs that receive a certain array as input and needs to predict one or more labels for each input?  
  > **username_0**: @nbro I am using NEAT to predict one label for each input  
  > **username_2**: Hi! @Linkuz I would suggest that you take a look into the paper https://papers.nips.cc/paper/2019/file/e98741479a7b998f88b8f8c9f0b6b6f1-Paper.pdf. There is a section about weight-agnostic classification in it using NEAT - maybe you can transfer some of that into your implementation?  
  
  ---
  
  ## 0 answers
  
  