« first day (2326 days earlier)      last day (2697 days later) » 

12:05 AM
Hello everyone
I am trying to implement this formula in matlab, but am not sure whether I am interpreting it correctly.
$D_{i,j} and R_{i,j}$ are both 4x4 matrices
How should I interprete the part inside the red square?
 
Looks almost like standard matrix multiplication. Do you remember what that looks like in indices/matrix elements?
 
are matrix D and R being multiplicated using matrix multiplication. Or are the elements(m,n) of each matrix being multiplicated?
 
You're summing over $m,n$ so it's not just direct multiplication.
 
So result = D*R
And then the sum of all the elements of "result"?
 
You'll need to clarify what you mean by that.
One thing I will tell you: that sum is not the same as $D_{i,j} R_{k,l}$
 
12:09 AM
@Semiclassical Should I first multply both matrices, i.e. D and R which will give me a result x. And then sum up all the elements of the result matrix x?
 
oh...
that is how I understood it. And which doesn't give me a correct result...
 
(it's almost that matrix multiplication I just said, but there's a small issue)
 
Any genius reasoning as to why $\frac{1}{r^2}\frac{\partial}{\partial r}(r^2 \frac{\partial \psi}{\partial r}) = \frac{1}{r}\frac{\partial^2}{\partial r^2}(r \psi)$, one of things things you blindly work out knowing it in advance, but going from left to right by inspiration is the question
 
Well, what does matrix multiplication look like?
 
12:11 AM
@Semiclassical well that's some multiplication in a specific order with sums.
 
Yes, but which some? There's an important detail.
I guess I should check---are either of those matrices symmetric?
 
@Semiclassical have you seen the image on p12?
because thos subscripts only refer to the matrix itself not its elements.
@Semiclassical yes they are both 4x4 matrices.
 
I didn't ask if they were square, I asked if they were symmetric.
i.e. if either matrix is the same as its transpose.
 
@Semiclassical no because they are derived from images.
 
okay. Then the detail I'm getting at is important.
 
12:13 AM
chances that this will ever happen are very small.
 
What's the definition of matrix multiplication in terms of the matrix elements of the two matrices?
(though I guess I don't get why you're trying to do this via matrix multiplication. direct summation according to the formula also works)
 
@Semiclassical I am just trying to apply the formula...
nothing more so far.
I am not sure how to interprete the formula that was my initial question.
@Semiclassical I thought there was a multiplication. $D_{i,j}R_{k,l}$ represents a matrix multiplication, right?
 
Written like that, yes.
Written as they have it, not quite.
 
@Semiclassical how so?
I am referring to the part I indicated with a red box for the moment.
 
Write out the definition of matrix multiplication. This is an issue that can't be remedied unless you do that.
At least, not if you want to do so in terms of matrix multiplication.
However
 
12:18 AM
@Semiclassical I don't know the official definition of matrix multiplication. This is how I do matrix multiplication: mathsisfun.com/algebra/matrix-multiplying.html
 
Alright. Suppose I take a generic row of a matrix $A$; it'll look like $[A_{i1},A_{i2},\ldots,A_{iN}]$
 
can matrix multiplication be thought of like the following: jam the vector (1,1,1....) through matrix one, then jam the result through matrix two.
?
 
@Semiclassical ok
 
And I take a generic column of a matrix B. That'll look like $[B_{1j},B_{2j},\ldots,B_{Nj}]^T$
 
@Semiclassical yes.
 
