for test_sample in range(len(X_test)):
    prediction, bias, contributions = ti.predict(model, X_test[test_sample]
        .reshape(1, 4))
print('Class Prediction', prediction)
print('Bias (trainset prior)', bias)
for c, feature in zip(contributions[0], iris.feature_names):
    print(feature, c)
print('\n')
Using scikit to determine contributions of each feature to a specific class prediction