Open hikmatfarhat-ndu opened 1 year ago
The original investigation I have been doing has been with just the Binomial function. I discussed this with my supervisor on Friday and we agreed that a better way is needed. I have created a new function which generates an array with Np 1s and N(1-p) 0s and then just shuffles the array. This is found in StochasticPerceptron/Neuron.py and is the function bitstream_generator_exact. This approach vastly improves the level of noise at short bitstream lengths (e.g. 16 - 64 bits).
I ran BitInput.py but the output doesn't correspond to what you have told me. For example, for x1=[0.25,0.35,0.5] I would expect 4 ones for 0.25, about 5 for 0.35 and 8 ones for 0.5. Instead, I get different values each time ( sampling from the binomial distribution??). In any case, please specify exactly what is the EXPECTED output. In other words, if your model learned perfectly what should be the output.