I keep getting an error in gains telling me that the actual and predicted vectors are not of equal length. Below you will see that I ran length() for each vector and they ar