Skip to content

Commit

Permalink
add new files
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxinye committed Jul 9, 2024
1 parent 399644d commit ea7eb5f
Show file tree
Hide file tree
Showing 48 changed files with 2,721 additions and 58 deletions.
2 changes: 1 addition & 1 deletion build/lib.linux-x86_64-3.11/fABBA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .separate.aggregation import aggregate


__version__ = '1.2.7'
__version__ = '1.2.8'
from .load_datasets import load_images, loadData
from .fabba import (image_compress, image_decompress, ABBAbase, ABBA,
get_patches, patched_reconstruction, fABBA,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 5 additions & 4 deletions build/lib.linux-x86_64-3.11/fABBA/fabba.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def _inverse_compress(pieces, start):




def symbolsAssign(clusters, alphabet_set=0):
"""
Automatically assign symbols to different groups, start with '!'
Expand All @@ -295,6 +296,8 @@ def symbolsAssign(clusters, alphabet_set=0):
labels to symbols, repectively.
"""
clusters = pd.Series(clusters)
N = len(clusters.unique())

if alphabet_set == 0:
alphabets = ['A','a','B','b','C','c','D','d','E','e',
Expand All @@ -311,7 +314,7 @@ def symbolsAssign(clusters, alphabet_set=0):
'w', 'x', 'y', 'z']

elif isinstance(alphabet_set, list):
if len(clusters) <= len(alphabet_set):
if N <= len(alphabet_set):
alphabets = alphabet_set
else:
raise ValueError("Please ensure the length of ``alphabet_set`` is greatere than ``clusters``.")
Expand All @@ -323,9 +326,6 @@ def symbolsAssign(clusters, alphabet_set=0):
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z']

clusters = pd.Series(clusters)
N = len(clusters.unique())

cluster_sort = [0] * N
counter = collections.Counter(clusters)
for ind, el in enumerate(counter.most_common()):
Expand All @@ -340,6 +340,7 @@ def symbolsAssign(clusters, alphabet_set=0):
string = alphabets[clusters]
return string, alphabets





Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 3 additions & 4 deletions build/lib.linux-x86_64-3.11/fABBA/jabba/jabba.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def symbolsAssign(clusters, alphabet_set=0):
labels to symbols, repectively.
"""
clusters = pd.Series(clusters)
N = len(clusters.unique())

if alphabet_set == 0:
alphabets = ['A','a','B','b','C','c','D','d','E','e',
Expand All @@ -68,7 +70,7 @@ def symbolsAssign(clusters, alphabet_set=0):
'w', 'x', 'y', 'z']

elif isinstance(alphabet_set, list):
if len(clusters) <= len(alphabet_set):
if N <= len(alphabet_set):
alphabets = alphabet_set
else:
raise ValueError("Please ensure the length of ``alphabet_set`` is greatere than ``clusters``.")
Expand All @@ -80,9 +82,6 @@ def symbolsAssign(clusters, alphabet_set=0):
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z']

clusters = pd.Series(clusters)
N = len(clusters.unique())

cluster_sort = [0] * N
counter = collections.Counter(clusters)
for ind, el in enumerate(counter.most_common()):
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/extmod/chainApproximation_c.o
Binary file not shown.
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/extmod/fabba_agg_c.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/extmod/fabba_agg_cm.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/extmod/fabba_agg_cm_win.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/extmod/inverse_tc.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/jabba/aggmem.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/jabba/aggwin.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/jabba/compmem.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/jabba/inversetc.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/separate/aggregation_c.o
Binary file not shown.
Binary file modified build/temp.linux-x86_64-3.11/fABBA/separate/aggregation_cm.o
Binary file not shown.
Binary file not shown.
Binary file renamed dist/fABBA-1.2.7.tar.gz → dist/fABBA-1.2.8.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion fABBA.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: fABBA
Version: 1.2.7
Version: 1.2.8
Summary: An efficient aggregation method for the symbolic representation of temporal data
Home-page: https://github.com/nla-group/fABBA
Author: Xinye Chen, Stefan Güttel
Expand Down
26 changes: 26 additions & 0 deletions fABBA/.ipynb_checkpoints/__init__-checkpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
try:
try:
from .separate.aggregation_cm import aggregate
except:
from .separate.aggregation_c import aggregate

from .extmod.inverse_tc import *

except (ModuleNotFoundError, ValueError):
from .separate.aggregation import aggregate


__version__ = '1.2.8'
from .load_datasets import load_images, loadData
from .fabba import (image_compress, image_decompress, ABBAbase, ABBA,
get_patches, patched_reconstruction, fABBA,
symbolsAssign, fillna)

from .fabba import _compress as compress
from .fabba import _inverse_compress as inverse_compress
from .digitization import digitize, inverse_digitize, quantize, wcss, calculate_group_centers

from .jabba.jabba import fastABBA, JABBA
from .jabba import jabba
from .jabba import preprocessing
from .jabba.fkmns import sampledKMeansInter as fkmeans
Loading

0 comments on commit ea7eb5f

Please sign in to comment.