# How can I calculate the parameter $w$ in the third condition of LVQ 2.1 algorithm?

I'm developing a neural network software using several NN architectures including LVQ family. I met a parameter that is used in the 3rd condition of LVQ2 and later versions. It's named $$w$$ and is used to calculate whether the input vector falls in the $$w$$-length window gap or not. For example, for LVQ 2.1 it's used to calculate the 3rd condition as follows:

$$$$\min(d_{i}/d_{j},d_{j}/d_{i})>\frac{1-w}{1+w},0

where

• $$d_{i}$$ is the minimum Euclidean distance from input vector (1st winner neuron's distance)
• $$d_{j}$$ is the 2nd minimum Euclidean distance from input vector (2nd winner neuron's distance)

This parameter $$w$$ is a user-determined one like learning rate or momentum, etc. I give the value of $$w$$ to training algorithm manually but this is a trial and error style. During my research, I found an information about this parameter may be calculated via training samples count.

Are there any information about how to calculate this parameter by training samples count or something else like represented training samples count to the network?