Skip to main content

Flat, node classification model

Project description

  • Written by Miguel Romero

  • Last update: 07/07/21

Classification of nodes with structural properties

This package aims to evaluate whether the structural (topological) properties of a network are useful for predicting node attributes of nodes (i.e., node classification). It uses a combination of multiple machine learning techniques, such as, XGBoost and the SMOTE sampling technique.

Installation

The xgbfnc package can be install using pip, the requirements will be automatically installed:

python3 -m pip install XGBfnc

The source code and examples can be found in the GitHub repository.

Documentation

Documentation of the package can be found here.

Example

The example illustrates how the algorithm can be used to check whether the structural properties of the gene co-expression network improve the performance of the prediction of gene functions for rice (Oryza sativa Japonica). In this example, a gene co-expression network gathered from ATTED II is used.

How to run the example?

The example can be found in the GitHub repository. After creating adjacency matrix adj for the network, the structural properties are computed using the module data of the package:

df, strc_cols = data.compute_strc_prop(adj)

This method returns a DataFrame with the structural properties of the network and a list of the names of these properties (i.e., column names). After adding the additional features of the network to the DataFrame, the XGBfnc module is used to instantiate the XGBfnc class:

test = XGBfnc()
test.load_data(df, strc_cols, y, term, output_path='output')
ans, pred, params = test.structural_test()

The data of the network is loaded using the load_data method. And the structural test is execute using the structural_test method. The test returns a boolean value which indicates whether the structural properties help to improve the prediction performance, the prediction for the model including the structural properties and its best parameters.

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

XGBfnc-0.1.4.tar.gz (23.8 kB view details)

Uploaded Source

File details

Details for the file XGBfnc-0.1.4.tar.gz.

File metadata

  • Download URL: XGBfnc-0.1.4.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/57.1.0 requests-toolbelt/0.8.0 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for XGBfnc-0.1.4.tar.gz
Algorithm Hash digest
SHA256 265cfdd389fb92f3fa0f13f1e69ccf3a12b335ea2b0798cb8c7762efaf611f25
MD5 520776dbedc6ae290494b19a8a96e12c
BLAKE2b-256 eacbf575d4fba962fb645d4691af07498be80f3c5a10cd7c4f9e1cfee6efabb4

See more details on using hashes here.

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