-
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
0261505
commit 0634bcd
Showing
62 changed files
with
524 additions
and
101 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
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""This is a script for scikit-learn model specific check functions""" | ||
import inspect | ||
from inspect import isclass | ||
|
||
# Helper functions | ||
|
||
# Main functions | ||
def check_mode_class(model_class=None): | ||
"""""" | ||
# Check if model_class is actually a class and not an instance | ||
if not isclass(model_class): | ||
raise ValueError(f"'{model_class}' is not a model class. Please provide a valid model class.") | ||
# Check if model is callable | ||
if not callable(getattr(model_class, "__call__", None)): | ||
raise ValueError(f"'{model_class}' is not a callable model.") | ||
return model_class | ||
|
||
def check_model_kwargs(model_class=None, model_kwargs=None, param_to_check="n_clusters"): | ||
""" | ||
Check if the provided model has 'n_clusters' as a parameter. | ||
Filter the model_kwargs to only include keys that are valid parameters for the model. | ||
""" | ||
model_kwargs = model_kwargs or {} | ||
if model_class is None: | ||
raise ValueError("'model_class' must be provided.") | ||
valid_args = list(inspect.signature(model_class).parameters.keys()) | ||
# Check if 'param_to_check' is a parameter of the model | ||
if param_to_check not in valid_args: | ||
raise ValueError(f"'n_clusters' should be an argument in the given 'model' ({model_class}).") | ||
# Filter model_kwargs to only include valid parameters for the model | ||
invalid_kwargs = [x for x in model_kwargs if x not in valid_args] | ||
if len(invalid_kwargs): | ||
raise ValueError(f"'model_kwargs' contains non valid arguments: {invalid_kwargs}") | ||
return model_kwargs |
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,3 +1,3 @@ | ||
from aaanalysis.aaclust.aaclust import AAclust | ||
from aaanalysis.aaclust_plot.aaclust_plot import AAclustPlot | ||
|
||
__all__ = ["AAclust"] | ||
__all__ = ["AAclustPlot"] |
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
Binary file modified
BIN
+165 Bytes
(110%)
aaanalysis/plotting/__pycache__/plot_gcfs_.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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+630 Bytes
(110%)
docs/build/doctrees/generated/aaanalysis.plot_gcfs.doctree
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/004048c0cbb6684bdb9047282ab71735/aaanalysis-plot_settings-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/163aacac4bd235c9af7a62d7b4d0c89f/aaanalysis-plot_get_cdict-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/1f3abea1675a65bb341756c52c9927f4/aaanalysis-plot_gcfs-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/72c2e4be500ecf10c85a4e6f81c365fc/aaanalysis-plot_legend-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/795a736e5af756908120c8bda412fd28/aaanalysis-plot_get_cmap-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/88d7f3f7cb5a284c0bfaa377fb4ce1d8/aaanalysis-plot_get_clist-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/fb29bffb69140db4f68c4eb913c6f7d3/aaanalysis-plot_settings-1.pdf
Binary file not shown.
Binary file added
BIN
+27.5 KB
...l/_images/social_previews/summary_generated_aaanalysis.AAclustPlot_a1222522.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.