In what circumstances does the RMSE formula have a $k$ in the denominator?
StackOverflow's What does RMS stand for? shows this formula for RMSE:
$$RMSE=\sqrt{\frac1{n-k}\sum_i(y_i-\hat{y}_i)^2}$$
But most other sources don't have the "k" For example, https://www.statisticshowto.datasciencecentral.com/rmse/ or http://statweb.stanford.edu/~susan/courses/s60/split/node60.html
$$RMSE=\sqrt{\frac{\sum_{i=1}^n(\hat{y}_i-y_i)^2}{n}}$$