Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scikit-learn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Ian Johnson
scikit-learn
Commits
4098883f
Commit
4098883f
authored
10 years ago
by
alex
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: symeig->eigh
parent
bd0b93e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sklearn/manifold/spectral_embedding_.py
+3
-3
3 additions, 3 deletions
sklearn/manifold/spectral_embedding_.py
with
3 additions
and
3 deletions
sklearn/manifold/spectral_embedding_.py
+
3
−
3
View file @
4098883f
...
...
@@ -8,8 +8,8 @@ import warnings
import
numpy
as
np
from
scipy
import
sparse
from
scipy.linalg
import
eigh
from
scipy.sparse.linalg
import
lobpcg
from
scipy.sparse.linalg.eigen.lobpcg.lobpcg
import
symeig
from
..base
import
BaseEstimator
from
..externals
import
six
...
...
@@ -286,10 +286,10 @@ def spectral_embedding(adjacency, n_components=8, eigen_solver=None,
if
n_nodes
<
5
*
n_components
+
1
:
# see note above under arpack why lobpcg has problems with small
# number of nodes
# lobpcg will fallback to
sym
eig, so we short circuit it
# lobpcg will fallback to eig
h
, so we short circuit it
if
sparse
.
isspmatrix
(
laplacian
):
laplacian
=
laplacian
.
toarray
()
lambdas
,
diffusion_map
=
sym
eig
(
laplacian
)
lambdas
,
diffusion_map
=
eig
h
(
laplacian
)
embedding
=
diffusion_map
.
T
[:
n_components
]
*
dd
else
:
# lobpcg needs native floats
...
...
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