@leroc Odd, it was correct enough for me to write a machine learning implementation myself while playing around with the concepts. Does the one you wrote work differently?