12:21 AM
If I take the matrix multiplication AB, then $(AB)_{ij}$ (the (i,j)-th element of that) will be the product of those two vectors
(i'm assuming the matrices are N by N, for clarity)
 
seems logic so far.
 
@Null "jam the vector through the matrix" means what exactly?
 
More precisely, $$(AB)_{ij}=A_{i1}B_{1j}+A_{i2}B_{2j}+\cdots+A_{iN}B_{Nj}=\sum_{k=1}^N A_{ik}B_{kj}$$
 
ok
 
That last sum is what defines matrix multiplication.
So if I wanted to take the product of the matrices $D_{i,j}$ and $R_{k,l}$ (for some choice of $i,j,k,l$ )
Actually, to make things easier to distinguish, I'm going to use a slightly different prescription than they are.
 
12:26 AM
okay
 
For the labels of D and R, I'll use Latin letters (as I just did) i.e. $i,j,k,l$
 
mhm
 
For the elements of these matrices, I'll use Greek letters e.g. $\mu,\nu,\rho$
 
k
 
okaly
I'd then write the $(\mu,\nu)$-th element of that matrix multiplication as $$(D_{i,j}R_{k,l})_{\mu\nu}=\sum_{\rho}(D_{i,j})_{\mu,\rho}(R_{k,l})_{\rho,\nu}$‌​$
 
12:28 AM
for info: I am still following and trying to swee where you are going.
 
@arctictern Is $AB\cdot \vec{v}$ the same as $A\cdot (B\cdot \vec{v})$ ?
 
Is my last equation displaying correctly for you? It's not showing up right for me.
 
@Semiclassical did you see they wrote $m,n$ for both equations?
 
@Null Yes, (AB)v=A(Bv) holds for nxn matrices A,B and nx1 column vectors v.
 
@Semiclassical nope But I can understand it.
 
12:29 AM
I did. That's part of what my complaint is.
hrm
$$(D_{i,j}R_{k,l})_{\mu,\nu}=\sum_{\rho}(D_{i,j})_{\mu,\rho}(R_{k,l})_{\rho,\nu}‌​$$
There we go.
You'll notice two things. First off, there are two free indices $\mu,\nu$. That reflects the fact that we took a product of matrices and got another matrix.
 
they wrote $(D)_{m,n} (R)_{m,n}$ not $(D)_{m,n} (R)_{n,m}$
 
Right.
That's why it's not the same as what they write---the order is off.
Now, there's a simple fix for that.
 
So? How should I nterprete their formula?\
 
Namely, to swap the order of the indices is the same as trading $A$ for its transpose $A^{T}$.
i.e. $A_{\nu,\mu}=(A^T)_{\mu,\nu}$
 
@Semiclassical Actually I don't want to modify anything. I suppose what they wrote is fine, I just want the correct interpretation please...
 
12:33 AM
Almost there.
 
because so far my result is incorrect
it should always give something between 0 and 1.
@Semiclassical ok
 
The first part of the fix amounts to the following: $$(D_{i,j}R_{k,l}^T)_{\mu,\nu}=\sum_{\rho}(D_{i,j})_{\mu,\rho}(R_{k,l})_{\nu\rho‌​}‌​$$
That's supposed to be the matrix transpose in there. Not sure why it's so ugly.
 
@Semiclassical but why do you want to fix it?
 
So that what they write will be matrix multiplication?
 
noo
I don't want that.
I just want to understand properly what is written there....
 
12:36 AM
Well, actually. What I should say is: It's not that I want to -fix- their result.
 
nothing more.
 
It's that I want to say what matrix multiplication it actually represents.
Buuuut maybe that's a distraction.
Here's the bottom line on what they wrote, then.
 
@Semiclassical thx
 
When you're doing that calculation, you have a specific block in mind, i.e. a specific set of $i,j,k,l$ that you're interested in.
Yes?
 
@Semiclassical yes D is one block and R is another block respectively designated by i,j and k,l (cf page 12).
 
12:38 AM
Right. So for the purposes of the present calculation, they really don't matter---let's just call the matrices $D$ and $R$.
 
ok
 
So now you've got that combination $\sum_{mn}(D)_{m,n}(R)_{m,n}$
 
yes
 
What that means is: Suppose I pick some pair of (m,n)---say, (m,n)=(2,4).
I look up the (2,4)-th elements of each matrix, and multiply them together.
I do that for every such pair of m,n. I then add all of those together.
Note that there's no matrix multiplication going on (or at least, we don't need matrix multiplication to describe what's happening).
This is just plain old summation.
 
ok so exactly what I said 30 minuts ago: chat.stackexchange.com/transcript/message/34144692#34144692
right?
 
12:42 AM
Depends on what you mean by multiply.
It's not matrix multiplication in that case.
It's element-by-element multiplication.
 
@Semiclassical What I mean: $D_{1,1}*R_{1,1} + D_{1,2}*R_{1,2}+ ...$
 
Sure.
 
-____-"
 
If I hear 'multiply two matrices' I assume it's the second one, not the first.
 
unfortunately my issue is still not fixed. There is something in this formula I am not doing correctly.
 
12:45 AM
That said, you -can- implement the above sum in terms of matrix multiplication. Namely, it's equivalent to $\operatorname{trace}(DR^T)$
That's where I was leading. :/
 
@Semiclassical I am not going to start modifying stuff if I can't even implement this basic formula correctly.
 
Fair enough. How are you implementing it with matlab right now?
I know matlab code well enough, so the summation is enough.
 
@Semiclassical yes: pastebin.com/krSbzHHM
I don't know if this gives you any clue?
This part only calculates alpha.
 
Hmm. That looks like it should work.
 
you saw it so quickly?
it does work. But the result is incorrect.
 
12:50 AM
Well, I mean that the summation looks fine.
 
It should be between 0 and 1
 
Doing some computations out loud (for my sake)
 
@Semiclassical sorry?
 
ignore that.
I'm trying to see if it's obvious that $\alpha$ should be between 0 and 1 regardless of what the matrices R, D are.
 
@Semiclassical mhm. Well according to the paper $\alpha =[0,1], \alpha E R $
 
12:55 AM
Hmm.
 
where E = "element of " and R = real numbers.
on page 12 (2) at the bottom.
 
Let me make sure I've got the variables identified right.
 
I don't know a lot neither, just read that paper nothing more.
 
First sum in the numerator is sumDR, second is sumDomain*sumRange
How do you compute sumDomain and sumRange?
 
@Semiclassical yes that is the part that I indicated with the read square.
@Semiclassical as I said that is a subset of some code. I do it the following way: sum(sum(X))
 
12:58 AM
Hmm.
I see that's how you do the stuff in the denominator too.
sum(X) on a matrix maps its rows to the row-sums?
Seems to, judging from documentation. So that seems sound.
 
>> x = [1 2 3 4 ; 5 6 7 8];
>> sum(x)

ans =

6 8 10 12
 
yeah. and then summing that again gives the total sum.
 
indeed.
 
That suffice for everything but the terms with N_s^2 in that formula.
 
@Semiclassical what do you mean?
 
1:02 AM
I mean that it works just fine for stuff like $\sum_{m,n}A_{m,n}$
But not for stuff like $\sum_{m,n}A_{m,n}B_{m,n}$.
 
what do you suggest?
 
Well, what you've done right now seems like it 'should' have worked.
 
but?
 
First thing to check, I guess, is whether those nested for loops are summing correctly
e.g. it works if you plug in simple 2-by-2 matrices.
Alternatively, I can see a way to dispense with those for loops.
namely, you can implement element-wise multiplication by A*.B
so you can implement $\sum_{m,n}A_{m,n}B_{m,n}$ as sum(sum(A*.B))
without doing for loops or anything.
actually, I notice one thing.
 
@Semiclassical yes?
 
1:09 AM
you compute that first term in the numerator by doing
` dKwadSum=0;`
` dKwadSum = double(dKwadSum).^2;`
` dKwadSum = sum(sum(dKwadSum));`
 
@Semiclassical doesn't change anything.
 
But, shouldn't that second line use domainMat not dKwadSum?
plus, you're asking it to do multiplication using "." i.e. matrix multiplication. That's not how I read the formula.
 
@Semiclassical yes I think you re right!
@Semiclassical no?
 
No. I read it as the sum of the squares of the elements, not as as the sum over the elements of the matrix products.
Ugh, element-wise multiplication is A.*B not A*.B
 
@Semiclassical yes noticed it.
 
1:15 AM
My current suggestion would be: To implement the first sum in the denominator, do sum(sum(domainMat.*rangeMat)). To implement the first sum in the numerator, do sum(sum(domainMat.*domainMat)).
doing .* does element-wise multiplication of the matrices, and then the double sum finishes it.
 
@Semiclassical did what you suggested but there still seems to be something wrong...: pastebin.com/UAqZz987
 
Hrm. Still not between 0 and 1?
 
@Semiclassical nope :/
 
Siiigh.
What are you using as your test input, and what outputs is it giving?
 
domainMat = [28 28 28 28; 28 28 28 28;28 28 28 28;28 28 28 28]

rangeMat = [157 157 157 158; 157 157 157 159; 154 156 158 154; 157 157 155 156]

sumRange = sum(sum(rangeMat));

sumDomain = sum(sum(domainMat));
@Semiclassical ^
 
1:23 AM
mmkay. Outputs?
 
@Semiclassical alpha(1) = 7.8081
 
What about the individual sums?
Those seem like a better clue.
 
@Semiclassical
sumDR = 4080
sumDsumR = 1122688
dKwadSum = 4080
ADenum = -1057408
sumDKwad = 200704
 
Hm!
N=4 here?
 
yes
 
1:28 AM
going to do some calculations offline, brb
Some odd things I'm not understanding.
 
@Semiclassical like?
 
You've got $D_{mn}=28$ here
 
@Semiclassical where?
 
That's what you said in your domainMat specification. I wasn't finished, though.
 
oh ok, sorry starting to feel tired. it s 3am here and I need to get up in 2hours and a half...
 
1:33 AM
so I'd expect to get $\sum_{mn}(D_{mn})^2=\sum_{mn}28^2=4\times 4\times 784=12544$
But what you got for sumDKwad is 200704, which is 16 times larger.
(I know there's the N^2 in the formula, but in your code it isn't incorporated into sumDKwad directly)
and, um, starting to feel tired? And I thought my sleep schedule was bad :/
 
@Semiclassical
Actually,

domainMat = [28 28 28 28; 28 28 28 28;28 28 28 28;28 28 28 28]
sumDomain = sum(sum(domainMat));

sumDomain equals 448.
which looks OK to me.
 
sumDomain seems fine.
 
oh yes yes.
 
But not sumDKwad
 
@Semiclassical well it takes the power 2 of the sum of the elements. so $448^2 = 200704$
which seems OK to me.
 
1:38 AM
bah, you're right.
I was misreading.
 
dKwadSum is th left part of the denominator and sumDKwad the right part.
@Semiclassical no problem.
 
It's dKwadSum I think. Lemme make sure.
 
@Semiclassical The only possible cause I see which is left is that there is somehting wrong with my input.
what do you think?
 
just to check:

`domainMat = [28 28 28 28; 28 28 28 28;28 28 28 28;28 28 28 28] ;
sum(sum(domainMat.*domainMat))`
That gives 4080 for you?
 
@Semiclassical yes it does.
 
1:44 AM
huh.
what about domainMat.*domainMat by itself?
 
@Semiclassical [255 255 255 255; 255 255 255 255; 255 255 255 255; 255 255 255 255]
 
i.e. what matrix is it actually computing? should be a 4-by-4 matrix of 28^2=794.
...28*28 = 255 ??
 
@Semiclassical valid point...
 
seems like it's somehow doing integer multiplication with the wrong type?
hmm, this looks relevant:
3
Q: Why does my array in MATLAB saturate at a value of 255?

sariThis is my code: arr = zeros(fx-10,1); frm = frams(x).cdata; for k=1:fx-10 for i=1:10 for j=1:fy arr(k) = arr(k)+ abs(frm(k+i-1,j)-model(i,j)) end end end Why the array receive only up to 255 value? I try to define: arr = zeros(fx-10,1,'int64'); and ...

 
@Semiclassical very strange: pastebin.com/9m4MnYk8
@Semiclassical I ll have a look.
 
1:49 AM
Basically, it looks like it's treating that array as being UINT8 rather than DOUBLE
to fix that, simplest solution seems to be to enclose the initial matrix with DOUBLE(). (or put decimals in, i guess)
 
@Semiclassical yup
 
Now, there's one issue I can see with the D you've picked: It looks like the two terms in the denominator would be equal in that case. I think it's because D doesn't contain any variation.
 
@Semiclassical indeed I think this is the issue I am facing now.
alpha = NaN
 
Right.
But that's not so surprising: You've picked an image block without any variation at all
And the algorithm may not be well-defined in that case. Plus, in a real image you'd have some variation in any case.
So add some noise to your D and it shouldn't give NaN anymore.
FYI, you also had sumDR=4080 in your earlier output. So the same UINT8 issue was probably showing up there as well.
 
@Semiclassical it is 3am now. I ll go have some sleep. Thank you very much for your help! I ll try to fix everything tomorrow (in a few hours).
 
1:57 AM
glad I could be of help!
It's 8pm here, so I'll probably be around in a few hours.
 
well I ll keep working on it in 7 hours and in18 hours.
 
Ah. Won't be around for the former :)
 
haha ok no worries :). Thanks!
 
