Skip to content

Commit

Permalink
update in order to tranform in pip like module
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelverissimo committed Oct 4, 2020
1 parent ac247f5 commit 150fefb
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 11 deletions.
7 changes: 7 additions & 0 deletions bregman_clustering/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__name__ = "bregman_clustering"

__all__ = []

from . import python
__all__.extend(python.__all__)
from .python import *
5 changes: 5 additions & 0 deletions bregman_clustering/python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__all__ = []

from . import cluster_algorithms
__all__.extend( cluster_algorithms.__all__ )
from .cluster_algorithms import *
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
__all__ = [
'base_kmeans',
]

import numpy as np
from scipy.spatial import distance
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -97,6 +101,7 @@ def fit(self, X_data, breg_div='euclidean', n_iter=10, tol=1e-3, debug=False):
# Jut to log the number of iteractions
self.last_iter = i_iter+1
print('The conversion criteria was reached... Stopping!')
print(self.sum_total_div)
break
else:
self.centroids = new_centers
Expand Down
1 change: 0 additions & 1 deletion python/__init__.py

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/setup.sh

This file was deleted.

39 changes: 39 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Imports
from setuptools import setup, find_packages

# Loading README file
with open("README.md", "r") as fh:
long_description = fh.read()

setup(
name = 'bregmanclustering',
version = '0.3',
license='GPL-3.0',
description = 'A framework to use Bregman Divergence',
long_description = long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
author = 'Micael Veríssimo de Araújo',
author_email = '[email protected]',
url = 'https://github.com/micaelverissimo/bregmannclustering',
keywords = ['framework', 'information-geometry', 'machine-learning', 'ai', 'plotting', 'data-visualization'],
install_requires = [
'numpy',
'six>=1.12.0',
'scipy==1.4.1',
'future',
'sklearn',
'scikit-learn>=0.22.1',
'matplotlib>=3.1.3',
'seaborn>=0.10.0',
],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
)
4 changes: 0 additions & 4 deletions setup_workspace.py

This file was deleted.

3 changes: 3 additions & 0 deletions upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rm dist/*
python3 setup.py sdist
twine upload dist/*

0 comments on commit 150fefb

Please sign in to comment.