Skip to content

fastseriation is a Python package that can be used to seriate matrices

License

Notifications You must be signed in to change notification settings

avramidis/fastseriation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastseriation

license: MIT Build Status codecov

fastseriation is a Python package that can be used to seriate matrices.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

To get the code you will need git. To install git on Ubuntu use the following commands in a terminal

sudo apt update
sudo apt install git

To clone the repository from github use the following command in a terminal

git clone https://github.com/avramidis/fastseriation.git

To run the code you will need Python version 3, to install it use the following command in a terminal

sudo apt install python3

Installing

To install fastseriation package use the following command in a terminal

python3 setup.py install

Example

An example code that uses fastseriation is the following

import matplotlib.pyplot as plt
import numpy
import fastseriation.seriate

scores = numpy.zeros((100, 10))
for i in range(100):
    for j in range(10):
        scores[i, j] = abs(i - j)

plt.figure()
plt.imshow(scores, cmap='brg', interpolation='nearest', aspect='auto')
plt.show(block=False)

per = numpy.random.permutation(100)
scores_permutation = scores[per, :]

seriated_indexes = fastseriation.seriate.seriate(scores_permutation)

plt.figure()
plt.imshow(scores_permutation[seriated_indexes, :], cmap='brg', interpolation='nearest', aspect='auto')
plt.show(block=False)

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

About

fastseriation is a Python package that can be used to seriate matrices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages