3 ms·
What is the color scale for the connection weight strength?
by aswanson 14y ago
What is the color scale for the connection weight strength?
- c-oreills 14y agoFrom github: (defn weight-colour ([^double weight] (Color. (clamp-colour-value (Math/tanh (- weight))) (clamp-colour-value (Math/tanh weight)) 0.0))) So when weight is 0, it's black. As the weight gets more positive, the colour gets greener, and as the weight gets more negative, the colour gets redder. clamp-colour-value makes sure the colour component doesn't go outside the interval (0,1) tanh curve shown here: http://upload.wikimedia.org/wikipedia/commons/7/76/Sinh_cosh_tanh.sv http://upload.wikimedia.org/wikipedia/commons/7/76/Sinh_cosh...