قسم الإعلام الآليhttps://www.univ-soukahras.dz/ar/dept/cs |
0 votes
|
Given the following dataset in Matlab, Write a function in Matlab to find the different classes and number of instances per class: data=[ |
نشر على 11:12, الاثنين 18 نوفمبر 2019 By Imed BOUCHRIKA |
أجوبة (1)
جواب (1)
0 votes
|
1/ the function ============================================ function [classes, instancesN] = findClasses(dataset) m_map = containers.Map(); [rows, columns] = size(dataset); for i=1:rows if m_map.isKey(dataset{i,1}) m_map(dataset{i,1}) = m_map(dataset{i,1})+1; else m_map(dataset{i,1}) = 1; end end classes = m_map.keys(); instancesN = m_map.values(); for k=1:length(classes) ============================================= Execution:
|
نشر على 16:41, الاثنين 18 نوفمبر 2019 by abdennour redjaibia (282 points) |