np. get some sleep
 
Hey all! Soft question - I've been taking undergraduate mathematics courses, many of which are introductory, and I've been doing quite well at them. However, I've found that when I try to read textbooks on my own, I can't seem to justify everything to myself -- many things seem to be assumed which appear trivial, but I always feel concerned that I can't seem to prove them.
At what point should I "move on" in a math textbook? Is it good to keep going and circle back?
 
2:07 AM
If it isn't broke don't fix it re: I've been doing quite well at them
 
@Pissedofflayman - I like that philosophy. Thank you
 
One instance of this was in Velleman's How To Prove It -- he made the assertion that P(y) <=> y \in {x | P(x)}. Would that just be by definition?
 
dunno the book, sorry
 
No worries. thanks :)
 
2:14 AM
This is the sort of question that makes me groan: math.stackexchange.com/q/2060726/137524
It's an honest question, but I doubt it's going to lead anywhere interesting.
 
I appreciate how you responded to it @Semiclassical :) very tactful and considerate
 
Math doesn't always find its applications in Physics, but Physics always uses Math as one of its tools.
Indeed, great link.
 
2:32 AM
Could someone of you take a look at the edit part of my question: math.stackexchange.com/questions/2060579/is-the-set-convex ?
 
2:46 AM
Starry starry night ^ ^^^^
 
