Answers.Body: <blockquote>
  <p>I don't understand why they say with <span class="math-container">$P$</span> bits, there's <span class="math-container">$2*P$</span> combinations, wouldn't it be <span class="math-container">$2^P$</span>?</p>
  </blockquote>
  <p>I think you are correct here, and would suspect a typesetting issue or typo. I also think that 2Q should be <span class="math-container">$2^Q$</span> in the same paragraph.</p>
  <blockquote>
  <p>Also, I can't grasp how they decoded the 15 bits into the net for the weight generation.</p>
  </blockquote>
  <p>Without anything in the paper or associated materials, I don't think it is possible to be sure.</p>
  <blockquote>
  <p>What I thought to do was to transform the 15 bits into a decimal number and use it as a specific seed for rand and randn function in Matlab, through which I make random initial weights.</p>
  </blockquote>
  <p>This could work, although it will make the GA search over those 15 bits dependent on all the bits at once, due to the nature of PRNG seeds. Any crossover or mutation would destroy any coherence between generations. Perhaps that is not important, although it then does seem strange to dedicate the majority of the genome to it.</p>
  <p>The title and description does imply that the GA is mainly being used to set start conditions for training the network, so values of P might not be very important, in which case it would mainly be used to avoid risk of poor initialisation missing the best architecture.</p>
  <p>However, P could also be an encoded  <em>multiplier</em> for initial randomly sampled weights, in which case the search should find stable values for the most significant digits of P. That would be similar to how Q is used (as an encoded number).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-19T09:48:01.477Z
Answers.Text: Hello, thank you for your answer. I'd like to elaborate more on the solution you proposed: when you say encoded multiplier, what exactly are you suggesting? Because I already transformed the 15 bits into the actual decimal number. What should I multiply that for? Shouldn't all initial weights for both input-hidden and hidden-output layer be different?
Answers.UserDisplayName: JOSEPH CAROÈ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-19T13:08:31.800Z
Answers.Text: @JOSEPHCAROÈ I mean use it to multiply all randomly generated weights. You might generate weights by sampling $\mathcal{N}(0,1)$ for each one, then multiply by `P/MAX_P`
Answers.UserDisplayName: Neil Slater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-19T14:30:04.573Z
Answers.Text: Okay so supposedly, with P = 15, MAX_P = (2^15 - 1) and P = the decimal number of the 15 P bits.
Answers.UserDisplayName: JOSEPH CAROÈ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-18T12:18:20.593Z
Answers.LastActivityDate: 2022-05-19T13:10:38.523Z
Answers.LastEditDate: 2022-05-19T13:10:38.523Z
Answers.UserDisplayName: Neil Slater
Body: <p>So I've been tasked by my neural network professor at university to replicate the following research: <a href="https://ieeexplore.ieee.org/document/6571334" rel="nofollow noreferrer">Intelligent Breast Cancer Diagnosis Using Hybrid GA-ANN</a>.</p>
  <p>Each chromosome represents a possible net, more specifically, a possible MLP network. They've used a binary convention, and have used <span class="math-container">$P = 15$</span> bits for the random initial weight generator, <span class="math-container">$Q=2$</span> bits for the number of nodes and <span class="math-container">$R = 9$</span> bits for feature selection.
  <a href="https://i.sstatic.net/YfC3T.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/YfC3T.png" alt="enter image description here" /></a></p>
  <blockquote>
  <p>P bits random initial weight generator allows 2P different
  combinations of the initial weight. The numbers of hidden
  nodes (i.e. represented by Q bits) permit the GA to explore
  up to a maximum of 2Q hidden nodes’ size. For the
  representation of the feature subset, the value of R is set to
  the number of full feature size. Value ‘1’ or ‘0’ indicates if
  the feature at that particular location is selected or otherwise.</p>
  </blockquote>
  <blockquote>
  <p>Decode each chromosome
  in the population to obtain the selected feature subset, hidden
  node size and random generator.</p>
  </blockquote>
  <p>I don't understand why they say with <span class="math-container">$P$</span> bits, there's <span class="math-container">$2*P$</span> combinations, wouldn't it be <span class="math-container">$2^P$</span>?
  Also, I can't grasp how they decoded the <span class="math-container">$15 P$</span> bits into the net for the weight generation. I've searched everywhere but I can't find anything specific. What I thought to do was to transform the <span class="math-container">$15$</span> bits into a decimal number and use it as a specific seed for rand and randn function in Matlab, through which I make random initial weights.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-18T08:42:16.267Z
