Skip to main content

A python package for classify edges of graph based on topological features and neural networks.

Project description

Edge Prediction

Graph's edges classification by topological (and other) features with neural network.

Installation

  • Installation via pip:
pip install
  • Installation with git:
git clone https://github.com/louzounlab/Edge-Prediction.git

How to use?

import networkx as nx
from EdgeClassifier.edge_classifier import EdgeClassifier

# Build networkx graph from edges list:
graph = nx.read_edgelist("./data/graph1.txt", delimiter=",", create_using=nx.DiGraph,
                         data=(("label", int), ("attribute1", float,)))
graph = nx.convert_node_labels_to_integers(graph)

# Build the classifier.
classifier = EdgeClassifier("./pkl", "./plots", verbose=True, gpu=False)

# Define parameters to the graph and to the model and execute.
classifier.build("graph5", graph, {
    "lr": 0.001,
    "batch_size": 64,
    "epochs": 150
}, topological_features=None, data_features=["attribute1"])

This package classify graphs' edges by , graph edges classification by topological attributes

Attention! This package uses non boost graph-measures, and that's might make the features calculation slower. If you would like to clac them in boost environment, follow the instruction here (link), and move th .pkl file to the pkl directory.

Project details


Download files

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

Source Distribution

EdgeClassifier-0.0.11.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

EdgeClassifier-0.0.11-cp310-cp310-win_amd64.whl (10.2 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page