Holy holy night?
 
the way you prove things in physics is different than the way you prove things in math so how can you invoke Godel's theorems
 
3:03 AM
in fact, if you google physics proof, you won't get one
 
@Joris I am interested.
@MickLH I liked both the songwriting and the quality change, thanks for showing me that. Sorry for vanishing.
@Joris How much algebraic geometry do you currently know?
 
4:08 AM
@Akiva i quite enjoyed "el telepuertomatico". :P
 
@ZachHauk That is kind of stalkerish
(It was a project for Spanish class I did the night before it was due. I think I got a B+.)
 
@AkivaWeinberger i was watching this video about topology
and i saw "columbus8myhw) in the comments
 
4:28 AM
@ZachHauk What video
 
4:40 AM
in The h Bar, 4 mins ago, by DanielSank
Important question: "algebras" or "algebrae"?
 
May 13 at 22:51, by Akiva Weinberger
Disappointed that the plural of algebra isn't algebrae
 
in The h Bar, 5 mins ago, by Pissed off layman
formulas or formulae @DanielSank
:-)
 
5:21 AM
Holy Holy shit - Does this mean holiest among the holiest shit?
 
wet wet liquid
 
dry dry desert
 
freezeezy peak
 
icy ice
 
pretty sure that's not a classic video game level
 
