#numerical-analysis
1 messages · Page 22 of 1

Well, 8da is at work right now
It's okay.
You are smart enough 😀
My first question is I know there is upscale happening in encoding.
But why we there are four outputs? 😕
So a model output is produced at each scale level
Do you remember how the loss formula calculated the loss using all four scale levels
Why they choose to do this, I cannot answer
Yes, Gradient Descent.
So, Will it calculate gradient descent in last three outputs and update the parameters.
After that we will get final output.
Not sure
@brave crypt Would it be possible for you to help me? 😀
I'll probably be here and there in about 4 hours or so. Are you talking about the same pdf you posted earlier? (I might take a look earlier if I have some downtime at work)
Yes, The same PDF.
Thank you very much 😀
Also, If you can help me to figure out this formula then I would be grateful to you 😀
Can you repost the pdf?
does parallel computing allow things like using givens rotation in jacobi method to be theoretically reduced from O(n^2) to O(n) per sweep?
well acctually no
because u would need n processors or smthn lol
idk how many processors those supercomputers have
oh damn 100k processors
fajitas

Hey sorry I was testing something.
I do wanna ask something. Suppose I had a third order tensor $T \in R^{n\times m\times p}$ with slices along the first mode $T^{(i)}$.
Is running svd on each slice equivalence to running svd on a block diagonal matrix with block diagonals as the slices?
Recall that the eigenvalues of a block diagonal matrix are the eigenvalues of the diagonal matrices.
fajitas
So you're asking if you have $X=U_1\Sigma_1V_1$ and $Y=U_2\Sigma_2V_2$ then does $\begin{bmatrix}X&0\0&Y\end{bmatrix}=\begin{bmatrix}U_1&U_2\end{bmatrix}\begin{bmatrix}\Sigma_1&0\0&\Sigma_2\end{bmatrix}\begin{bmatrix}V_1\V_2\end{bmatrix}$?
黏土人
This is true
fajitas
Why do you think it wouldn't be the case?
Eh I just was thinking about block diagonalization. In hindsight the thing I was describing isn't true in general since the singular values of Y could all be smaller than those of X lol
ah so ur goal is to map the tensor into a larger 2d array
Be careful about losing some structure
The first layer is still a layer?
My boyfie and I see no reason there wouldn't be one
cool that doesnt add much complication
but since theres no weights
the first layer would just be a^(1)+b^(1)
unless theres weights?
but the weights would depend on previous layer but there is none
they don't depend on previous layers since there are none,
so how is weights relevant, like how would you apply the weights on the first layer
To the input
wdym "rank projection"
what you wrote there gives you a rank X_k + rank Y_k (assuming X_k and Y_k lin indep), but it really just stacks the two matrices in a larger one, not as diagonal blocks
it's just a big SVD (again assuming independence; otherwise, it isn't even an SVD)
for block diag, you'd have to do some projections onto the null spaces of the opposite blocks
By rank projection I mean that when you use the truncated svd with rank=k it's a projection onto the set of matrices of rank-k matrices
But hmm this is interesting. Any idea where I can read about the latter of what you're talking about? Specifically the part about projections onto the null space of opposite blocks
i'm a lowly engineer, so my references will reflect that
chapter 4 in that seems to explain it ok
4.2.1 and 4.2.2
Don't put yourself down like that, this is good thanks
oh, i think in your case the projections can be done by just appending 0s to the singular vectors
this is unfortunately still wrong, but the fix should come from putting the U and V matrices in a block diagonal form as well
$\begin{bmatrix}X&0\0&Y\end{bmatrix}=\begin{bmatrix}U_1&0\0&U_2\end{bmatrix}\begin{bmatrix}\Sigma_1&0\0&\Sigma_2\end{bmatrix}\begin{bmatrix}V_1^T & 0\0&V_2^T\end{bmatrix}$
Edd
so im trying to figure out stuff
heres my summary of forward pass or whatever its called
if u see something wrong let me know lol
and this is the backward pass or backprop
wait i didnt finish writing this
gradient w.r.t. what?
this notation is cursed
lol
the target
yea
i think i figured where im wrong
so - x^T y + total derivative(f(x))^Ty
(1/2)f^t(x)f(x)
yeap
nice thanks
now im just wondering a few things
u can probably figure out an explicit or recursive formula for each component of grad f?
and also is the method i outlined the way the basic NN works or no
ic, is it possible to give like an example? say you solved the w's 2nd last layer, how do you get to the 3rd last layer
i'll link you to something
the important part is to be able to (sub)differentiate the activation function
Backpropagation, short for "backward propagation of errors," is an algorithm for supervised learning of artificial neural networks using gradient descent. Given an artificial neural network and an error function, the method calculates the gradient of the error function with respect to the neural network's weights. It is a generalization of the d...
that and "automatic differentiation" are what you want
you would never do it by hand for something with more than 2 or 3 layers and just like 6 variables per layer lol
i see, thanks for the help!
also i just want to ask im not misunderstanding anything in the notes i wrote right?
for the most simple case of backprop with arbitrary number of neurons in each layer
looks ok to me
also i just wonder do u conventionally call the first layer the input layer
or is that the 0th layer, and im assuming the input layer has no weights and bias?
input layer sounds right
can maple return the general term of a succession given a few inputs?
idk if terminology is ok
Sorry to take over with another question (I don't know Maple well enough to answer). So I'm wondering if anyone knows Posits (https://posithub.org/docs/Posits4.pdf for reference), and specifically knows about two properties: (1) is it true that if the bitwise representation of posits is strictly increasing within a given bit sign (i.e. positives are strictly increasing, as are negatives)? (2) is there an accepted algorithmic approach for adding Posits? Cause I discovered a weirdly cool property of Posits that allows me to "reconstruct them", but only sometimes it seems like. Any help / thoughts would be appreciated: I can go into more detail on (2) if anyone's curious, still working out the math
so i have this function and points
and im being asked to find this
since n =3 we have the fourth derivative right
how would i go about finding the maximal value of that
Can you compute the 4th derivative
Yes
well yeah find critical pts and stuff
how would I go about the fast route through mathematica without having to build a silly sign chart
Ok
So first D[1/(1+x^2),{x,4}] computes the 4th derivative
Or
f[x_]=D[1/(1+x^2),{x,4}]
Then you do
MaxValue[{f[x],-4<=x<=4},x]
And this spits out your answer
For future questions about using mathematica #computing-software
anyone know a good resource to learn matlab for linear algebra
Does anyone have any pretty pde simulation videos lying around
I'm giving a brief talk about pdes to a bunch of incoming first years
And I think having some pretty animations would be nice
Is anybody able to help explain stability analysis in a little more depth with me for a couple of differential equation methods as i'm real confused about them, so there is a differential equation, f''(t)+10f'(t) + 21f(t) = 0, and i was wondering how do i distinguish between whether the following are stable for it, so Explicit Euler, Implicit Euler, Heun Method, 2nd Order Milne, and RK4 Runge-Kutta Method
I may be in the wrong place im not 100% sure
Do you know which type of stability you are considering?
Just selecting which numerical methods are stable for the linear ODE given dt=1/3
@quiet sparrow can help
Thanks for getting somebody who can help!
I hope thats a joke
what would be a joke?
Lecturer has taught about 20 different numerical analysis for differential equations and has killed everyone off with it
He expects us to be able to do a theoretical exam on it when 95% of the examples are coding examples

Im struggling in my own numerics class
You need to check whether h lambda for all lambda of your differential operator lies in the stability region of the method
This is the part which is catching me out lol, I dont really understand the ordinary part of this course
the partial part is fine, ordinary on the other hand
can i continue to ask u abt this, i got confused at one point
nvm i got it
it is hard to code
at least from scratch
what was it
ah
yeah you probably shouldn't code it yourself
especially not automatic differentiation
regular backpropagation, you can do it yourself for small models
depending on how much sanity you have

Is anyone familiar with doing statistics on non-Euclidean data?
What do you mean by non-Euclidean?
@wide spear let’s say I have some points that I know are sampled from a 3D manifold. Can I compute the goodness of fit for the hypothesis that they were sampled from a torus?
Or maybe I have a distribution over a space X which carries a G-action. Can I do a hypothesis test for whether the distribution is G-invariant?
Yeah these sound possible
You might need to rederive some formulas
For the second one you’ll hope that X has a norm or metric
The context I’m interested in for the second is L^2(G) for a locally compact abelian group G so that’s a non-issue
There’s some moderately obvious things to do, like define a test statistic that measures the deviation of x_i from the mean value across the orbit of x_i under G (which will be zero everywhere iff the function is invariant to G)
But this seems like the kind of thing there’d be literature about, I would think
I’m having a lot of trouble finding things because Google likes using a very different meaning of the word “group” in the context of goodness of fit tests lol
And searches involving “symmetry” are bringing up symmetrical distributions over R^k
For the first one, can't you embed your manifold in R^4
I don't know anything about manifolds
@wide spear Yes, all manifolds can be embedded in R^k for some k. In fact, it can be embedded in R^3 (that’s what it means to be a 3D manifold!) but the problem is that such an embedding is not isometrically isomorphic.
It’s pretty easy to make two points arbitrarily close in R^k but far apart on a manifold.
Nope 😛 if it were algebraic topology and differential geometry wouldn’t exist as fields
Oh rip
They’d be called “geometry” and “calculus” respectively
dont you need like R^7 or smt
idk anything so i shouldnt talk but isit possible to "fatten" up each point and compute like its simplicial homology or smt along those lines


Hi, I have a question considering second derivative of Newtons interpolation polynomial (with constant differences)
This is probably a better question for calculus section but nvm
How did they get that 1/h^2 in Pn''(x)?
why maple sucks so hard
can someone explain me this pls?
It was working before, and suddenly it gives me this error
like wtf
nvm, i closed maple and opened again and it works
what a shiit
You can ask about maple in #computing-software
oh
I don't think anyone actually uses maple. It seems like a ponzi scheme

PandaMan-AMB
ignore this I got it
can someone help me with neural net math

im looking for how to optimize a step in back prop
What do you mean by optimize
its very computation heavy
Right
like ill send u a summary of the method i use
NNs are very computationally intensive
there was like no dependency on d
except for 1 part
so wonder if I have to iterate the same thing nonstop here
sorry for bad hand writing i might tex soon, but the relevant part is page 3 last bit
i see but i guess maybe im missing something i can do to shorten the last part
"possibility to shorten computation here" since only the $\delta^{(m-1)}$ differs per varying d
Anticipation
You can try to figure out how pytorch implements backprop
ah ok thx
btw the last layer
is the rectifying function no longer the sigmoid right?
or whatever that maps to (0,1)
or do you even need a rectifying function for last layer
For the last layer?
yea
I guess it depends on what sort of network you have
Like if you have a binary classifier
You won't want a sigmoid
ah that makes sense
So it depends on the problem
but im also confused about the middle layers, like ReLU doesnt seem to make sense
since it doesnt map to (0,1)
but the neurons should take values btwn (0,1)?
Why do the neurons need to take values between 0 and 1?
Yeah
A common thing, batch normalization, is incompatible with values between 0 and 1
Because it normalizes so that the mean is 0
And sd is 1
that makes sense then
thanks!
i guess i got 1 more question for now
so how do you deal with functions that r like binary classifiers as last layers, or those that are flat piecewise
assume derivative is 0 everywhere?
but that looks sus
For binary classifiers you usually output a probability between 0 and 1
generally you use softmax to force everything between 0 and 1, and also have the probabilities of each class sum up to 1
ah ok, makes sense
thanks!
so basically various form of output have different method of remedy, and perhaps they r heuristic?
Yeah you can use different functions in different situations.
i am struggling to find relevant code
it is ok tho ill try look elsewhere

Does this mean that this method gives 3 roots at the same time? I'm confused on the multi-point iterative method.
Are x,y,z different roots of the function?
so what does multi-point method mean?
because i found this paper that "solves for multiple roots of nonlinear equations"
Ohhh okay yeah they mentioned multiplicity a lot
got it thank you!
nice this is a package in C?
i will just try to find the algorithm and try translating it in Matlab
thanks for the resource
when coding the numerical solution for Successive over relaxation for an altered version of Helmholtz' PDE, is there a good amouot iterations that i should expect? i got around ~~101 for a coefficient of w=1.5, on an Nx x Ny = 21 x 21 grid
is this a lot for the size and differential type?
What error tolerance
I have to implement a boundary value method, which is equivalent to solving a system such as
$
y0 = Y_0\
y_{n+1} - 2hCy_n - y_{n-1}=0\
y_N - hCy_N - y_{n-1}=0
$
where each $y_i \in \mathbb{R}^m$ for some m
Nicky
C is a matrix.
Obviously, i could easily implement it by writing out the mn linear equation, but this leads to a massive but sparse system. I was wondering what the best way is to implement this in python. the only way i can see it happening right now is to solve this system, but i was wondering if theres a better method, given the 'nice' relation of the equations
Try SuperLU
Included in scipy
You precompute a sparse LU decomposition of C
Then use it whenever you need to solve
You can also try conjugate gradient which might be faster, depending on the condition number
If it’s in python all of these will be in scipy
So you don’t need to implement anything
what does the LU decomposition give me exactly?
i see but how does that solve my issue?
You were wondering how to solve your linear system right?
hm, well if implement the mn matrix, its no problem
ok let me reformulate the question
so i have N linear equations
but each equation is m dimensional
is there a way to implement this without 'expanding' everything and creating the Nm dimensional matrix and then solving it
like, is there a module which i can enter a matrix with higher dimensional entries to solve the system
You matrix will be a band matrix right
yes
as i was saying
Ok so you have $u_{xx}+u_{yy}=f(x,y)$
主要场景进行
Have you discretized it
badly most likely but yes
How did you discretize it
Central FD for the 2 partials and then left f as f_i,j
ya in the form L+D+U ?
works similar to GS by shortening no of linear eqns?
Ive implemented a little bit of code for solving the diffeq
but im not sure about it at all
mainly bc it took 101 iterations instead of around 75 as expected
Oh
101 iterations instead of 75
Hmmmm
Are you using the optimal relaxation parameter
how so?
What does 4+a^2 represent
a rearrangement of the discretisation
Can you elaborate
each CFD leaves -2f_[i,j]
but has a a^-2 multiplied by each
so -4a^(-2)f_[i,j]
then the f_[i,j] has left too
so factorise it
Ok so the centered difference you have is $f_{i-1,j}-2f_{i,j}+f_{i+1,j}$ and $f_{i,j-1}-2f_{i,j}+f_{i+1,j}$ and all of these are multiplied by $h^{-2}$ right
主要场景进行
ya
So you factor out 1/h^2?
essentially
then f[i,j] = 1/(4+h^2)*(...)
Are you using the right norm
Ummmm
its extremely new content to me
Is the number of iterations important
Tbh 101 iterations versus 75 is not that big of a deal
not really no, but im not sure it even yields a correct solution
hm?
Tbh this sounds like a code debugging issue
Which I am very bad at
I dont even understand half of that stack lol
Have you checked that all the signs are correct
i believe so
Yo
I have an ellipse in 2D space
And I want to find the semi minor and major axes
I did:
S = [X',Y'] % Nx2 matrix
c = cov(S) % covariance matrix
[V, D] = eig(c) %V-columns are eigenvectors with corresponding diagonal entries of eigenvalues in D
And I get
Directions are correct, but how do I get the length of semi and minor and major axis?
Those eigenvalues don't say much
Or maybe I don't know how to interpret them
I'm looking for a tight matrix $A\in R^{m \times n}$ norm inequality.
I know between the nuclear norm and frobenius norm $||A||_* \leq min(m,n) ||A||_F$
And between frobenius norm and Manhattan norm $||A||_F \leq ||A||_1$
Anyone know if a matrix norm inequality tighter than $||A||_* \leq min(m,n) ||A||_1$?
fajitas
I think identity matrix achieves the equality right?
Is there conjugate-gradient like methods for arbitrary functions/convex functions? that converges in a fixed iteration and does optimal work in each iterations
is this an okay place to ask about finite differences method?
I'm curious about the optimal h explanation
I have found some explanations on google but they use much much more technical language than I'm equipped to deal with
$error(h) = \left|f'(x_0) - \frac{\bar{f}(x_0+h) - \bar{f}(x_0-h)}{2h}\right| = \left|f'(x_0) - \frac{f(x_0+h) - f(x_0-h)}{2h} + \frac{\delta(x_0+h) - \delta(x_0-h)}{2h}\right| \le \left|f'(x_0) - \frac{f(x_0+h) - f(x_0-h)}{2h}\right| + \left|\frac{\delta(x_0+h) - \delta(x_0-h)}{2h}\right| \le \frac{h^2M_3}{12} + \frac{2\epsilon}{2h} = \frac{h^2M_3}{12} + \frac{\epsilon}{h} := g(h)$
jan Niku
so we assume that both the function itself and the derivative are bounded by M and epsilon
<@&286206848099549185> 
Yeah
CG for arbitrary functions is too OP
So if we specifically consider linear systems
Any Krylov subspace method will converge in a fixed number of iterations
For A a n by n matrix and b in R^n then after n iterations the Krylov subspace will include all of R^n and then it will give the correct value
However, CG converges very quickly, much faster than something like gradient descent
However, the solution is not exact until the Krylov subspace spans all of R^n
"Optimal direction and optimal distance algorithm" sounds like it would have a name though
However, because of floating point error, you don't need all n iterations
Even GD doesn't do optimal direction/distance
I just meant optimal direction as in along the gradient (locally optimal). I guess you could call it "gradient descent with exact line search" (I was hoping for a shorter name though)
Gradient descent is locally optimal
I've heard about people doing crazy stuff like adding a threshold t to the singular values of the hessian to make each singular value positive. Can't say if this is non sense or not
yea not sure how that works lol
There's a lot of modern optimization theory
It's all very complicated
And technical
Hello
Well, do you know what dilation does
I found it from this blog: https://www.inference.vc/dilated-convolutions-and-kronecker-factorisation/
These are my notes on an ICLR paper from this year: Fisher Yu, Vladlen Koltun (2016) Multi-scale Context Aggregation by Dilated Convolutions Whilst I wrote this note I also became aware of this paper: Shuchang Zhou, Jia-Nan Wu, Yuxin Wu, Xinyu Zhou (2015) Exploiting Local Structures with the Kronecker Layer...
Ok sure
And do you understand the formula
The notes you linked seem quite comprehensive
I am sorry, I don't understand.
Nope. I am sorry.
Read through this: https://towardsdatascience.com/understanding-2d-dilated-convolution-operation-with-examples-in-numpy-and-tensorflow-with-d376b3972b25

can someone take a look at this slides, so they broke proving power method for symmetric matrices in 2 stages, 1. show if converge then converge to eigenpair, and 2. to show it converges
I feel like the first part proving that if power method converges, then it converges to eigenpair, is redundant?
cuz I think the second part seems to proved that it converges to the eigenpair already
(unless I didn't figure out that it used first part implicitly)
Could someone help me implementing the algorithm in this pdf? https://www.researchgate.net/publication/264422777_Image_Reconstruction_from_Legendre_Moments You can scroll a bit down to see it, not much to read
Hello everyone, I am new here. I am struggling with an assignment and was wondering if anyone has ever used chebyshev collocation in Python to solve Ordinary Differential Equations. Any help by chance?
If it's a coding question, then #computing-software or the CS server or the Python server
Is it a theory question?
The python server is quite extensive
Hi is anyone familiar with 2 phase flow in 1D and how to implement the solution? This paper gives the solution but I'm having trouble grasping how to implement the solution, S(x,t).
specifically, I'm having trouble evaluating the integral in 3.10
Iceberry do you know what it means for something to be ill-conditioned with respect to perturbation?
Aethos do you know what delta t is, because I don't
delta is just a constant I believe
yes
Ok so you have your function S(xi,t) which you integrate with respect to xi from 0 to x
yes but S(xi,t) is dependent on xbar which is the part I find confusing
How so?
I cannot evaluate xbar because I end up with an expression like
xbar = some function of xbar
What is the expression for S(xi,t)?
it is equation 3.13 with x substituted for xi
So wouldn't it be partial xi bar partial xi?
I believe it would be partial x bar partial xi
x bar is a function of x, no?
yes but I dont think substitution of x for xi applies to xbar
But it doesn't make sense to write x bar as a function of xi I don't think
Anyways
Integrating 3.10 using the expression given in 3.13 is circular
Because they're the same thing, just rewritten
so how would you go about implementing S(x,t) ?
because partial xbar partial x requires me to first evaluate xbar wouldnt it?
You don't have another expression for S(xi,t)?
I don't think I do, all the expressions are in the screenshot I sent
And what are you trying to implement?
yes
You know that $\phi(\bar{x},t)=e^{ax}$
鬼怪
And you have the expression for phi(x-bar,t)
Given in 3.12
So given x and t, you can solve for x-bar
It'll be a bit messy so you'll need to do it numerically
how would I do that numerically? That may be a bit out of my skillset
So you have given x and t
And you want to find x-bar
Have you heard of newton's algorithm?
I have not
wouldnt I need to evaluate xbar to get an initial guess?
hmm okay, so I would do something like
fsolve( phi(xbar ,t) - e^ax, 0)
Modulo some coding details, yes

Anyone good at Macaulay2?
Im trying to figure out how to make a generic upper triangular Matrix
#computing-software probably
Ty
Hey mate
I understood what deep dilation does.
But I am still unable to grasp this formula.
Would you please, please help me?
Give me 4 hours
Ok
I'm sorry it's been 5 and a half hours
Ummmm
I think this is a bad dilation convolution formula
See section 1 of this
The formula you've posted comes up in 1d signal processing
And is closely related to a dilated convolution in CNNs
But conventions are different
So it's weird
@balmy grotto you should read LeVeque's Numerical Methods for Conservation Laws
I think it will answer your questions
How do I show a finite difference scheme is conservative and consistent
Do you know what it means for a scheme to be consistent
See sections 12.1 and 12.2
@wide spear Thank you for your help.
I know I should search this on internet.
But would you please help me to know what F, l and K is here.
l is the dilation factor
F is your input
k is the convolution filter
Unless it's the other way around
If might be F filter and k input
Yes
p is the p-th entry of the output
Got it.
So, It's basically applying different convolutions on the input and summing up.
@wide spear
s is an index of the filter and t is an index of the input
I guess this is the correct place to ask
Victor H
I have this recursion and I want to find the time complexity of it; I'm suspecting exponential
So what I've thought of so far is: it's linear time complexity to find the max of n numbers
However, every call to p(n) requires me to calculate p(n-i)
How would I set up the recurrence formula?
[
T(n)=n*\sum_{i=1}^{n}T(n-i)
]
Victor H
Like this?
for part b) when they say p_0 when x = 0 does it mean at the origin point (0,0,0) so i can let x,y,z = 0
redd yes
Victor wouldn't that be n^2?
You don't need to recompute p(n-i) every time
You can store the values
So you have n steps
And at the i-th step you have i work
So it's like n^2/2
Ok so you want to recompute p(n-i) everytime?
Ah ok
Is my recurrence formula correct?
Ok you do it in reverse
No wait
Wait 1 to n is fine
Yeah 😄
Wait why do you multiply by n
Don't I need to find the max
Wouldn't that be adding n work
Yes you're so correct
Ok so it would be n+sum
Victor H
That looks fine I think
Can I apply Master's theorem?
No I don't think so
Lol rip
The biggest of the rippest
I don't think I can use this
Rip
Oh nice
I'm looking for an MCMC algorithm with the following properties
It needs to sample 2D distribution, and I would rather not have rejects
I.e. I'm looking to sample a distribution and I need the points to not be repeated
and if they are repeated, I can discard them without statistical impact
I read the sections over and over and i'm suffering huge from imposter syndrome
no
Oh
the excercise is supposed to be self contained
I thought about that, but I don't think I can take conditional samples
And I was thinking about MH for each, but it would have to be for each condition right
The 2D space is dependent
MH also has rejects, which you said you were trying to avoid?
So let me describe the problem
This is very much not my area of expertise
Er okay, I'm basically seaching for something based on distribution of previous knowns
in a 2D space
so MH repeats would repeat the search, which is useless
and if I discard the rejects it impacts the statistics of it
Hmmmm actually
Yeah I thought about it and probably the gibbs sampler will work
data -> histogram -> spline -> normalized
can get dependent distributions
that should be sufficient, correct?
Yes that seems sensible
I'll give it a shot
Hmmmmm so I'm generating my histogram
what's the best way to determine the width of it
Variable width maybe?
Yeah I like that idea

Actually no that's terrible

I was thinking like a 4d gradient threshold
but that makes no sense
DON'T FUCKING LAUGH AT ME
AAAAAAAAAAAAAAAA
Ok
is bounding $(\frac{\partial ^4 }{\partial x^4} + \frac{\partial ^4 }{\partial y^4} )f$ proper?
KurtDee
I just want to make sure there are no gaps
What do you mean by proper
I see
there will probably be gaps in my data, so I need to choose a stepsize that's appropriate
Sure
I'm thinking the 4th derivative should be a good benchmark, but the form I have is like uhh
I dont even know how to describe it
it's not $\nabla \cdot \nabla ^3 f$
KurtDee
Wait why do you need to specify a stepsize?
Like if you're using matplotlib
I think it can pick a good bin size
So I have this data that I'm going to histogram, and with the histogram I'm going to spline it to approximate the distribution
Oh I see
matplotlib.pyplot.hist2d
I wanted to describe it mathematically, but perhaps getting the solution first is more important
Yeah it describes bins as a default param
Wait if you have 2d data
And want to recover the surface
Why don't you just put a cone
At each point where you have a point
Like gauss map it?
hmmmm yeah that would give me a distribution
hmmmmmmm'
I mean if the radius is big enough
And then at the end you normalize it
it will be sufficiently smooth
I thought about that before but yeah maybe
it would make normalizing easier
Like
Your histogram -> spline idea isn't bad
But I have concerns about how sensitive it is to small perturbations
True
Like
You don't want a slightly different bin size to result in a very different interpolated function
Ughhhhhh fuck
Aight think of this
I get the gauss/cone map
Log scale that shit
adjust radius as needed

Is this a test
past year
Ok
I know A_t represents the total factor productivity but cant seem to get my head round how to get it
Waaaat
Oh rip
how can i know if an image has been "painted"?
like, if it has a blue-ish color overlapping it or something
idk how to explain sorry
better with an example
this one has blue overall
while this one doesnt
Like monochrome? My guess is that it lies some linear subspace of RGB
For example, grayscale is the subspace t(1,1,1)
(R=G=B)
it is not monochrome
Oh hm
on the blue one, if u add the oppsosite color of blue on the color wheel (i think is orange-ish), the pic will get same colors as the one below, let me photoshop
What do you mean by "add a color"?
i calculated the average color of the picture, i inverted it, and i...
overlay? idk the name of the fussion mode in english sorry
blending* modes
i think it is called lighten
I guess I mean more like a mathematical formula for "adding a color"
no, is overly
i dont want a formula to apply this
i wanna know how can i know if a photo has a color overlaying
Like the first one, it has blue
But if you don't have a formula for how you got that blue picture, I don't know what is the relationship of the original to the blue one
that i wanna remove the blue color
but i need to know how can i know if a pic have this, like a main color
when it shouldnt
mmmm
is it?
imagine i have a lemon
and i paint it red
cant i remove the red excess?
It sounds like you might be interested in digital image processing
you have 2 options here. one of them is to do it rather arbitrarily at the behest of a user (e.g. you), who says they want to do something specific to an image
another is to do it in a data driven fashion, since there is no good model for this. you need to check reference images to discover what happened to the coloring/lighting and undo it
this is a pretty challenging inverse problem to solve "optimally"
i wanted to make this happen on an script :/
So i cant manually say "this yes" or "this no"
this is a so-called "inverse problem". not all of them can be solved, for starters. and you need 2 out of 3 of (input, transformation, output) in order to be able to do something
only very special problems can be inverted from just the output, and you still need "prior knowledge" of at least some properties of the input and the transformation
sad q.q

but a blue-ish image has same amount of channels than the original :/
Sure
But you can't tell if that's how it was taken
Or if it was edited
Consider a car
Each model of car comes in multiple colors
If you are given an image of a car, how can you determine if it was edited?
but i can see if the picture overall has been edited
How
If I give you a blurry image, how do you determine if it was blurry when it was taken or if it was blurred after with a filter?
look at this one
do u think it was original or it has some blue added artificially?
No clue
How do you know how much extra blue there is?
well, i dont know how much extra blue does it have
If you don't know how do you want a computer to know
i mean, it can do the average color of the image and then overlay the opposite color :/
Why is this the correct thing to do?
The image is very blue/green
So the average will be blue green
And then if you subtract blue green
if i had the answers i wouldnt be asking 🙂
Then you won't have much color left
You're trying to automate something that can't be at this point in time
I mean
into this
You can with human intervention
You pick a point that you know should be white
but i want it on a script
Well, you know that the wing should be white
well, i can pick the most white pixel on the purple one
and assume it is white
mmm
actually
You don't necessarily want the most white pixel
actually, im thinking
i can turn purple image to gray, then pick the 128 gray value, and see what color does that pixel have on the purple image, and that tone of purple is the one that has been used to paint the image?
cuz maybe if i know what purple color has been used, and what should be white, i can undo the paint
can i?
there is no optimality in what you're proposing
it's very much the same as the first approach i listed
someone (you) makes stuff up and applies it to the image
no
i am trying to find a pattern that can be automated so the computer does itself when ever it is needed
first i need to detect if an image has been painted or not
this pattern has to be learned from somewhere
and then, undo the paint
you would need like a physical simulation of the whole sensor setup
i am under the impression you are not ready to understand why this problem cannot be done easily
xd
you should read about inverse problems
i mean, i dont care if it is easy or not, coding is not the problem. I wanna know if it is possible, and if so, how
the easiest way out of this one is machine learning with hundreds of thousands of example images
dammit i wanted to avoid this
xD
cuz i am doing this cuz it will be the input of another NN
x)

but what dantalion has been saying cannot be avoided. there are multiple inputs that will give the same output, because in some bases coloring an image in blue is something you want to undo, but in others, this blue hue is the actual ground truth
i mean, i could for the first pokemon generations
this is a really bad problem
If you know what it's supposed to be, fine
but as long as u get further, there are less pokemon images
you are still misunderstanding what the problem is
but it seems this is a case in which you know input AND output
i.e. 2 of the big 3 things (input, transformation, output)
Then it's a matter of pattern matching
and then MAYBE it can be done
my principal goal is to guess that is this pokemon
on a nn
but with this colors it thinks it is a finneon
( a fish )
so i need to give it the correct colors
but since idk the pokemon, i cant restore it 🙂
i would suggest you do it in black and white, then
because you won't be able to recover the color
ive though, but the model is already pretrained (the data set used to train it is no longer available) and i couldnt manage to find a big image dataset of each pokemon, so i couldnt train it on my own
You know the trick about applying transformations to images to get more data right?
Like
You can rotate each image
And then treat those as separate data points
You can rotate each image 360 times....
for pikachu i have 100 while for meltan i have like 8 (?)
so i also have inbalanced data set
😄
thats why i went for an already trained model
I assure you there are more than 8 images of meltan online
but the data set used on that model is gone from kaggle 🙂
sure but i am not gonna google image for each pokemon and download 100 manually
xD
you can additionally take each image and each of its rotations and input it after modifying its colors
this will augment the data set immensely and teach the network that color doesn't matter
no, i wanted to remove the purple 🙂
well, good luck
the sad part is, you could actually remove the purple if you already knew what the pokemon is
so this is something that could be done at the output of the network that classifies lol
but not before
not enough info for that
^
would you understand better if i explained it to you in spanish?
no
u are saying i could paint it correctly if i knew what pokemon it is. And i am telling u the NN needs it to be correctly painted in order to classify it. So it doesnt help
that's only the last part. i mean, to explain to you why it is that you won't be able to just blindly correct the color
well, dantalion already explained that as well
so all i can say is good luck
Like
You're trying to do something
And if you could do it accurately and efficiently
i mean, i know why i cant go from BW to color
Then you would easily put adobe out of business
cuz RGB = (100,0,0) -> BW = 33 is the same as RGB = (0,100,0)
but in this purple thing, i still have the 3 channels, so i was wondering if i can somehow bring to life the RGB values hidden by the extra amount of purple 😦
the short answer is no
🔵 🔴
it's like me asking you right now which of those two circles is the original
just like that, with no other context
asdasda but on my purple image u see different pixels with different brigthness
doesn't matter
i can choose the closest one to white, and assume that one is white, like dant said
That is very much not what I said
o.O
lol
u said i need a white pixels and substract it (?)
.
but you need to know it was white BEFORE it was colored in
This is not necessarily the pixel that is closest to white
yes, thats what i say
in other words. the network needs to have already classified the image to know what it contains
i pink, on the purple image, the wing as white color
and say that one was white before the coloring

