-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e6c259
commit 4615df3
Showing
219 changed files
with
577 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
from aaanalysis.data_handling import load_dataset, load_scales | ||
from aaanalysis.feature_engineering import AAclust, AAclustPlot, CPP, CPPPlot, SequenceFeature, SplitRange | ||
from aaanalysis.pu_learning import dPULearn | ||
from aaanalysis.plotting import (plot_get_clist, plot_get_cmap, plot_get_cdict, | ||
from .data_handling import load_dataset, load_scales | ||
from .feature_engineering import AAclust, AAclustPlot, CPP, CPPPlot, SequenceFeature, SplitRange | ||
from .pu_learning import dPULearn | ||
from .plotting import (plot_get_clist, plot_get_cmap, plot_get_cdict, | ||
plot_settings, plot_legend, plot_gcfs) | ||
from aaanalysis.config import options | ||
from .config import options | ||
|
||
__all__ = ["load_dataset", "load_scales", | ||
"AAclust", "AAclustPlot", | ||
"CPP", "CPPPlot", "SequenceFeature", "SplitRange", | ||
"dPULearn", "plot_get_clist", "plot_get_cmap", "plot_get_cdict", | ||
"plot_settings", "plot_legend", "plot_gcfs", "options"] | ||
__all__ = [ | ||
"load_dataset", | ||
"load_scales", | ||
"AAclust", | ||
"AAclustPlot", | ||
"CPP", | ||
"CPPPlot", | ||
"SequenceFeature", | ||
"SplitRange", | ||
"dPULearn", | ||
"plot_get_clist", | ||
"plot_get_cmap", | ||
"plot_get_cdict", | ||
"plot_settings", | ||
"plot_legend", | ||
"plot_gcfs", | ||
"options" | ||
] | ||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
from aaanalysis.data_handling.load_dataset_ import load_dataset | ||
from aaanalysis.data_handling.load_scales_ import load_scales | ||
from ._load_dataset import load_dataset | ||
from ._load_scales import load_scales | ||
|
||
__all__ = ["load_dataset", "load_scales"] | ||
__all__ = [ | ||
"load_dataset", | ||
"load_scales" | ||
] |
Binary file modified
BIN
-46 Bytes
(88%)
aaanalysis/data_handling/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file renamed
BIN
+8.91 KB
.../__pycache__/load_dataset_.cpython-39.pyc → .../__pycache__/_load_dataset.cpython-39.pyc
Binary file not shown.
Binary file renamed
BIN
+6.22 KB
...g/__pycache__/load_scales_.cpython-39.pyc → ...g/__pycache__/_load_scales.cpython-39.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
from aaanalysis.feature_engineering.aaclust_ import AAclust | ||
from aaanalysis.feature_engineering.aaclust_plot_ import AAclustPlot | ||
from aaanalysis.feature_engineering.cpp.feature import SequenceFeature | ||
from aaanalysis.feature_engineering.cpp.feature import SplitRange | ||
from aaanalysis.feature_engineering.cpp_plot_ import CPPPlot | ||
from aaanalysis.feature_engineering.cpp_ import CPP | ||
from ._aaclust import AAclust | ||
from ._aaclust_plot import AAclustPlot | ||
from ._cpp_plot import CPPPlot | ||
from ._cpp import CPP | ||
from ._backend.cpp.feature import SequenceFeature, SplitRange | ||
|
||
|
||
__all__ = ["AAclust", "AAclustPlot", "CPP", "CPPPlot", "SequenceFeature", "SplitRange"] | ||
__all__ = [ | ||
"AAclust", | ||
"AAclustPlot", | ||
"SequenceFeature", | ||
"SplitRange", | ||
"CPP", | ||
"CPPPlot", | ||
] |
Binary file modified
BIN
-158 Bytes
(76%)
aaanalysis/feature_engineering/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file renamed
BIN
+19.3 KB
...ering/__pycache__/aaclust_.cpython-39.pyc → ...ering/__pycache__/_aaclust.cpython-39.pyc
Binary file not shown.
Binary file added
BIN
+3.16 KB
aaanalysis/feature_engineering/__pycache__/_aaclust_plot.cpython-39.pyc
Binary file not shown.
Binary file renamed
BIN
+12.3 KB
...gineering/__pycache__/cpp_.cpython-39.pyc → ...gineering/__pycache__/_cpp.cpython-39.pyc
Binary file not shown.
Binary file renamed
BIN
+25.2 KB
...ring/__pycache__/cpp_plot_.cpython-39.pyc → ...ring/__pycache__/_cpp_plot.cpython-39.pyc
Binary file not shown.
Binary file removed
BIN
-4.12 KB
aaanalysis/feature_engineering/__pycache__/aaclust_plot_.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...ysis/feature_engineering/aaclust_plot_.py → ...ysis/feature_engineering/_aaclust_plot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file added
BIN
+214 Bytes
aaanalysis/feature_engineering/_backend/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+222 Bytes
aaanalysis/feature_engineering/_backend/aaclust/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file added
BIN
+928 Bytes
aaanalysis/feature_engineering/_backend/aaclust/__pycache__/_utils_aaclust.cpython-39.pyc
Binary file not shown.
Binary file added
BIN
+2.02 KB
aaanalysis/feature_engineering/_backend/aaclust/__pycache__/aaclust_eval.cpython-39.pyc
Binary file not shown.
Binary file added
BIN
+10.8 KB
aaanalysis/feature_engineering/_backend/aaclust/__pycache__/aaclust_fit.cpython-39.pyc
Binary file not shown.
Binary file added
BIN
+6.13 KB
aaanalysis/feature_engineering/_backend/aaclust/__pycache__/aaclust_methods.cpython-39.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
aaanalysis/feature_engineering/_backend/aaclust/_utils_aaclust.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This is a script for utility functions for aaclust object. | ||
""" | ||
import numpy as np | ||
|
||
|
||
# II Main Functions | ||
def _cluster_center(X): | ||
"""Compute cluster center (i.e., arithmetical mean over all data points/observations of a cluster)""" | ||
return X.mean(axis=0)[np.newaxis, :] | ||
|
||
|
||
def _cluster_medoid(X): | ||
"""Obtain cluster medoids (i.e., scale closest to cluster center used as representative scale for a cluster)""" | ||
# Create new array with cluster center and given array | ||
center_X = np.concatenate([_cluster_center(X), X], axis=0) | ||
# Get index for scale with the highest correlation with cluster center | ||
ind_max = np.corrcoef(center_X)[0, 1:].argmax() | ||
return ind_max | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.