5:35 AM
classic classical
 
sad thing is, I can remember the music to both dry dry desert and freezeezy peak
(though the shiver mountain music trumps both of them)
 
I can remember the music from every level of paper mario. never played banjo unfortunately.
 
banjo was good
but the music from paper mario, maaan
N64 had some good tracks.
You ever play Tetrisphere or listen to its soundtrack? @arctictern
 
nope
 
sigh
listen, and understand: youtube.com/watch?v=Ls8iFqLnvRo
 
5:39 AM
psyched for new old original crash bandicoot
 
One can not mention "bango" without this
 
5:53 AM
did you play thousand year door
 
yep
can't find the disc anymore :(
 
i like it way more than the orig
 
vivian was transgender in the japanese version
 
yea i remember this
poor girl. bedlam was a bad sister
 
i like the humor of the second one better
 
5:55 AM
beldam :)
 
but the music of paper mario had some gems
 
damn I really messed that up?
 
The moment I remember most clearly was when you 'beat' the boss of the one halloween-type level the first time
 
glitzville was my fave chapter by far
ahaha, for pigs the Bell tolls
 
You've beaten the boss, gotten the reward, so everyone clears out of the room...
ah, yeah
...but the camera stays.
"man, this is sure taking a while..." pushes a button out of impatience, boss jumps back up "wait, what?!? oh....ohhh."
But yes, Glitzville
 
