royiavital / stackexchangecodes Goto Github PK
View Code? Open in Web Editor NEWCodes related to answers on StackExchange Network.
License: Other
Codes related to answers on StackExchange Network.
License: Other
great code
but do you have code for ridge/lasso regression with non -negative coefficients
when data is sparse one hot data and data matrix is very big?
for example data matrix is
1 0 0 0 1
0 1 0 1 0
0 0 0 1 1
etc
for example for FISTA solver?
Hello.
I actually want to achieve the same result as the Black/White adjustment from photopea and I saw your answer on StackExchange. I also have implemented my own version using what ivan Kuckir said but using yours or mine implementation I don't have the same result as Photoshop/Photopea. For example you can try to decrease all the cursors to -200 and let just 1 or 2 to 200: I used [-200; -200; -200; -200; 300; 300; -200]
Using your code I actually do something like:
img = im2double(imread("my_image.jpg"))
coeffs = [-200; -200; -200; 300; 300; -200]
normalized_coeffs = (coeffs - 50) / 50 % or 100 because Ivan Kuckir say to map in [-2.5, 2.5]
o_img = ApplyBlackWhiteFilter(img, normalized_coeffs);
imshow(o_img)
I actually understand the logic behind the code but there is one thing I don't understand:
Why the cursors goes from [-200, 300]. So going from [-200, 300] to [-2.5, 2.5] as Ivan Kuckir said makes the transformation affine (y = ax + b) and not linear (y = ax). So it means that negative values will impact less the image than positive value as the range is not centered around 0?
I understand the logic of the code, because, according to the code, each pixel will be impacted by 2 weights and if Dk
is x for an activated weight then it will be 1-x
for the other activated weight.
I post here because I don't have enough reputation to add a comment on StackExchange
Hi, I read your answer on stack exchange and I managed to implement fast conv2d with fft using rust.
Thank you for the amazing answer.
However, I ran into some problems when I tried to implement full conv2d. I can't find the correct way to pad the image.
When conv2d is on valid mode, the image needs no padding, because the result is the same size as the image.
When conv2d is on full mode, the result is (image_width + kernel_width -1) * (image_height + kernel_height -1)
.
Then how do I pad the image? Can you help me with this? Thanks!
Hi, I have seen your implementation of guided filter kernel in https://github.com/RoyiAvital/StackExchangeCodes/blob/9492a719968c88e0ce4952be8d2c43a6ae37d664/SignalProcessing/Q42415/ApplyLocalLinearKernel.m#L1
. Thanks for your wonderful work.
Have your thought about implementing guided filter with multiple guidance image?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.