Open buzzo123 opened 7 years ago
hi, can i ask a question?
i want to implement a bag of words classifier in c# but i dont undestand this function:
def dict2numpy(dict): nkeys = len(dict) array = zeros((nkeys * PRE_ALLOCATION_BUFFER, 128)) pivot = 0 for key in dict.keys(): value = dict[key] nelements = value.shape[0] while pivot + nelements > array.shape[0]: padding = zeros_like(array) array = vstack((array, padding)) array[pivot:pivot + nelements] = value pivot += nelements array = resize(array, (pivot, 128)) return array
can you explain me please? thanks a lot
hi, can i ask a question?
i want to implement a bag of words classifier in c# but i dont undestand this function:
can you explain me please? thanks a lot