5:59 AM
first half of that chapter is painfully dull but that twist was golden
 
hell yes
 
too bad you can't go back and fight prince mush
 
train chapter was ok, pirate chapter was golden
 
^
Disappoint
 
yes :[ i went through the ranks again even
 
6:00 AM
same
first time around, beating the champ is a hard fought victory
second time? a glorious stomping
Train chapter definitely had its moments.
 
beat bonetail?
 
yeah.
almost certainly had a lot of items :P
 
nerve-wracking fight, knowing it took hours just to get to it, with no save blocks
 
Yeah. the final boss for that was pretty crazy too
Paper Mario goes full eldritch horror :)
Though the boss fight in the pirate chapter was sweeeet
The moon chapter...eh. not my favorite.
 
moon chapter was strictly better when you were controlling peach lol
 
6:03 AM
yeah :/
Though the actual moon-shot was pretty good :)
I'm trying to remember all the chapters, though, and I'm struggling.
 
my only real complaint is that chapter 2 is so boring and kills all the momentum you had
2 is boggly woods
 
moon chapter of PM:TTYD - can breath in space
episode 4 of noki bay in Sunshine - need a goldfish bowl on head to dive deep
 
^^^
The diving levels in Sunshine were fun
 
got very disoriented in boggly woods first play-thru
 
Oh, boggly woods
 
6:05 AM
100 coins levels sucked
 
yeah. meh.
psh, 100 coins nothing. -blue- coins were the worst.
 
blue coins were fun
really liked the hotel one
 
hotel was kinda frustrating at times
 
and the bit wh remyiu gor Yoshi
where you got
 
I really liked the setup for the boss fight at the hotel
i.e. you show up, everything's messy and the hotel is gone
ask the manager what happened...and it shows up from the sea.
craaazy times ahead.
 
6:08 AM
piantissimo is actually the running man from zelda
 
I'm forgetting who that was (piantissimo)
Was he the one you had to race?
 
yup
obnoxious prick
 
yeah, skinny dark-skin guy wearing purple pianta mask
 
mostly I remember it being really frustrating to get 100% on Sunshine
And there were some infuriating moments. remember the pachinko machine?
 
6:12 AM
Is ln3 transcendental?
 
yup
pachinko was fun
 
i hated it. the physics didn't work at all.
 
you would
 
hence controlling it was just a total pain
 
i loved the classic levels
 
6:13 AM
plus, if you missed all the landings and hit the bottom you lost a life and had to start over
loved the sprint nozzle or whatever it was called
 
turbo
 
there we go
 
needed more use
 
yeah, it did
i loved the one mini level where you just had the straight shot to the end with the turbo nozzle
 
playing path of radiance again right now
 

« first day (2326 days earlier)      last day (2697 days later) »