File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function sampleindex(X::AbstractMatrix, r::Real; obsdim::Integer=defaultobs)
5
5
0 < r <= 1 || throw (ArgumentError (" Sample rate `r` must be in range (0,1]" ))
6
6
n = size (X, obsdim)
7
7
m = ceil (Int, n* r)
8
- S = StatsBase. sample (collect ( 1 : n) , m; replace= false , ordered= true )
8
+ S = StatsBase. sample (1 : n, m; replace= false , ordered= true )
9
9
return S
10
10
end
11
11
@@ -87,9 +87,7 @@ Returns a `NystromFact` struct which stores a Nystrom factorization satisfying:
87
87
"""
88
88
function nystrom (k:: Kernel , X:: AbstractMatrix , r:: AbstractFloat ; obsdim:: Int = defaultobs)
89
89
S = sampleindex (X, r; obsdim= obsdim)
90
- C, Cs = nystrom_sample (k, X, S; obsdim= obsdim)
91
- W = nystrom_pinv! (Cs)
92
- return NystromFact (W, C)
90
+ return nystrom (k, X, S; obsdim= obsdim)
93
91
end
94
92
95
93
"""
You can’t perform that action at this time.
0 commit comments