What is sum encoding? I've heard sum encoding mentioned as a method of encoding categorical variables, but I haven't been able to find a clear explanation of what it actually is.
I found the following explanation on Towards DataScience:

Just like OneHot except one value is held constant and encoded as -1
across all columns.

But this confused me as it doesn't involve any summing.
Is it really just?:
Value      Variable 1. Variable 2. 
Red            1            0
Blue           0            1
Green         -1           -1
Sum encoding is similar to one-hot encoding but the difference is that in sum encoding we take one value as '-1' and it is not compared to other value. Whereas in one-hot encoding we create one column for each value to compare against all other values.
It is referred as sum encoding because the intercept represents the grand mean and the contrast estimate is the mean for level 1 minus the grand mean.
In one-hot encoding intercept represents the mean for the baseline condition and contrast estimate represents simple the difference between one particular condition and the baseline.