Comments.Text: The paper's pdf doesn't seem to be freely available. So, it might be a good idea to quote the relevant section.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-18T11:51:51.387Z
Comments.Text: I did, hoping now it's more clear what my question is.
Comments.UserDisplayName: JOSEPH CAROÈ
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-23T13:43:12.863Z
Comments.Text: You can always try to email the authors. They are usually happy to have someone interested in their work.
Comments.UserDisplayName: emely_pi
Tags: <neural-networks><papers><genetic-algorithms><multilayer-perceptrons><weights-initialization>
Title: How to decode P bits that represent a random weight generator?
UserDisplayName: JOSEPH CAROÈ
ThreadText: # How to decode P bits that represent a random weight generator?
  
  (Asked by: username_0 on 2022-05-17)
  
  So I've been tasked by my neural network professor at university to replicate the following research: [Intelligent Breast Cancer Diagnosis Using Hybrid GA-ANN](https://ieeexplore.ieee.org/document/6571334).
  
  Each chromosome represents a possible net, more specifically, a possible MLP network. They've used a binary convention, and have used $P = 15$ bits for the random initial weight generator, $Q=2$ bits for the number of nodes and $R = 9$ bits for feature selection.
  [![enter image description here](https://i.sstatic.net/YfC3T.png)](https://i.sstatic.net/YfC3T.png)
  
  > P bits random initial weight generator allows 2P different
  > combinations of the initial weight. The numbers of hidden
  > nodes (i.e. represented by Q bits) permit the GA to explore
  > up to a maximum of 2Q hidden nodes’ size. For the
  > representation of the feature subset, the value of R is set to
  > the number of full feature size. Value ‘1’ or ‘0’ indicates if
  > the feature at that particular location is selected or otherwise.
  
  > Decode each chromosome
  > in the population to obtain the selected feature subset, hidden
  > node size and random generator.
  
  I don't understand why they say with $P$ bits, there's $2\*P$ combinations, wouldn't it be $2^P$?
  Also, I can't grasp how they decoded the $15 P$ bits into the net for the weight generation. I've searched everywhere but I can't find anything specific. What I thought to do was to transform the $15$ bits into a decimal number and use it as a specific seed for rand and randn function in Matlab, through which I make random initial weights.
  
  **Tags:** neural-networks, papers, genetic-algorithms, multilayer-perceptrons, weights-initialization
  
  > **Comments:**
  > **username_1**: The paper's pdf doesn't seem to be freely available. So, it might be a good idea to quote the relevant section.  
  > **username_0**: I did, hoping now it's more clear what my question is.  
  > **username_2**: You can always try to email the authors. They are usually happy to have someone interested in their work.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2022-05-18. Score: 0
  
  > I don't understand why they say with $P$ bits, there's $2\*P$ combinations, wouldn't it be $2^P$?
  
  I think you are correct here, and would suspect a typesetting issue or typo. I also think that 2Q should be $2^Q$ in the same paragraph.
  
  > Also, I can't grasp how they decoded the 15 bits into the net for the weight generation.
  
  Without anything in the paper or associated materials, I don't think it is possible to be sure.
  
  > What I thought to do was to transform the 15 bits into a decimal number and use it as a specific seed for rand and randn function in Matlab, through which I make random initial weights.
  
  This could work, although it will make the GA search over those 15 bits dependent on all the bits at once, due to the nature of PRNG seeds. Any crossover or mutation would destroy any coherence between generations. Perhaps that is not important, although it then does seem strange to dedicate the majority of the genome to it.
  
  The title and description does imply that the GA is mainly being used to set start conditions for training the network, so values of P might not be very important, in which case it would mainly be used to avoid risk of poor initialisation missing the best architecture.
  
  However, P could also be an encoded *multiplier* for initial randomly sampled weights, in which case the search should find stable values for the most significant digits of P. That would be similar to how Q is used (as an encoded number).
  
  > **Comments:**
  > **username_0**: Hello, thank you for your answer. I'd like to elaborate more on the solution you proposed: when you say encoded multiplier, what exactly are you suggesting? Because I already transformed the 15 bits into the actual decimal number. What should I multiply that for? Shouldn't all initial weights for both input-hidden and hidden-output layer be different?  
  > **username_3**: @username_0 I mean use it to multiply all randomly generated weights. You might generate weights by sampling $\mathcal{N}(0,1)$ for each one, then multiply by `P/MAX_P`  
  > **username_0**: Okay so supposedly, with P = 15, MAX_P = (2^15 - 1) and P = the decimal number of the 15 P bits.  
  
  ---
  
  