Modified to track sample variance for proper calculation of explained_variance_ratio