![]() |
OPR Programming Challenge
Given the dataset Michael Hill posted here, calculate OPR, DPR, and CCWM; and create a report sorted by team number. The goal is to see who can go from raw input data to finished output report the fastest. @ Michael Hill: please refrain since you and I have discussed this. |
Re: OPR Programming Challenge
by "fastest" do you mean the first response or fastest operational efficiency?
|
Re: OPR Programming Challenge
I believe operational efficiency is the goal; however, Ether can speak for himself on that...
|
Re: OPR Programming Challenge
*Actively Refraining* ...if that's possible
|
Re: OPR Programming Challenge
1 Attachment(s)
I'm about 2 months late, but I think I have generated an accurate report. Some of the OPR and CCWM values are identical to the 1114/2834 databases, while others are a few values off. I don't know whether this is an input error, matrix inversion error, or general code bug.
|
Re: OPR Programming Challenge
Quote:
Did you time how long it took the computer to go from raw input data to finished output report ? That's the challenge. Quote:
|
Re: OPR Programming Challenge
Quote:
As for the matrix inversion, I didn't realize that the Cholesky solving library I used didn't find the inverse, rather it found Cholesky factorization of the matrix. |
Re: OPR Programming Challenge
Quote:
The challenge includes the total time to do all these steps*:
Please report the times for each of the above steps. What hardware did you run this on? What software did you use? *if you used different steps, please explain and provide timings |
Re: OPR Programming Challenge
Out of 50 runs, these are the average times to:
1. Read from file to create data structures: 0.3636 seconds 2. Make sorted team lists and Bs in Ax=B: 0.0019 seconds 3. Make matrix A in Ax=B: 0.0675 seconds 4. Create Cholesky factorization and find OPR and CCWM values (DPR = OPR - CCWM): 0.2793 seconds 5. Write to file: 0.0242 seconds (Record these times: 0.0128 seconds) Total: 0.7494 seconds I wrote this in Python using the numpy and scipy libraries to manipulate matrices. The software is running on a Windows 8 machine with an Intel i7-4700MQ running at 2.4 GHz, with 12 GB of RAM. |
Re: OPR Programming Challenge
Quote:
For those of you reading along, the timing above is for a dataset containing 2696 teams, 8921 matches, 17842 alliance scores. @ Michael Hill: feel free to jump in here now if you want :-) |
Re: OPR Programming Challenge
Quote:
There are some optimizations that are done with this. For example, using sparse matrices lets MATLAB do a much quicker job of left divides (which is not the same as inverting the matrix). MATLAB is actually fairly smart and decides which form of factorization to use based on the data that's inputted, so it (generally) will choose the fastest method. Sparse is very fast. Code:
ticEDIT: I actually just realized there was some code that slows it down in there. the "gather"s in developing the "out" matrix are more remnants of GPU computing that I didn't take out. They are used for getting the variables out of GPU memory to my RAM. After removing them, It took total computation time to about 0.48 seconds. |
Re: OPR Programming Challenge
Quote:
X = A\B(:,1); Y = A\B(:,2); ... with this: XY = A\B ... then you'll have only one left-divide, and the XY vector will be a 2-column vector containing X and Y. |
Re: OPR Programming Challenge
Quote:
|
Re: OPR Programming Challenge
Quote:
Code:
alldata = dlmread('C:\Users\Michael Hill\Documents\Projects\OPR\scores.dat');Code:
for i = 1:a(1) |
Re: OPR Programming Challenge
Quote:
The first one is ~0.025 sec and the second (around the for loop) is ~0.235 sec |
| All times are GMT -5. The time now is 02:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi