adding a model validation / accuracy function to test the current algorithm in-sample