I use python for a little machine learning.
I have a python nd array with 2000 elements. Each entry contains information about some items and at the end has a logical meaning to tell me whether they are a vampire or not.
Each entry in the array is as follows:
[height(cm), weight(kg), stake aversion, garlic aversion, reflectance, shiny, IS_VAMPIRE?]
My goal is to enable the new subject to be a vampire, given the data shown above for the subject.
I used sklearn to teach some machines:
clf = tree.DecisionTreeRegressor()
clf=clf.fit(X,Y)
print clf.predict(W)
Where W is the data array for the new object. script I wrote return booleans, but I would like it to return probabilities. How to change it?
source
share