Printing Feature Contributions in a Random Forest algorithm from the Treeinterpreter library leading to errors
Try this in the last part of your code:

for i in range(len(x_test)):
    print ("Instance", i)
    print ("Bias (trainset mean)", clf_bias[i])
    print ("Feature contributions:")
    for c, feature in sorted(zip(contributions[i,:,0], data.columns),key=lambda x: -abs(x[0])):
        print (feature, round(c, 2))
    print ("-"*20)


The problem is that you are sorting contributions without taking into account that contributions is a 3D array and the column names is accesible with data.columns, not data.feature_names.