fraudar.export package

FRAUDAR: Bounding Graph Fraud in the Face of Camouflage Authors: Bryan Hooi, Hyun Ah Song, Alex Beutel, Neil Shah, Kijung Shin, Christos Faloutsos

This software is licensed under Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version: 1.1 Date: June 12, 2018 Main Contact: Bryan Hooi (bhooi@andrew.cmu.edu)

Submodules

fraudar.export.MinTree module

class fraudar.export.MinTree.MinTree(degrees)[source]

Bases: object

A tree data structure which stores a list of degrees and can quickly retrieve the min degree element, or modify any of the degrees, each in logarithmic time. It works by creating a binary tree with the given elements in the leaves, where each internal node stores the min of its two children.

changeVal(idx, delta)[source]
dump()[source]
getMin()[source]

fraudar.export.greedy module

This module contains functions that run the greedy detector for dense regions in a sparse matrix. use aveDegree or sqrtWeightedAveDegree or logWeightedAveDegree on a sparse matrix, which returns ((rowSet, colSet), score) for the most suspicious block.

fraudar.export.greedy.aveDegree(M, nodeSusp=None)[source]
fraudar.export.greedy.c2Score(M, rowSet, colSet, nodeSusp)[source]
fraudar.export.greedy.detectMultiple(M, detectFunc, numToDetect)[source]
fraudar.export.greedy.fastGreedyDecreasing(M, colWeights, nodeSusp=None)[source]
fraudar.export.greedy.getFMeasure(pred, actual)[source]
fraudar.export.greedy.getPrecision(pred, actual)[source]
fraudar.export.greedy.getRecall(pred, actual)[source]
fraudar.export.greedy.getRowFMeasure(pred, actual, idx)[source]
fraudar.export.greedy.getRowPrecision(pred, actual, idx)[source]
fraudar.export.greedy.getRowRecall(pred, actual, idx)[source]
fraudar.export.greedy.injectCliqueCamo(M, m0, n0, p, testIdx)[source]
fraudar.export.greedy.jaccard(pred, actual)[source]
fraudar.export.greedy.listToSparseMatrix(edgesSource, edgesDest)[source]
fraudar.export.greedy.logWeightedAveDegree(M, nodeSusp=None)[source]
fraudar.export.greedy.readData(filename)[source]
fraudar.export.greedy.sqrtWeightedAveDegree(M, nodeSusp=None)[source]
fraudar.export.greedy.subsetAboveDegree(M, col_thres, row_thres)[source]

fraudar.export.run_greedy module

fraudar.export.run_greedy.main()[source]

fraudar.export.testMinTree module

fraudar.export.testMinTree.main()[source]