Skip to content

Commit

Permalink
Update project structure. General folders with subfolders for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
breimanntools committed Oct 3, 2023
1 parent d7d7629 commit ac524b6
Show file tree
Hide file tree
Showing 462 changed files with 98 additions and 104 deletions.
6 changes: 2 additions & 4 deletions aaanalysis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from aaanalysis.data_handling import load_dataset, load_scales
from aaanalysis.aaclust import AAclust
from aaanalysis.aaclust_plot import AAclustPlot
from aaanalysis.cpp import CPP, CPPPlot, SequenceFeature, SplitRange
from aaanalysis.dpulearn import dPULearn
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,
plot_settings, plot_legend, plot_gcfs)
from aaanalysis.config import options
Expand Down
Binary file modified aaanalysis/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
3 changes: 0 additions & 3 deletions aaanalysis/aaclust/__init__.py

This file was deleted.

Binary file removed aaanalysis/aaclust/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions aaanalysis/aaclust_plot/__init__.py

This file was deleted.

Binary file not shown.
5 changes: 0 additions & 5 deletions aaanalysis/cpp/__init__.py

This file was deleted.

Binary file removed aaanalysis/cpp/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
3 changes: 0 additions & 3 deletions aaanalysis/dpulearn/__init__.py

This file was deleted.

Binary file removed aaanalysis/dpulearn/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# II Main Functions
class TreeModel:
"""A wrapper for Tree based prediction models and Tree explainer from SHAP package to
"""A wrapper for Tree based prediction models and Tree explainable_ai from SHAP package to
explain prediction (typically binary classification) results at global and individual level"""
def __init__(self, model=None):
""""""
Expand All @@ -33,7 +33,7 @@ def add_feat_import(self, df_feat=None):


class ShapModel:
"""A wrapper for Tree explainer from SHAP package"""
"""A wrapper for Tree explainable_ai from SHAP package"""
def __init__(self, model=None):
""""""

Expand Down
9 changes: 9 additions & 0 deletions aaanalysis/feature_engineering/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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


__all__ = ["AAclust", "AAclustPlot", "CPP", "CPPPlot", "SequenceFeature", "SplitRange"]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
"""
This is a script for computing the Bayesian Information Criterion (BIC).
"""
import time
import pandas as pd
import numpy as np
from collections import OrderedDict
from scipy.spatial import distance
from aaanalysis.aaclust._aaclust import compute_centers
from aaanalysis.feature_engineering.aaclust._aaclust import compute_centers

# I Helper Functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import pandas as pd

import aaanalysis.utils as ut
from aaanalysis.aaclust._aaclust import _cluster_center, compute_medoids, min_cor_all
from aaanalysis.feature_engineering.aaclust._aaclust import compute_medoids


# I Helper Functions
def _sort_X_labels_names(X, labels=None, names=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"""
import numpy as np
from typing import Optional, Dict, Union, List, Tuple, Type
import inspect
from inspect import isclass
from sklearn.cluster import KMeans
from sklearn.metrics import silhouette_score, calinski_harabasz_score
from sklearn.base import ClusterMixin
Expand All @@ -16,10 +14,10 @@
from aaanalysis.template_classes import Wrapper
import aaanalysis.utils as ut

from aaanalysis.aaclust._aaclust import (estimate_lower_bound_n_clusters, optimize_n_clusters, merge_clusters,
compute_centers, compute_medoids)
from aaanalysis.aaclust._aaclust_bic import bic_score
from aaanalysis.aaclust._aaclust_statics import compute_correlation, name_clusters
from aaanalysis.feature_engineering.aaclust._aaclust import (estimate_lower_bound_n_clusters, optimize_n_clusters, merge_clusters,
compute_centers, compute_medoids)
from aaanalysis.feature_engineering.aaclust._aaclust_bic import bic_score
from aaanalysis.feature_engineering.aaclust._aaclust_statics import compute_correlation, name_clusters


# I Helper Functions
Expand Down
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
for given parts and features .
"""

from aaanalysis.cpp._part import Parts
from aaanalysis.cpp._split import Split
from aaanalysis.feature_engineering.cpp._part import Parts
from aaanalysis.feature_engineering.cpp._split import Split
import aaanalysis.utils as ut


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from statsmodels.stats.multitest import multipletests
import warnings

from aaanalysis.cpp._split import SplitRange
from aaanalysis.feature_engineering.cpp._split import SplitRange
import aaanalysis.utils as ut


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import multiprocessing as mp
import warnings

from aaanalysis.cpp._feature_pos import SequenceFeaturePositions
from aaanalysis.cpp._split import Split, SplitRange
from aaanalysis.cpp._part import Parts
from aaanalysis.feature_engineering.cpp._feature_pos import SequenceFeaturePositions
from aaanalysis.feature_engineering.cpp._split import Split, SplitRange
from aaanalysis.feature_engineering.cpp._part import Parts

import aaanalysis as aa
import aaanalysis.utils as ut
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""
import pandas as pd

from aaanalysis.cpp.feature import SequenceFeature
from aaanalysis.cpp._feature_stat import SequenceFeatureStatistics
from aaanalysis.feature_engineering.cpp.feature import SequenceFeature
from aaanalysis.feature_engineering.cpp._feature_stat import SequenceFeatureStatistics

import aaanalysis as aa
import aaanalysis.utils as ut
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import seaborn as sns
import inspect

from aaanalysis.cpp._cpp import CPPPlots, get_optimal_fontsize
from aaanalysis.feature_engineering.cpp._cpp import CPPPlots, get_optimal_fontsize
import aaanalysis as aa

import aaanalysis.utils as ut
Expand Down
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions aaanalysis/pu_learning/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from aaanalysis.pu_learning.dpulearn_ import dPULearn

__all__ = ["dPULearn"]
Binary file not shown.
Binary file not shown.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.AAclust.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.AAclustPlot.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.CPP.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.CPPPlot.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.SequenceFeature.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/aaanalysis.dPULearn.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/generated/tutorial1_quick_start.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/_images/output_13_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ A feature matrix from a given set of CPP features can be created using
.. parsed-literal::
Mean accuracy of 0.58
Mean accuracy of 0.57
Creating more features with CPP will take a little time, but improve
Expand Down Expand Up @@ -160,7 +160,7 @@ prediction performance:
.. parsed-literal::
Mean accuracy of 0.9
Mean accuracy of 0.88
Expand Down
Loading

0 comments on commit ac524b6

Please sign in to comment.