It starts with comparing the number of wins from that general to a replacement general in the same circumstances.
The real power is ranking the general's WAR score, the aforementioned Wins Above Replacement.
For each battle, the general receives a weighted WAR score, a negative score for a loss.
There were some surprises in the model, like the apparent failures of generals like Robert E. Lee and more modern generals.
To see every general's data point and where they sit in the analysis, check out the Bokeh Plot, an interactive data visualization.