0

I've got a list of proxy servers. There is a list of ProxyServer items. Item holds proxy Address itself, SucceedCount, FailedCount, LastSucceedDate, LastFailedDate. If loading operation succeed, SucceedCount is incremented, if failed - FailedCount. So the items list looks like this (LastFailedDate is not presented):

enter image description here

I need to implement a simple algorithm to get N best proxy from this list. Best proxy means:

  • many SucceedCount is good
  • many FailedCount is bad
  • proxy with succeed/failed 0/0 is better than 0/10
  • last success/failed date must have some weight, for example proxy with top SucceedCount/FailedCount 10000/100, but LastSucceedDate month ago counts as bad enough.

I hope you got the idea to get best N proxy for that moment. I guess there are some known algorithms for tasks like this. Looks like the algorithm itself can be something like .OrderBy() chain.

SucceedCount, FailedCount, LastSucceedDate, LastFailedDate fields ​​may be replaced by any others, deleted, or ​​may be supplemented by others, I just need the way to achieve the goal.

AsValeO
  • 2,859
  • 3
  • 27
  • 64
  • What is better: 1000/1 or 0/0 ? – gudok Mar 24 '16 at 07:46
  • 2
    500/1 or 10/0? :) What I want to say is that the problem with ranking is not the algorithm itself but rather what you consider to be an expected result. So, the first (and hardest) thing you want to do is to create solid set of test cases. After that almost every algorithm will work. If you decide to write algorithm by hand (should be easy in this case), I suggest using pairwise ranking: write comparator which accepts feature vectors for pair of proxy servers and returns boolean value which one is better. Otherwise look into [tag:machine-learning] to get info about advanced methods (e.g. SVM) – gudok Mar 24 '16 at 08:02
  • @gudok, Ok, thanks for your useful guidelines! I'll dive deeper. – AsValeO Mar 24 '16 at 08:08
  • 1
    You could look into the various approaches online news aggregators (reddit and the like) take with votes - map a `Succeed` to an upvote and a `Failed` to a downvote, and your 'Best proxy means' list looks a lot like reddit post ranking. – AakashM Mar 24 '16 at 08:49

0 Answers0