jliang993 / Faster-FISTA

Source codes for paper "Faster FISTA" and "Improving FISTA: Faster, Smarter and Greedier''
MIT License
36 stars 9 forks source link

Matlab version #2

Closed tym0027 closed 5 years ago

tym0027 commented 5 years ago

Hey!

Great work on this repo.

I am using Matlab 2018Ra and when I run the code I get the error: Undefined function 'wthresh' for input arguments of type 'double'.

And when I check which wthresh function is being used I get: 'wthresh' not found.

Where did you get this function from?

Thanks! tym0027

jliang993 commented 5 years ago

Hello,

Thanks

wthresh is a built in function from MATLAB wavelet toolbox, basically it's doing soft/hard-threshold. You can replace ProxJ = @(x, t) wthresh(x, 's', t); with ProxJ = @(x, t) sign(x) .* max(abs(x) - t, 0);

This should solve the problem.

-Best

794363172 commented 10 months ago

Hello, I want to modify the threshold function in the wavelet packet threshold method, the original threshold function is
y=sgn(w)*(|w|-t)

    tmp = (abs(x)-t);
    tmp = (tmp+abs(tmp))/2;
    y   = sign(x).*tmp;

You want to change the threshold function to
y=sgn(w)* [|w|^2-t^2]^(1/2) How to convert this mathematical function into matlab language If you see any questions, please reply, I would appreciate it!

jliang993 commented 9 months ago

Hi there,

I didn't quite get your question, but for y=sgn(w)* [|w|^2-t^2]^(1/2) the corresponding MATLAB command would be y = sign(w) .* sqrt( max(w.^2-t^2, 0) )

794363172 commented 9 months ago

Thank you. I understand. Recently something did not log in GitHub, did not see the message, I am very sorry. Thank you so much for answering my questions. I really appreciate it  

22考研杜博文 @.***

 

------------------ 原始邮件 ------------------ 发件人: "Jingwei @.>; 发送时间: 2023年11月27日(星期一) 晚上7:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [jliang993/Faster-FISTA] Matlab version (#2)

Hi there,

I didn't quite get your question, but for y=sgn(w) [|w|^2-t^2]^(1/2) the corresponding MATLAB command would be y = sign(w) . sqrt( max(w.^2-t^2, 0) )

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>