Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

graphspot

Graph anomaly detection for people who have to score things they have never seen before.

  • Inductive by contract. Every detector's decision_function scores nodes absent at fit time. Never NotImplementedError.
  • Installs without torch. The core is numpy/scipy/sklearn/pandas/xgboost. Deep detectors live behind pip install graphspot[deep].
  • Honest baselines. Every evaluation can include a no-graph tabular baseline, and graphspot warns loudly when the graph model fails to beat it.

Status: pre-release, under active development. The v0 detector set is NeighborAggregation (transform), XGBGraph, RFGraph, FlatBaseline, with FlatUnsupervised, OddBall, Fraudar and BWGNN (behind [deep]) on the way.

import graphspot
from graphspot.detectors import XGBGraph, FlatBaseline
from graphspot.datasets import load_yelpchi

g = load_yelpchi()

det = XGBGraph(random_state=0).fit(g, y=g.node_labels)
flat = FlatBaseline(random_state=0).fit(g, y=g.node_labels)

print(graphspot.evaluate(
    g.node_labels,
    det.decision_scores_,
    baseline_scores=flat.decision_scores_,
))

det.explain(k=5)   # e.g. [("2hop_mean(f21)", 0.14), ("1hop_max(f3)", 0.11), ...]

Works directly on transaction dataframes:

g = graphspot.Graph.from_pandas(
    tx, source="buyer_id", target="seller_id",
    edge_features=["amount"], time="ts",
    node_features=accounts.set_index("account_id"),
)

License: BSD-3-Clause.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphspot-0.1.0a1.tar.gz (151.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphspot-0.1.0a1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file graphspot-0.1.0a1.tar.gz.

File metadata

  • Download URL: graphspot-0.1.0a1.tar.gz
  • Upload date:
  • Size: 151.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphspot-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 d965d7e7805d35e0b1e042814d93835839ca5a05efcb880a001b3f6dc566594d
MD5 50795b970033f2fad90d812b8f59baa4
BLAKE2b-256 73495ce49dc2ffc5defa4174ee17e7c5d336b71ee15f3dff348ce01a315b9d99

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphspot-0.1.0a1.tar.gz:

Publisher: release.yml on JayeshSuryavanshi/graphspot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphspot-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: graphspot-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphspot-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b10658fa8c20b9e1b45b83acec9908ee9a4b2d7e81da96bb9258fddfcff39e
MD5 c55714731dc1d107ebf86ec34543284f
BLAKE2b-256 2d338a8de9a0e462d0700d5384e7de342acdd12d10dbfbbf8b1f26b1ccf8c3b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphspot-0.1.0a1-py3-none-any.whl:

Publisher: release.yml on JayeshSuryavanshi/graphspot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.0

2 files

This release

0.1.0a1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page