The COSNet R package

Next :   Software and documentation download

Overview of the COSNet R Package

COSNet (COst Sensitive neural Network) [1, 2] is a novel method to learn node labels biological networks  with a high prevalence of negative instances. Examples of this context are the automated prediction of protein functions, the gene disease prioritization and the drug reposition problem.

COSNet is based on a cost-sensitive family of parametrized Hopfield networks,  whose characteristics can be summarized as follows:

  1. Class labels and neuron states are conceptually separated. In this way a class of Hopfield networks is introduced, having as parameters the values of neuron states and the neuron thresholds.
  2. The parameters of the network are learned from the data through an efficient supervised algorithm, in order to take into account the unbalance between positive and negative node labels.
  3. The dynamics of the network is restricted to its unlabeled part, preserving the minimization of the overall objective function and the a priori information and significantly reducing the time complexity of the learning algorithm.

The COSNet package provides methods to support all the abovementioned steps, and methods for cross validating the algorithm and for stratified and not stratified partition of the input data. See section Main functionalities of COSNet.

The instruction for downloading the R software and the documentation (the reference manual and the vignette in pdf format) are available in the section Software and documentation download. To install the software go to section Software installation, whereas for an example of COSNet library usage go to section A step-by-step application of COSNet  to protein function prediction.


  1. Frasca, M., Bertoni, A., Re, M. and Valentini, G. A neural network algorithm for semi-supervised node label learning from unbalanced data. Neural Networks, 43, 84-98, 2013.
  2. A. Bertoni, M. Frasca, G. Valentini COSNet: a Cost Sensitive Neural Network for Semi-supervised Learning in Graphs. In:"Machine Learning and Knowledge Discovery in Databases". European Conference, ECML PKDD 2011, Athens, Greece, Proceedings, Part I, Lecture Notes in Artificial Intelligence, vol. 6911, pp.219-234, Springer, 2011.