![]() ![]() Since biases are equal for both datasets (because the training data for the model was the same), the difference between the average predicted values has to come only from feature contributions. Totalc2 = np.mean(contributions2, axis=0) Totalc1 = np.mean(contributions1, axis=0) We can now calculate the mean contribution of each feature to the difference. Prediction2, bias2, contributions2 = ti.predict(rf, ds2) Prediction1, bias1, contributions1 = ti.predict(rf, ds1) ![]() We can now trivially break down the contributors to this difference: which features contribute to this different and by how much. We can see that the average predicted prices for the houses in the two datasets are quite different.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |