Difference between multi-class classification & multi-label classification is that in multi-class problems the classes are mutually exclusive, whereas for multi-label problems each label represents a different classification task, but the tasks are somehow related. multi-class classification makes the assumption that each sample is assigned to one and only one label: a fruit can be either an apple or a pear but not both at the same time.

Continue reading

选择排序 计算机内存就像一大堆的抽屉, 每个抽屉都有地址 存储多个元素可以使用:数组和链表 数组的元素都在一起 链表的元素是分开的,每个元素都存着下一个元素的地址 数组的读取速度很快 链表的插入和删除速度很快 在同一个数组中,所有的元素类型必须一致 def findSmallest(arr): smallest = arr[0] #初始化:存储最小的值 smallest_index=0 #初始化: 存储最小值的索引 for i in range(1, len(arr)): if arr[i] < smallest: smallest=arr[i] smallest_index=i return smallest_index def selectionSort(arr): #对数据进行排序 newArr=[] for i in range(len(arr)): smallest=findSmallest(arr)#找出数据中最小的元素,并将其加到新的数组中去 newArr.append(arr.pop(smallest)) return newArr print(selectionSort([5,3,6,2])) ## [2, 3, 5, 6]

Continue reading

Author's picture

Jixing Liu

Reading And Writing

Data Scientist

China