Sunday, September 3, 2017

We continue reading "Modern data Fraud Prevention at Big Data Scale". Feedzai enables companies to move from broad segment based scoring of transactions to individual oriented scoring with machine learning based techniques. Feedzai claims to use a new technology on a new platform. They claim to have highest fraud detection rates with lowest false positives. Feedzai uses real-time behavioral profiling as well as historical profiling that has been proven to detect 61% more fraud. They have true real time processing. They say they have true machine learning capabilities. Feedzai relies on Big Data and therefore runs on commodity hardware. The historical data goes as far back as three years. In addition, Feedzai processes realtime data in 25 milli seconds against vast amounts of data at 99th percentile.  This enables fraud to be detected almost as early as when it is committed.
The Machine learning algorithms used include Random Forests and Support Vector machines.  The former is helpful because it can be treated as an ensemble of decision trees which brings more robustness to meet the different kinds of transactions subjected to fraud detection.  The latter is helpful because it can form more sophisticated  models.
#codingexercise
Find the next smaller element for all in an integer array
Int[] GetNextSmallerElements(List<int> A)
{
var result = new int[A.length];
for (int i =0; i < A.Length; i++)
{
int next = -1;
for (int j = i+1; j < A.Length; j++)
      if (A[j] < A[i]){
          next  = A[j];
          break;
      }
result[i] = next;
}
return result;

}

We could also  do this with the help of a stack which we keep for all the elements that do not have a next smaller element.
we push the first element in the stack. we pick the next item in the array if the next is smaller than the element in the stack, we print the tuple and pop the element otherwise we push it back on to the stack for retaining the elements we have not found an answer yet. we also push the next element on to the stack so it can participate for matches going forward. This is still O(N^2) but instead of looking ahead through all the elements we are looking back at the collection of unmatched so far. In the worst case, this stack will grow to be the length of the array. The order of the stack is the reverse order of the portion of the array we have covered.

No comments:

Post a Comment