Ref Book : Machine Learning in Action

Numpy coding (unable to understand numpy code) :

I am not able to understand this axis parameter in the below mention code.()

def splitDataSet(dataSet, axis, value):
retDataSet = []
for featVec in dataSet:
if featVec[axis] == value:
reducedFeatVec = featVec[:axis]
return retDataSet

Ref Book - Machine learning in action(Decision Tree Algorithms – page no 43)

1 Like

This is not a general python coding forum. It is dedicated to SNAP. So this is not the appropriate place to ask you question. I close this thread.

1 Like