(TxtName, parseArray)
| 48 | |
| 49 | |
| 50 | def parseTxt(TxtName, parseArray): |
| 51 | fp = open(TxtName) |
| 52 | lines = fp.readlines() |
| 53 | for line in lines: |
| 54 | sp = line.rstrip("\n").split(" ") |
| 55 | fId = int(sp[1]) - 1 |
| 56 | if fId >= 3000: |
| 57 | continue |
| 58 | mId = int(sp[2]) |
| 59 | type = int(sp[3]) - 1 |
| 60 | parseArray[fId, mId - 1, type] = 1 |
| 61 | |
| 62 | |
| 63 | def compute_nwRMSE(n, pdArray, gtArray): |