Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycroscopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vasudevan, Rama K.
pycroscopy
Commits
bf97c377
Commit
bf97c377
authored
8 years ago
by
Chris Smith
Browse files
Options
Downloads
Patches
Plain Diff
Added allowed methods to cluster class
parent
8adefbc7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Decomposition and other stuff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pycroscopy/io/translators/be_utils.py
+1
-1
1 addition, 1 deletion
pycroscopy/io/translators/be_utils.py
pycroscopy/processing/cluster.py
+5
-2
5 additions, 2 deletions
pycroscopy/processing/cluster.py
with
6 additions
and
3 deletions
pycroscopy/io/translators/be_utils.py
+
1
−
1
View file @
bf97c377
...
...
@@ -18,7 +18,7 @@ from ..io_utils import getAvailableMem
from
..hdf_utils
import
getAuxData
,
getDataSet
,
getH5DsetRefs
,
linkRefs
from
..io_hdf5
import
ioHDF5
from
...viz.plot_utils
import
plot1DSpectrum
,
plot2DSpectrogram
,
plotHistgrams
from
pycroscopy
.processing.proc_utils
import
buildHistogram
from
..
.processing.proc_utils
import
buildHistogram
import
h5py
#%%############################################################################
...
...
This diff is collapsed.
Click to expand it.
pycroscopy/processing/cluster.py
+
5
−
2
View file @
bf97c377
...
...
@@ -32,12 +32,15 @@ class Cluster(object):
*args and **kwargs : arguments to be passed to the estimator
"""
allowed_methods
=
[
'
AgglomerativeClustering
'
,
'
Birch
'
,
'
KMeans
'
,
'
MiniBatchKMeans
'
,
'
SpectralClustering
'
]
# check if h5_main is a valid object - is it a hub?
if
not
checkIfMain
(
h5_main
):
raise
TypeError
(
'
Supplied dataset is not a pycroscopy main dataset
'
)
if
method_name
==
'
FeatureAgglomeration
'
:
raise
TypeError
(
'
Cannot work with
FeatureAgglomeration just yet
'
)
if
method_name
not
in
allowed_methods
:
raise
TypeError
(
'
Cannot work with
{} just yet
'
.
format
(
method_name
)
)
self
.
h5_main
=
h5_main
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment