You are viewing a single comment's thread. Return to all comments →
def mapper(m1, m2): # Assuming that len(m1[0]) = len(m2). for i in range( len(m1) ) : for j in range( len(m2[0]) ) : for k in range( len(m1[0]) ) : mapReducer.emitIntermediate( (i,j), (m1[i][k],m2[k][j]) ) def reducer(key, list_of_values): mapReducer.emit( (key[0],key[1],sum(a*b for a,b in list_of_values)) )
Seems like cookies are disabled on this browser, please enable them to open this website
Map Reduce Advanced - Matrix Multiplication
You are viewing a single comment's thread. Return to all comments →