At competitions, will the matrix showing the match schedule and score always have a non-zero determinant because I’ve been trying to add an OPR and DPR section to my scouting database. Whenever I have been trying to create a mock match schedule, it creates an uninvertible matrix, so I can’t find the OPR and DPR of each team.

It will if every team has played 2 matches and some team has played >2. Otherwise, by some methods of calculating it, OPR is not defined. Try using the pseudoinverse instead of the inverse to avoid that problem.

Getting a really zero determinant usually takes a bit of work, but using random numbers with no bias will typically give a quite uncertain system. I suggest that you introduce a bias - begin by assigning a random OPR to each team, then work up a matrix based on those OPRs plus or minus a hefty random value. As a byproduct, this will let you know how well you are able to determine OPR based on your assumptions.

Once data is available for enough matches at an event the design matrix will have full column rank, and the system can be solved by forming the normal equations.

But even if you have enough data to make the design matrix full column rank, the OPR computed from that data may still be essentially meaningless.

Numerical tests with real FRC match data show that as many as 50 matches (for an 80-match event) may be required to obtain a useful OPR value.

…because I’ve been trying to add an OPR and DPR section to my scouting database…

What language (Python?) or app (Excel?) are you using to do this computation?

Whenever I have been trying to create a mock match schedule, it creates an uninvertible matrix

Matrix is not full column rank. If you force a solution by using pseudoinverse, it will be the minimum L2 norm solution of the set of solutions with minimum L2 norm residuals. I guess you could still call this OPR, but it won’t shed much light on your scouting.

I believe OPR can only be defined after all teams have played 3 matches (when there is a normal schedule). Consider an event that has 60 teams. After all teams have played twice, there have been 20 matches, which will provide 40 unique equations (1 for each half-match). However, we have 60 unknowns (each team’s OPR), so this is still an underdetermined system.

@**kevjapan**, are you reading the responses on this thread?

If you are trying to invert the Normal Equations matrix and that is failing, it is telling you that you don’t have the data to do a proper OPR calculation.

If you are creating the schedule yourself, it is likely that you are creating a rank-deficient matrix. It’s arguably better to know this and not return an OPR computation.

If you want to test your scouting app, try using qual match data from actual events.

Thanks everyone for the help! I got it working by using the pseudoinverse and by letting each team have an equal amount of matches played.

Don’t waste your time with the DPR matrix. The current construct is meaningless, and the correct construct requires another level of complexity.

*Don’t waste your time with OPR either, if less than half the qual matches in the event have been completed… unless you do something like TBA does.

And don’t use pseudoinverse to compute OPR either (even for complete matches) unless you check the rank of the design matrix to make sure you don’t have corrupt data.