For week 1 Assignment’s method - min_edit_distance , one test is falling with incorrect output… I think the code is correct not sure why only the first row is showing incorrect values :
Thanks for sharing the topic. However, I am still not able to figure out the issue. @David_Plon mentioned that he was not initializing the row and column 0 correctly. I think I am doing that correctly here.
for row in range(0,m+1):
D[row,0] = row
Is this wrong ?
look closely at the solution offered in the linked thread …only worked if del_cost and ins_cost were both set to 1
Suppose you had the expression
a = b * c
If you’re only getting the correct value for a when c == 1, it’s the same as if you had written
a = b
right?
Notice that in the matrix depicted in the notebook as Figure 8. Example Distance Matrix the values for 0^{th} row and column depend on the assumption insert/delete cost = 1 which isn’t explicitly represented in the algebra working out the rest of the values.