Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #38 #40

Merged
merged 8 commits into from
Apr 19, 2024
Merged

Fix #38 #40

merged 8 commits into from
Apr 19, 2024

Conversation

dlfivefifty
Copy link
Member

No description provided.

@dlfivefifty dlfivefifty changed the title logkernel defaults to complexlogkernel Fix #38 Apr 19, 2024
@dlfivefifty
Copy link
Member Author

@kburns

This now works:

julia> W = Weighted(ChebyshevT())
Weighted(ChebyshevT())

julia> x = axes(W, 1)
Inclusion(-1.0 .. 1.0 (Chebyshev))

julia> f = expand(W, x -> exp(x) / sqrt(1-x^2))
Weighted(ChebyshevT()) * [1.2660658777520084, 1.1303182079849703, 0.27149533953407656, 0.044336849848663776, 0.0054742404420936785, 0.0005429263119139354, 4.497732295427654e-5, 3.198436462529006e-6, 1.992124804817033e-7, 1.1036771880698548e-8    ]

julia> log.(abs.(0.3 .- x')) * f
-3.4376226814884023

@dlfivefifty
Copy link
Member Author

Here's a 10k by 10k sample from one interval to another:

lia> n = 10_000; @time logkernel(Weighted(T), range(2,3,n))[:,1:n]
  0.473830 seconds (26 allocations: 1.491 GiB, 3.24% gc time)
10000×10000 Matrix{Float64}:
 1.95976  -0.841787  -0.112778   -0.0201459   -0.00404855     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.95994  -0.841739  -0.112765   -0.0201424   -0.00404762      0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.96012  -0.84169   -0.112752   -0.0201389   -0.00404668      0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.9603   -0.841641  -0.112739   -0.0201354   -0.00404575      0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.96048  -0.841593  -0.112726   -0.0201319   -0.00404481      0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.96067  -0.841544  -0.112713   -0.0201284   -0.00404388     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
                                                                                                                       
 3.3598   -0.539088  -0.046253   -0.00529126  -0.000680973    0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 3.35991  -0.539069  -0.0462497  -0.00529069  -0.000680877     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 3.36003  -0.53905   -0.0462465  -0.00529013  -0.000680781     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 3.36014  -0.539031  -0.0462432  -0.00528957  -0.000680684     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 3.36025  -0.539012  -0.0462399  -0.00528901  -0.000680588     0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0

@dlfivefifty dlfivefifty merged commit 1b55e9c into main Apr 19, 2024
3 checks passed
@dlfivefifty dlfivefifty deleted the dl/fixlogkernel branch April 19, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant