Author: Not specified Language: python
Description: (v7) Timestamp: 2018-05-21 03:17:46 +0000
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply
  1. def stumpClassify(dataMatrix,dimen,threshVal,threshIneq):#just classify the data
  2.     retArray = np.ones((np.shape(dataMatrix)[0],1))
  3.     if threshIneq == 'lt':
  4.         retArray[dataMatrix[:,dimen] <= threshVal] = -1.0
  5.     else:
  6.         retArray[dataMatrix[:,dimen] > threshVal] = -1.0
  7.     return retArray
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply