text:
12:01 AM
@0celo7 what do those acronyms stand for?

@StanShunpike Look up Briggs-Meyers personality test.

Ah, that thing. I know about that. I was like an uber extrovert
Is this ur AP psych class? My bro is a psych major.

Yeah

12:32 AM
@0celo7 Myers-Briggs is total BS
that's the physicist in me scoffing at the social "sciences"

@Sean True, but Minnesota costs money.

1:03 AM
@0celo7 I've taken it a few times & got ENTJ twice and INTJ once. So I'm not really sure how intro/extro-verted I am, but I do seem to be Intuitive, Thinking & Judging

@KyleKanos Really? I took you for something counterintuitive

Psychology is a fun subject :-)
A great mix of applied biology and philosophy.
No need to scoff @Sean ;-(

1:28 AM
@NeuroFuzzy Hmm, well the internet can do that, I think.

How can we do integrals on a manifold? I am reading Bernard Schutz's book on GR and he talks about doing this.
I just don't get how we know we can do integrals on a manifold. Given all the complexities with differentiating on a manifold, why can we integrate like this along one of the coordinate lines?

1:48 AM
@Sean Which they sometimes deserve no doubt, but I thought even psychology understood that Myers-Briggs with BS.
It's just something AP psych teachers love, because it involves a worldview that's simple and easy to grasp, yet just complicated enough to make it seem worth studying.

@ChrisWhite My teacher admits that Myers-Briggs is too simplistic. We learn about the Minnesota test, which has ~500 questions and is constantly tweaked, but it costs money so we can't feasibly take it.

Free is good :-)

@StanShunpike Well, the simple answer is forget there's a manifold at all, since your coordinate chart means you can consider yourself to be on $\mathbb{R}^n$

The better answer -- Carroll covers this -- is to really understand what each symbol means

1:52 AM
Stole the words from my fingertips

for example, the d is the exterior derivative, the final x^1 is a scalar function on the manifold, dx^1 is therefore a 1-form, etc.

How do I make a landscape Word doc?

@0celo7 Use latex :P

@ChrisWhite I need pictures tho
Also I figured it out

Honestly, I have no idea. Ever since Office changed from menu-based to picture-based navigation, I've never been able to find any features.

1:55 AM
@0celo7 Click the orientation button

@KyleKanos I looked everywhere but that place
Then I asked and found it immediately

@0celo7 You didn't check with MS Office support? Why?

@0celo7 What I really want to take some day is one of the psych tests administered for people in sensitive positions -- the kind that are supposed to stress you out and see if you hold up.

I know someone who interviewed for the NSA once, and they gave something like that clearly designed to catch you in a lie.

1:57 AM
@ChrisWhite Coming from a family rooted in government service, all clearances work that way.
In the military they ask you if you have performed or have received oral sex.
It's against the UCMJ to do so.

@infinitesimalsimplicio Sodomy is also illegal in the military, obviously. Although that might be changing.

Talk about out of context >8(
You go in the military to kill people. Nothing else.

I hope you're kidding.

Have you seen Stripes?

2:01 AM
During war.
No @StanShunpike

@infinitesimalsimplicio Yeah, I'm gonna have to go ahead and, uh, disagree with you here.

I meant during war only

Even during war, that's not true
You're talking about one specific subset of "military"

Exactly

There's a bigger superset that is involved in not killing people

2:04 AM
True

And not everyone joins the military to legally kill people
They do it for other reason (money, for one)

But they just provide support

That depends on your definition of "support"

Bullets

That...does not compute

2:05 AM
Do people die in war?

Usually, yes.

I know that bullets kill people, but I asked for your definition of "support." You responded with bullets

Providing bullets

The clarification of that word was in response to your statement that people provide support by joining the military
Do you even know how the military functions?
Like any siblings or close relatives in the military?

2:08 AM
Yes.
Most died in action.

Perhaps you should ask the survivors how the military functions

@KyleKanos You a vet?

They don't care about "function " only the loss

@0celo7 No, but I've got 2 brothers in the military, one who served for 6 years, and several cousins both active and served
Plus a few uncles, most of whom went to Vietnam

@KyleKanos My father served in Vietnam.
My parents and godparents served. By extension, virtually all close family friends are military or former.

2:11 AM
My father was in the military during Nam, but his duties involved training helicopter pilots State-side, so he did not go over with his brother (who flew helicopters over there)

I didn't mean to offend your military background. @KyleKanos
I still feel the loss.

2 hours later…
4:33 AM
Are flags reviewed just by moderators or by any community members with enough points?

Yep, +10ker's
for chat flags
iirc :-)

@StanShunpike some flags are only reviewed by mods, but I forget which ones
Certainly at least custom flags for moderator attention

Are there custom chat flags for mods only @DavidZ?

I think so, but again I'm not sure. Actually I never handle chat flags.
Y'all are too well behaved :-P

4:46 AM
^^amusing
from my friend in Penn State's SPS

But is it really always a wise thing to say?

I guess "clever" is not necessarily the same thing as "wise"
but I'm sure there's some proverb about that

I'm not so sure about the "clever" part either.
So according to that, during our interactions with people we should spend most of our time doing nothing, right?

Yeah, but I bet a lot of people would benefit from moving closer to saying nothing than moving away from it

True.
If you factor in body language it makes more sense, I think.

5:12 AM
Is there a way to use tensor products to describe the Riemann curvature tensor? Just curious.

6:12 AM
You can definitely express it as a linear combination of tensor products of lower-rank tensors, but that's true of all tensors
If you're asking whether the curvature tensor can itself be expressed as a tensor product of other tensors (or other meaningful tensors), that I'm not sure about. But I'd guess no.

1 hour later…
7:17 AM

4 hours later…
11:33 AM

Lol, an old question of mine just randomly got downvoted (?)
That has never happened to me before. Late upvotes are more common :P
@infinitesimalsimplicio ?? lol
@0celo7 Yes, a little bit! My course on diffgeo actually focused a bit on this---using Frobenius' theorem
@0celo7 Take the differential at the identity, I'm pretty sure.
@StanShunpike Its the point of the notation that is packs a lot into a small space
@StanShunpike Any law in tensor form is true in all coordinate systems---that's one of the most important motivations

12:14 PM
@Danu I came up with the same program myself, so I think that is correct and makes sense to me.

12:31 PM
@Danu Do you know what the standard basis for sl(2,C) is? I first thought the Pauli matrices, but the algebra is 6-dimensional.
@Danu Perhaps the Pauli matrices and then i times the Pauli matrices...although they are not linearly independent.
Ah, I recall from previous studies of the Lorentz group that this is correct, with a factor of 1/2 in front of everything.

12:54 PM

@Danu What's funny?

That I found it by googling "basis of sl 2 c"

@Danu I'm sure you know that sl(2,R) != sl(2,C).

Didn't look at the contents

1:24 PM
@0celo7 $L_+^\uparrow$ is some restricted Lorentz group? But, anyway, you obtain the algebra homomorphism as the derivative of the group homomorphism. In general, the adjoint group action $BAB^\dagger$ is $ba+ab^\dagger$ (for $a,b$ generators of $A,B$) infinitesimally, it has to do with some version of the BCH formula, I think.
@0celo7 Complexifying the algebra often makes things easier without significantly changing the rep theory, by the way.

I'm always amazed by questions that I figured nobody would look at and might get closed as off-topic and then they get me a ton of rep when I answer them

1:42 PM
@ACuriousMind Algebra homomorphism? Is it not guaranteed to be an isomorphism?

@0celo7 For such covering maps, it should be an isomorphism, yes. But that doesn't change that the algebra homomorphism is the derivative (or, more precise, "induced map on tangent spaces") of the group homomorphism in general, regardless of whether one of them is an isomorphism or not.

Cool, thanks.

2:25 PM
arXiv papers titled "Comments on..." or "Response to..." are always a fun read.

@ChrisWhite I asked a question last year about a long chain of arguments. At least one or two papers have come out this year (which I have not edited into the question). One of the authors of one of the papers answered the question.
I also have read parts of this debate which has been going on for years.
And then there are the more "direct" fights such as this and this

2 hours later…
5:05 PM
0

I'm working on a program that has to do with adding sound waves on top of sound waves. Currently what I'm doing is simply an average of the two waves. So if I have wave A, and I want to write wave B 'on top' of it, every sample in the new A is equal to the average of two matching samples in the o...

off topic?

@DavidZ Looks like it could be asking about superposition of sound waves

I'm leaning towards off-topic because, while it is kind of physicsy with adding waves, it's definitely in the realm of audio engineering and there's probably scores of people on another SE that deal with exactly this problem

I feel like ultimately the person wants to do audio engineering, but since the question is phrased in general, with no reference to file formats or software, I'm inclined to classify it as physics.

@DavidZ Argh you deleted that answer just before I managed to post my usual "-1, don't feed the bears!" comment
Spoil sport

0

` Where can I learn about the functionality of motors and generators, so I can answer questions such as these? I need a good textbook that starts from the basics (eg faradays) then moves up with lots of questions. Can I also know if this is hard to pick up?

also off topic, I think
@ChrisWhite well the first sentence is "I'm working on a program..."

5:16 PM
@ChrisWhite in physics, we can simply play the two sounds simultaneously. That will add them together and won't decrease the volume of any individual sound. This question has to be taken in context of combining sounds in a software program, otherwise it is so trivial that it doesn't make sense
@DavidZ EE.SE?

I don't think EE deals with motors
but maybe I'm wrong?

@Jimnosperm The question the user wants to solve doesn't look like EE at all to me

Looks like an electric motor. electrical engineering works with them

It's a resource request correct?

@ACuriousMind true. Fair point

5:18 PM
It doesn't matter, anyway. The question is whether it's on topic here or not. We don't need to think about whether it's on topic on some other site.
(until there appears to be a consensus that it is off topic here)

This is a not even wrong question
you don't need to know about motors and generators to answer the questions

The question asks where to find resources to solve the question. Seems on-topic in a sense to me, although I think anything about Newtonian mechanic will suffice, so I'd be a duplicate of the book recommendations

FWIW I think that if a question asking for books showing how to do X is on topic, it also implies the question that directly asks how to do X is also on topic. And vice versa.

@DavidZ I disagree. One asks "What can I use to learn/find out how to do [X]?" The other asks "Do [X] for me"

@Jimnosperm ^ I agree with that

5:27 PM
^I agree with agreeing with that

^ I agree with chaining agreement in this manner

Lololol

Stan! You should have written "^ I agree with that" and started an infinite loop

Someone had to break the monotony :D
Are resource requests off topic?
I have found chat responds better than the actual SE.

@StanShunpike No, though I and a couple others put up the good fight to make them off topic.

5:37 PM
Yeah some ppl clearly don't like them

@StanShunpike I'm also in the "No" camp, but you win some and you lose some.
The"Yes" people effectively promised to keep them curated and maintained to maximize their value and minimize the basic incompatibility with the SE system. As far as I can tell they're mostly keeping up with the work.

I'm firmly in the "Undecided" category. And given the amount that this problem affects me, that's not likely to change soon

^ Seconded

Oh man
I just got flagged over at History of Science and Mathematics for "welcoming" a user in a way that is standard on PSE. The flag says that I was being too rude :\

@Danu Yes, we are a bit rude here

5:53 PM
@Jimnosperm I dunno if I'd say rude... more just bitter and jaded :)

@tpg2114 To a non-bitter and non-jaded person, they sort of appear the same
@Danu Your comment wouldn't have been rude if it were properly addressing the question. But given that it didn't, I'd say that added a "rush to judge" quality that increased rudeness above normal levels

@Jimnosperm It was a genuine misunderstanding :\
I somehow failed to read it properly

I know, but other people interpreted it differently

I improved my second comment to reflect it more clearly

6:21 PM
why do the histories of maths and physics get lumped in together in one SE? they are sometimes related, but generally quite distinct, aren't they?
oops, i mean history of science and mathematics. now surely they are distinct? or not?

Well Newton invented calculus to do physics
So there's some intermingling of science & mathematics

They aren't as distinct as you'd think
Math may not be a natural science, but it's still very scientific. And where else would you put it?
History of Math and Culture?

I'd separate History of Math and History of Science - these subject have occasionally intertwined, but are generally detached

They aren't broad enough independently to be their own SE site
Okay, science may be, but math isn't

That's my naive feeling. I'm quite interested in the history of science and of maths, but I haven't read much about the latter

6:30 PM
-12

Proposal: History of Science and Mathematics Can we just go ahead and make this site a site for the history of academics, it is much more general and would attract more people to this site.

There was a request to make it more general, but it was firmly rejected

was there a request to make it more specific?

Not that I can see
It seems like it was always about Science & Math

They do go nicely together

@Jimnosperm: Uh, that was spam: hayneedle.com/patio-umbrella-buying-guide.cfm

0

I'd like to point on the idea of question as a knowledge resource. It has come to my knowledge that understanding a subject, especially Physics, requires experience with as many questions as possible. Reading many solutions of expert members of the Physics site may indeed help many students t...

6:34 PM
@KyleKanos what was spam?

Honestly, I didn't even look at the link. Either way it'd be deleted

Yep

@KyleKanos If we're critiquing each other's LQ reviews, might I call on this one
The answer explains waveguides but the question is about how electrons carry signals through a cable

7

The options for Low Quality posts are No comment needed Commentary on another post A "Thank you" comment "I'm having this problem too" comment Different question than posted Link-only answer (and not spam) "This is a bad answer" does not appear on the list, so voting to delete such an answer ...

6:42 PM
You are saying that it doesn't fit with any of the choices?

I do not think so, no

It does fit with No Comment Needed

That, in my opinion, is to be used when someone else has already put the canned-comment in

It's not an answer to the question. It's an answer to a totally different question
@KyleKanos If someone else already put the canned comment in, then choosing the appropriate reason only upvotes the comment, it doesn't repeat canned responses

@Jimnosperm I know. But the act of it is saying Someone else already told them why it's being deleted, I don't need to do so again

6:45 PM
I use No Comment when I add my own comment in. If I can explain why I think it's inappropriate as a posted answer to the question, then I write that comment and select no comment needed, because I provided one already

I think if you have to write a comment that is explaining yourself, "Looks okay" is the button you need to press

2

Depends. A downvote should be the solution in the case the post is not useful. As in: It is technically correct, but isn't clear. It is technically correct, but is only a link or is of some other value. It is technically incorrect, but is of some value to the original question. Deletion is r...

Sure, be selective
Skip out on the +10 accepted answer
9

If a question is flat-out wrong on top of being exceedingly brief, in poor English, or whatever, by all means vote to recommend deletion. If it looks beautiful except for being wrong, I'd stick with downvotes and comments.

> If it looks beautiful except for being wrong, I'd stick with downvotes and comments.

But it's not even wrong

If it does not answer the question, then I do not see how it is anything but wrong

6:48 PM
Q: What's the square root of 2? A: Bananas are yellow.

Downvote, comment that it doesn't answer the question, move on with life

That's not even wrong, it's just not really an answer
Not answering the question is grounds to flag it as not an answer

And I somewhat agree

@innisfree There is a big overlap (also in terms of expertise of users) and the audiences for each separately are probably too small to justify a site.

If an answer is (a) asking a new question, (b) meant to be a comment on another post, (c) a thank you comment, (d) a "me too!" post or (e) a link only; then by all means flag it as not an answer

6:54 PM
@innisfree There's a lot for you to discover, then!

If the answer is just flat out wrong, then downvotes & comments as to why it's wrong are the necessary action

20

A bad or a wrong answer is still technically an answer. Moderators aren't here to judge the correctness of answers. That's what the voting system is for, so the right way to handle those is to downvote, edit, or leave a comment. The "not an answer" flag is for posts that are either completely un...

6

Other than off topic flags, there are several different types of flags that one can cast on a question, answer, or comment. What are each of these flags for? Question and answer flags: spam offensive/abusive/hate speech not an answer very low quality other Comment flags: rude or offensive ...

> Do not use this flag for anything that answers the question or represents a good-faith attempt to answer the question, such as wrong answers
(where this flag is the "Not an Answer" flag)

It also says use it for answers to completely different questions
The first bullet point of when to use the flag

With the caveat answers which just barely fail to address the question due to an honest misunderstanding

6:57 PM
@innisfree I think you're wrong about this. There really is a ton of overlap (of course especially between physics and mathematics)

How do you know the poster of that answer didn't misunderstand?

Talking about how EM waves travel through a waveguide when asked about how electrons carry signals through a cable is sufficiently unrelated

That's obviously debatable.

@danu there's certainly overlap between maths and physics - as @kyle noted, occasionally revolutionary developments in maths were motivated by physics, and vice versa - but the overlap between the histories maths and e.g. biology is tenuous.

I've answered a few questions (and commented on more) based on my misreading the question

7:00 PM
and even with maths and physics, most developments in maths have nothing whatsoever to do with physics.

@KyleKanos What? Other than them both carrying information along something and being elements of the EM force, they're not related
And misreading is one thing but turning electrons into EM waves and cables into waveguides is something else

@innisfree I don't really agree on this point
The other point is fair enough... It just turns out that most people interested in either discipline turn out to have at least a mild interest in the other as well.

for a start, maths is arguably much older than physics

@Jimnosperm Yes, and if you gloss over the fact that it (clearly) says electrons, and read the "transmit " and "cable", you can think of waveguides

You'd also have to gloss over "electrostatics" and "twelve years old". Plus glossing over "electrons" is a pretty big oversight

7:04 PM
I concur

But that's neither here nor there. The answer is clearly only suited for a totally unrelated question

But I don't think it's not an answer

Is it an answer to the question. Even remotely?


text:
# Can't understand the solution given on logical equivalence

I'm working on this question: Use Theorem 2.1.1 to verify the logical equivalence $$∼(∼p ∧ q) ∧ (p ∨ q) ≡ p.$$

I'm guessing that I either have a flawed understanding either about the distributive law or absorption law or both.

These were my steps and was stuck:

$$∼(∼p ∧ q) ∧ (p ∨ q) ≡ (∼(∼p) ∨ ∼q) ∧ (p ∨ q)$$ <--By De Morgan’s laws

$$≡ (p ∨ ∼q) ∧ (p ∨ q)$$ <--by the double negative law

$$≡{ ( (p ∨ ∼q) ∧ p ) ∨ ( (p ∨ ∼q) ∧ q ) }$$ <--By distributive law

$$≡{ p ∨ ( (p ∨ ∼q) ∧ q }$$ <--By absorption law

$$≡{ p ∨ ( (q ∧ p) ∨ (q ∧ ∼q) ) }$$ <--By distributive law

$$≡{ p ∨ ( (q ∧ p) ∨ 0 ) }$$ <--By negation law

$$≡{ p ∨ (q ∧ p) }$$ <--By identity law

$$=p$$<--By adsorption law (Edited after a comment, thus I have edited the question)

The answer was: $$∼(∼p ∧ q) ∧ (p ∨ q) ≡ (∼(∼p) ∨ ∼q) ∧ (p ∨ q)$$ by De Morgan’s laws

$$≡ (p ∨ ∼q) ∧ (p ∨ q)$$ by the double negative law

$$≡ p ∨ (∼q ∧ q)$$ by the distributive law

$$≡ p ∨ (q ∧ ∼q)$$ by the commutative law for ∧

$$≡ p ∨ c$$ by the negation law

$$≡ p$$ by the identity law

So my question how did the solution jump from $$(p ∨ ∼q) ∧ (p ∨ q)$$ to $$p ∨ (∼q ∧ q)$$ just using distributive law?

• $p \vee (p \wedge q)$ is equivalent to $p$. – fish May 17 '20 at 4:26
• Nice work! The latex symbol $\neg$ for negation is \neg. – Olivier Roche May 17 '20 at 6:21
• I'll use it next time! Thank you – Leon May 18 '20 at 0:53

Distributive laws states that $${\displaystyle p\vee (q\wedge r)\equiv (p\vee q)\wedge (p\vee r)}\tag{1}$$ $${\displaystyle p\wedge (q\vee r)\equiv (p\wedge q)\vee (p\wedge r)}\tag{2}$$ Here we are applying $$(1)$$ that $$(\color{red}p\vee \color{blue}q)\wedge (\color{red}p\vee \color{green}r)$$ implies $$\color{red}p\vee (\color{blue}q\wedge \color{green}r)$$.

That $$(\color{red}p∨\color{blue}{∼q})∧(\color{red}p∨\color{green}q)$$ implies $$\color{red}p∨(\color{blue}{∼q}∧\color{green}q)$$ which is distributing $$p$$ out.

format: plain


text:
# A solid sphere of mass 2 kg is resting inside a cube as shown in the figure. The cube is moving with a velocity …..

Q: A solid sphere of mass 2 kg is resting inside a cube as shown in the figure. The cube is moving with a velocity $\displaystyle \vec{v} = 5t\hat{i} + 2t\hat{j}$ m/s . Here t is the time in second. All surface are smooth. The sphere is at rest with respect to the cube. What is the total force exerted by the sphere on the cube. (Take g = 10 m/s²)

(a)√29 N

(b) 29 N

(c) $\displaystyle \sqrt{516}$N

(d) √89 N

Ans: (c)
Sol:
$\displaystyle \frac{\vec{dv}}{dt}= 5\hat{i}+ 2\hat{j}$

$\displaystyle \vec{a} = 5\hat{i}+ 2\hat{j}$

$\displaystyle \vec{f}= 10\hat{i}+ 4\hat{j}$

Weight of solid sphere = 20 N

Total Force exerted by the sphere

$\displaystyle F = \sqrt{(20)^2+(10)^2+4^2}$

$\displaystyle F= \sqrt{516}$


text:
# What is the standard form of y=(4x + 3)(x/2-5) ?

Jun 23, 2018

$y = 2 {x}^{2} - \frac{37}{2} x - 15$

#### Explanation:

Let's use FOIL to simplify this problem and get rid of the parentheses:

$y = \left(4 x + 3\right) \left(\frac{x}{2} - 5\right)$
$y = \left(4 x\right) \left(\frac{x}{2}\right) + \left(4 x\right) \left(- 5\right) + \left(3\right) \left(\frac{x}{2}\right) + \left(3\right) \left(- 5\right)$
$y = \frac{4 {x}^{2}}{2} + \left(- 20 x\right) + \frac{3}{2} x + \left(- 15\right)$
$y = 2 {x}^{2} - 20 x + \frac{3}{2} x - 15$
$y = 2 {x}^{2} - \frac{37}{2} x - 15$

Since we are in standard form (terms are in descending order based on their degrees), this is our answer.


text:
## Elementary Geometry for College Students (7th Edition)

m$\angle$B
m$\angle$B is the largest because it corresponds to the largest value in the given proportion.


text:
Home > Error Rate > Bayes Error Example

# Bayes Error Example

## Contents

Noisy depth of field How to respond to your boss's email about a coworker's accusation? permalinkembedsaveparentgive gold[–]autowikibot 1 point2 points3 points 1 year ago(0 children) Bayes error rate: In statistical classification, the Bayes error rate is the lowest possible error rate for a given class of If needed I will share my class notes which sadly don't explain well enough ( just for clarification I asked my professor and he just gave me an answer which summed Cause thats what I've been doing and I'm guessing its ok. Check This Out

That requires knowing the posterior densities explicitly, when most of the time you are assuming they are something nice, like a Gaussian. permalinkembedsaveparentgive goldaboutblogaboutsource codeadvertisejobshelpsite rulesFAQwikireddiquettetransparencycontact usapps & toolsReddit for iPhoneReddit for Androidmobile websitebuttons<3reddit goldredditgiftsUse of this site constitutes acceptance of our User Agreement and Privacy Policy (updated). © 2016 reddit inc. ISBN978-0387848570. A Gaussian has thin tails, if the true distribution with fatter tails Bayes error rate will be higher. https://en.wikipedia.org/wiki/Bayes_error_rate

## Bayes Error Example

Why do most of us wear wristwatches on the left hand? p.17. All rights reserved.REDDIT and the ALIEN Logo are registered trademarks of reddit inc.πRendered by PID 21792 on app-575 at 2016-11-18 06:00:52.540605+00:00 running dd815b7 country code: IE. So if we want actual probability instead of this "concentration" thing, we integrate -- i.e.

Each observation is called an instance and the class it belongs to is the label. The system returned: (22) Invalid argument The remote host or network may be down. Plot your finger at that point on the X axis and drag your finger up. Naive Bayes Classifier Error Rate share|improve this answer answered Dec 26 '10 at 12:51 conjugateprior 13.5k13062 add a comment| up vote 0 down vote Here you might find several clues for your question, maybe is not

However, sometimes a question is restarted as a new one when the earlier version collects too many comments that are made irrelevant by the edits, so it's a judgment call. Bayes Error Rate In R I assume this is the approach intended by your invocation of the Bayes classifier, which is defined only when everything about the data generating process is specified. But if you are trying to minimize some other kind of error such as false positives (because for example, you think it is worse to send a good email to the i don't know this question suited to which one.

kid in winter Using a variable after FROM in SOQL statement Countries where lecture duration does not exceed one hour Can these Star Wars characters as emojis be identified? How To Calculate Classification Error Rate Now suppose you get a value of X. Or 'pnorm()' in R. That is your probability of choosing wrong when you decide the class using Bayes' Rule -- so we call it Bayes Error.

## Bayes Error Rate In R

Your cache administrator is webmaster. go to this web-site Another approach focuses on class densities, while yet another method combines and compares various classifiers.[2] The Bayes error rate finds important use in the study of patterns and machine learning techniques.[3] Bayes Error Example In any event it's helpful to place cross-references between closely related questions to help people connect them easily. –whuber♦ Nov 26 '10 at 20:52 add a comment| 3 Answers 3 active Bayes Error Rate Explained Bayes's rule makes you choose in error.

In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms http://advogato.net/error-rate/bayes-error-rate-formula.html I am waiting for a response for one to remove the other one. Since this is seldom possible it is always also worth considering the Discrimination Approach If you don't want to or cannot specify the prior class probabilities, you can take advantage of Read this for an introduction to the Bayesian conspiracy. Error Rate Definition

1. What does the letter 'u' mean in /dev/urandom?
2. Tumer, K. (1996) "Estimating the Bayes error rate through classifier combining" in Proceedings of the 13th International Conference on Pattern Recognition, Volume 2, 695–699 ^ Hastie, Trevor.
3. probability self-study normality naive-bayes bayes-optimal-classifier share|improve this question edited May 25 at 5:26 Tim 25.3k456106 asked Nov 26 '10 at 19:36 Isaac 495615 1 Is this question the same as

v t e Retrieved from "https://en.wikipedia.org/w/index.php?title=Bayes_error_rate&oldid=743880528" Categories: Statistical classificationBayesian statisticsStatistics stubsHidden categories: Pages using ISBN magic linksAll articles with unsourced statementsArticles with unsourced statements from February 2013Wikipedia articles needing clarification from Look up Discriminant Analysis to get the optimal decision boundary in closed form, then compute the areas on the wrong sides of it for each class to get the error rates. Generated Fri, 18 Nov 2016 05:56:49 GMT by s_wx1194 (squid/3.5.20) ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.9/ Connection http://advogato.net/error-rate/bayes-error-rate-example.html Will also delete on comment score of -1 or less. | FAQs | Mods | Magic Words permalinkembedsaveparentgive gold[–]Bromskloss 1 point2 points3 points 1 year ago(1 child)I must say that the definition given

permalinkembedsaveparentgive gold[–]OlTartToter[S] 0 points1 point2 points 1 year ago(0 children)Why am I being down voted? Classification Error Rate In R If any of these question get answered, the other one will be deleted. Please try the request again.

## The "Bayes Decision Rule" is this: whichever class's curve is higher at that point, that is the class you pick.

As a concrete example, consider two Gaussians with following parameters $$\mu_1=\left(\begin{matrix} -1\\\\ -1 \end{matrix}\right), \mu_2=\left(\begin{matrix} 1\\\\ 1 \end{matrix}\right)$$ $$\Sigma_1=\left(\begin{matrix} 2&1/2\\\\ 1/2&2 \end{matrix}\right),\ \Sigma_2=\left(\begin{matrix} 1&0\\\\ 0&1 \end{matrix}\right)$$ Bayes optimal classifier boundary will Related reddits: /r/rstats /r/statistics /r/MachineLearning created by ichthisa community for 5 yearsmessage the moderatorsMODERATORSichthisabout moderation team »discussions in /r/Bayes<>X1 points · 1 comment Lost Car Key Puzzle (Solved with Bayesian analysis)6 points Bayesian Wi-Fi7 points Bayes’s Theorem is Not ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.6/ Connection to 0.0.0.6 failed. Estimating The Bayes Error Rate Through Classifier Combining book...

Generated Fri, 18 Nov 2016 05:56:49 GMT by s_wx1194 (squid/3.5.20) Its reference 2 fleshes it out more, though. Bayesian statisticians handle this case by reflecting these concerns in the prior distributions for each class and still using Bayes rule. http://advogato.net/error-rate/how-to-calculate-bayes-error-rate.html permalinkembedsaveparentgive gold[–]OlTartToter[S] 1 point2 points3 points 1 year ago(0 children)This seems very useful.

One method seeks to obtain analytical bounds which are inherently dependent on distribution parameters, and hence difficult to estimate. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Also suppose the variables are in N-dimensional space. You have some data, summarized in a statistic called X, in the case of Gaussian data this will be the mean of your data points (or if you get just a

Binomial coefficients and "missing primes" How far above a waterfall should you be to safely cross? Could you please provide commands to reproduce your beautiful figures? –Andrej Oct 5 '12 at 13:42 2 (+1) These graphics are beautiful. –COOLSerdash Jun 25 '13 at 7:05 add a For the problem above I get 0.253579 using following Mathematica code dens1[x_, y_] = PDF[MultinormalDistribution[{-1, -1}, {{2, 1/2}, {1/2, 2}}], {x, y}]; dens2[x_, y_] = PDF[MultinormalDistribution[{1, 1}, {{1, 0}, {0, 1}}], Higher up doesn't carry around their security badge and asks others to let them in.

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2766788/ share|improve this answer answered Nov 27 '10 at 12:13 mariana soffer 88711315 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Generative Approach Assuming a generative model for the data, you also need to know the prior probabilities of each class for an analytic statement of the classification error. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the Please try the request again.

A number of approaches to the estimation of the Bayes error rate exist. I was hoping someone might have an Idea. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. Mountainering with 6 y.o.


text:
# Pythagorean inequality in l1 norm for projection onto simplex

Let $$x$$ be a point in $$\mathbb{R}^d$$, let $$z$$ be the projection of $$x$$ onto the $$d-1$$ dimensional simplex ($$z^\top \mathbf{1}= 1$$ and $$z \succeq 0$$). So basically

$$z = \arg\min_w \{\rVert x-w\rVert_2 \,\,|\,\, w^\top \mathbf{1} = 1\,,w\succeq 0 \}$$

Let $$y$$ be any other point in the simplex. Is it true that $$\rVert z- y\rVert_1 \leq \rVert x- y\rVert_1$$?

I could prove this for $$\mathbb{R}^2$$ but not sure how to generalize it to $$\mathbb{R}^d$$. The above inequality actually holds for Euclidean norm (not sure if it has an official name but some people refer to it as the Pythagorean inequality for projection onto convex sets)

but I'm interested in L1 norm instead. Any leads/related problems are greatly appreciated!

Thanks

• When writing $z^\top 1 = 1$, is the first $1$ the column vector in $\Bbb{R}^d$ consisting of all $1$s? That is, is the simplex the set of all vectors in $\Bbb{R}^d$ in the positive orthant whose components sum to $1$? – user804886 Jul 13 '20 at 4:06
• @user804886, yes sorry for being unclear, first one should be a vector of all 1s. So it's the set of probability vector – Duc Nguyen Jul 13 '20 at 19:00
• The relation $\|x\|_2\leq\|x\|_1$ makes me think what you're looking for holds – iarbel84 Jul 14 '20 at 17:33
• @iarbel84 good point, in fact, we can show that $\frac{1}{\sqrt{d}} \rVert z-y\rVert_1 \leq \rVert z-y\rVert_2 \leq \rVert x-y\rVert_2 \leq \rVert x - y\rVert_1$. Getting rid of the $\frac{1}{\sqrt{d}}$ seems hard though – Duc Nguyen Jul 17 '20 at 3:13
• I'm pretty sure this does hold, but a formal proof with any kind of elegance eludes me. My PhD is on projections, and I can confirm that this property does not hold for general convex sets in $\Bbb{R}^d$, but I think the specific structure of this set, being a face of the $1$-sphere, will mean the $2$-projection will lie inside the $1$-projection. – user810049 Jul 23 '20 at 17:43

It seems that the Pythagorean inequality only holds for inner-product norms rather than all norms. Thus this result may not hold for $$\ell_1$$ norm. One can refer to this bookIntroduction to Online Convex Optimization'' (Page. 159) and this problem for more details.
• You can use some convex function that will hold the Bregman distance properties w.r.t. the l-1 norm (for example, $\sum_{i=1}^{n}x_i \log x_i$). It's a long shot, but maybe you'll be able to construct what you're looking for - possibly by using the Three-point Lemma from the article. – iarbel84 Jul 20 '20 at 8:55


text:
# STACK Sandbox

It is very useful when authoring questions to be able to test out Maxima code in the same environment in which STACK uses Maxima. That is to say, to run a desktop version of Maxima with the local settings and STACK specific functions loaded. This is also used in reporting and analysis of students' responses. To do this you will need to load your local settings, and also the libraries of Maxima functions specific to STACK.

## Setup Maxima and wxMaxima

Install Maxima (http://maxima.sourceforge.net/) and wxMaxima (https://wxmaxima-developers.github.io/wxmaxima/).

If you don't have access to a STACK server then you will need to download the files. Download all the STACK files from GitHub (git or as a .zip). E.g. try https://github.com/maths/moodle-qtype_stack/archive/master.zip

The only files you need are in

.../stack/maxima/

In this directory open the file sandbox.wmx with wxMaxima and edit it to your needs.

It is very useful when authoring questions to be able to test out Maxima code in the same environment in which STACK uses Maxima. That is to say, to run a desktop version of Maxima with the local settings and STACK specific functions loaded. This is also used in reporting and analysis of students' responses. To do this you will need to load your local settings, and also the libraries of Maxima functions specific to STACK.

For example, many of the functions are defined in

        stack/stack/maxima/stackmaxima.mac

Hence, on a typical Moodle installation you will find the file at

        /moodle/question/type/stack/stack/maxima/stackmaxima.mac

The first part of the instructions work on a Microsoft platform, but instructions for Linux can also be found below. Please note that having a properly set up STACK - Maxima sandbox is not equivalent to running an optimized Maxima.

### Setting Maxima's Path

Setting the path in Maxima is a problem on a Microsoft platform. Maxima does not deal well with spaces in filenames, for example. The simplest solution is to create a directory

C:/maxima

and add this to Maxima's path. Place all Maxima files in this directory, so they will then be seen by Maxima. For Maxima 5.26.0, edit, or create, the file

C:/Program Files/Maxima-5.26.0/share/maxima/5.26.0/share/maxima-init.mac

ensure it contains the following lines, possibly modified to reflect the directory you have chosen

file_search_maxima:append([sconcat("C:/maxima/###.{mac,mc}")],file_search_maxima)$file_search_lisp:append([sconcat("C:/maxima/###.{lisp}")],file_search_lisp)$

Other versions of Maxima are similar.

STACK automatically adjusts Maxima's path and loads a number of files. These define STACK specific functions and reflect your local settings. To do this, STACK loads a file which is automatically created at install time. This is placed within the moodledata directory, typically as

moodledata/stack/maximalocal.mac

For example, the value might look like

C:/xampp/data/moodledata/stack/maximalocal.mac

You need to load this file into Maxima to recreate the setup of Maxima as seen by STACK. Assuming you have created a directory C:/maxima as suggested above and added it to Maxima's path, the simplest way to do this is to create a file

C:/maxima/sm.mac

and into this file add the line

load("C:/xampp/data/moodledata/stack/maximalocal.mac");

To load this into Maxima simply type

load(sm);

at Maxima's command line. The time spent setting the path in this way is soon repaid in not having to type the following line each time you want the sandbox. Your path to maximalocal.mac might be significantly longer....! You will know the file is loaded correctly if you see a message such as the following

(%i1) load(sm);
Loading maxima-grobner $Revision: 1.6$ $Date: 2009-06-02 07:49:49$
[Stack-Maxima started V3.0, 13/2/12]
(%o0) "C:/maxima/sm.mac"

You can test this out by using, for example, the rand() function.

rand(matrix([5,5],[5,5]));

to create a pseudo-random matrix. If rand returns unevaluated, then you have not loaded the libraries correctly.

### Linux instructions

In a terminal window, execute the following commands, e.g., in your home folder:

 mkdir stack-maxima
cd stack-maxima
pico maxima-init.mac

Put the following three lines into maxima-init.mac:

file_search_maxima:append([sconcat("<path to your home folder>/stack-maxima/###.{mac,mc}")],file_search_maxima)$file_search_lisp:append([sconcat("<path to your home folder>/stack-maxima/###.{lisp}")],file_search_lisp)$

Note that the paths above need to be completed. The following command is useful for finding the path to maximalocal.mac:

locate maximalocal.mac

Informally, the answer tests have the following syntax

[Errors, Result, FeedBack, Note] = AnswerTest(StudentAnswer, TeacherAnswer, Opt)

actually the results returned in Maxima are

[Valid, Result, FeedBack, Note] = AnswerTest(StudentAnswer, TeacherAnswer, Opt)

Errors are echoed to the console, and are trapped by another mechanism. The valid field is used to render an attempt invalid, not wrong.

To call an answer test directly from Maxima, you need to use the correct function name. For example, to call the algebraic equivalence (AlgEquiv) answer test you need to use

ATAlgEquiv(x^2+2,x*(x+1));

The values returned are actually in the form

[true,false,"",""]

Feedback is returned in the form of a language tag which is translated later. For example,

(%i1) ATInt(x^2,x*(x+1),x);
(%o1) [true,false,"ATInt_generic. ",
"stack_trans('ATInt_generic' , !quot!\$2\\,x+1\$!quot!  , !quot!\$$x\$$!quot!  , !quot!\$2\\,x\$!quot! ); "]

If you just want to decide if two expressions are considered to be algebraically equivalent, then use

algebraic_equivalence(ex1,ex2);

This is the function the answer test ATAlgEquiv uses without all the wrapper of a full answer test.

### Where is the Maxima code?

All the maxima code is kept in

...\moodle\question\type\stack\stack\maxima

The bulk of the functions are defined in

...\moodle\question\type\stack\stack\maxima\stackmaxima.mac
...\moodle\question\type\stack\stack\maxima\assessment.mac

### Useful tips

STACK turns off the traditional two-dimensional display, which we can turn back on with the following command.

display2d:true;


text:
# [WSC18] Visualizing Fractional Colorings for Random Graphs

Posted 1 year ago
1159 Views
|
0 Replies
|
2 Total Likes
|

# Project Description

Graph coloring is an NP-complete problem that asks for the minimum number of colors required to color a graph such that no two adjacent vertices can have the same color. Because this is such a well-known topic, a lot of research has been done on it. However, not much study has been done on fractional colorings, which is simply a generalized graph coloring. What makes the fractional coloring problem complicated is that in addition to the problem constraint, each vertex is assigned a list of colors. So, the problem statement is as follows: "What is the minimum number of colors such that no two adjacent vertices have any colors in common?" Because each vertex can have varying number of colors, the infamous problem of fractional graph coloring is NP-complete. However, it can be reasonably approached through linear programming. In fact, the minimum real number to color a fractional graph while still satisfying the problem's constraints can be obtained as a solution to a linear program. In this project, I will be comparing two versions of the graph coloring problem: integral and fractional.

## Definitions

$\textbf{Chromatic Number}$ [ $\chi(G)$ , $\chi^F(G)$]: Minimum number of colors required to color a graph while satisfying the coloring problem's constraints.
$\textbf{Chromatic Polynomial}$ [ $P(G, z), P(G^F, z)$]: Polynomial of order $n$ that counts the number of colorings as a function of the number of colors. Therefore, the minimum value that makes the function positive is the chromatic number.
$\textbf{a:b-coloring}$: Coloring that uses $a$ available colors to color a graph with $b$ vertices.
$\textbf{Graph Homomorphism}$: Mapping between two graphs that respects their structure.
$\textbf{Vertex-transitive graph}$: Graph such that every pair of vertices is equivalent under some element of its automorphism group.

## Basic Methods

Below are the elementary methods purely pertaining to graph colorings:

ValidColoring[g_, c_] :=
AllTrue[Table[
Intersection[{c[[i]]}, c[[AdjacencyList[g, i]]]] == {}, {i, 1,
VertexCount[g]}], TrueQ];

ChromaticNumber[g_] :=
MinValue[{z, z > 0 && ChromaticPolynomial[g, z] > 0}, z, Integers];

The $\textit{ValidColoring}$ method ensures that the current list of colors satisfies the problem's constraint that no two adjacent vertices can have the same colors. It does so by checking that there are no intersections between each pair of adjacent vertices. The $\textit{ChromaticNumber}$ method goes through all integer values that make the chromatic polynomial of a graph positive and takes the minimum out of those values.

## Fractional Colorings in Terms of Independent Sets

$I(G)$: set of all independent sets of vertices in $\textit{V(G)}$
$\textit{I(G,u)}$: set of all independent sets of vertices containing the vertex $u$

In this context, a fractional coloring is a mapping $f$: $I(G) \rightarrow$ [0, 1] with the property that, for every vertex $u$, $\sum_{J \in I(G,u)} f(J) \ge 1$. Then, the sum of the function values over all independent sets is called the weight of the fractional coloring. Therefore, the fractional chromatic number is the infimum of all the sums of the fractional coloring weights. To see the connection between fractional colorings and independent sets, one must note that each color class is an independent set belonging to $I(G)$. Then, define $f$: $I(G) \rightarrow$ [0, 1], mapping each color class to 1 and every other independent sets to 0. Next, suppose that a graph $G$ has a proper a:b-coloring. In this case, if one defines a function that sends each color class to $\frac{1}{b}$ and every other independent set to 0, it is true that $\sum_{J \in I(G,u)} f(J) = 1$ for every vertex $u$, which then leads to a fractional coloring with weight $\frac{a}{b}$.

## Linear Programming Formulation

Below are the methods used to compute the fractional chromatic number:

independentSets[G_] := FindIndependentVertexSet[G, Infinity, All]
A[is_, G_] :=
Table[If[MemberQ[is[[i]], j], 1, 0], {i, Length[is]}, {j,
VertexCount[G]}]
OneVector[N_Integer] := Table[1, N]
y[one_, A_, R_] := LinearProgramming[one, Transpose[A], R]

From the relationship between chromatic numbers and independent sets, one can formulate a matrix $A(G)$ such that its columns are indexed by $V(G)$ and that its rows are indexed by $I(G)$. When formulating this matrix, entries are 1 if they are in the independent set represented by the column and 0 if they are not. Doing so essentially gives a characteristic function of the vertices' corresponding independent sets. Next, make a variable vector $y(G)$ that is indexed by $I(G)$. Then, the task reduces to minimizing the sum of the variables in the vector $y(G)$ (weighted coloring of graphs), subject to the set of constraints that each entry in $y(G)^T A(G) \ge 1$ and that all elements in $y(G)$ fall in the interval [0, 1].

## Coloring the Graph

### Idea

The $k$-fold chromatic number is given by $\chi(G) = \frac{1}{k}\chi(G')$, where $G'$ has each vertex in $G$ replaced with $k$ copies, and each edge $(u',v')$ in $G'$ is formed if the original vertices of both $u'$ and $v'$ in $G$ are the same or incident. This transformation is called strong graph product, which 'decomposes' each vertex into a complete graph $K_{k}$,while maintaining the overall structure of $G$. After coloring $G'$, group back all vertices that belong to the same 'super-vertex', which will lead $G$ to have multiple colors contributed by the sub-vertices in $G'$.

### Methods

explodeGraph[g_, 1] := g
explodeGraph[g_, k_] :=
Graph[Union @@ newEdges[k] @@@ EdgeList[g]]
newEdges[k_][v1_, v2_] :=
UndirectedEdge @@@ Join[
Tuples[{nv1, nv2}],
Subsets[nv1, {2}],
Subsets[nv2, {2}]
]
]

mapping[n_, g_, vstyle_, newmapping_] :=
Sort[Table[{newmapping[vstyle[[i]][[1]]], vstyle[[i]][[2]]}, {i,
Length[vstyle]}]]

FractionalColoring[n_Integer, m_Integer, cmaplist_] :=
Table[Graphics[{EdgeForm[Black],
Table[{cmaplist[[z]][[k]],
Disk[{0, 0},
1, {-\[Pi]/2 + 2 \[Pi]*(k - 1)/m, -\[Pi]/2  +
2 \[Pi]*k/m}]},  {k, 1, m , 1}]}], {z, 1, n, 1}]

Example with a cycle graph of 5 vertices ( $C_{5}$):

## Special Graphs

### Cycle Graph

Denoted by $C_{n}$, a cycle graph is a graph on $n$ nodes containing a single cycle through all nodes. Below is a cycle graph with 8 vertices.

In a cycle graph, it is quite obvious that $i)$ if there are even number of vertices, then the chromatic number is 2, and $ii)$ if there are odd number of vertices, then the chromatic number is 3.

However, fractional graph coloring is slightly different. Although $\chi(G) = \chi^F(G)$ for even cases, that is not true for odd cases. In fact, $\chi^F (C_{2n + 1}) = 2 + \frac{1}{n}$. The fractional chromatic number in a cycle graph must be greater than 2 because four "one-half" colors must be used in any vertex triplets. Below is an example of 5:2-coloring of a cycle graph.

### Kneser Graph

In a Kneser graph $K_{a:b}$, the vertices are $b$-element subsets of a fixed set $\{1, 2, ...., a\}$ and the edges exist between the vertices if and only if the subsets represented by them are disjoint. Therefore, by definition, if $b$ = 1, the graph becomes $K_{a}$, which is a complete graph with a vertices. The connection between graph coloring and graph homomorphism is that a graph is a:b-colorable if and only if there is a homomorphism $\phi : G \rightarrow K_{a:b}$.

Erdos-Ko-Rado Theorem states that: if $a$ and $b$ are positive integers with $a \ge 2b$, then independence number $\alpha(K_{a:b}) = {a-1\choose b-1}$. It is true that for any graphs, $\chi^F(K_{a:b}) \ge \frac{|V(K_{a:b})|}{\alpha(K_{a:b})}$. In the special case where the graph is vertex-transitive, $\chi^F(K_{a:b}) = \frac{|V(K_{a:b})|}{\alpha(K_{a:b})}$. Since there are ${a\choose b}$ vertices in a Kneser graph, $\chi^F(K_{a:b}) = \frac{{a\choose b}}{{a-1\choose b-1}} = \frac{a}{b}$.

## Demonstration

Below is the code for the Manipulate function that compares integral and fractional graph colorings:

Manipulate[
Module[{graph, graph2, chrom, colorings, sol, palette, cg, vL,
fracColoring, is, matrix, yV, fracChrom, fracG, vlist, map, fracC,
vstyle, newvl, newmapping, cmap, cmaplist},
SeedRandom[s];
graph = RandomGraph[{n, m}, VertexSize -> Medium];
graph2 = graph;

(* Integral Coloring *)
vL = VertexList[graph];
chrom = ChromaticNumber[graph];
colorings = Tuples[Table[i, {i, 1, chrom}], VertexCount[graph]];
sol = SelectFirst[colorings, ValidColoring[graph, #] &];
palette = discreteColors[chrom];
Do[PropertyValue[{graph, v[[1]]}, VertexStyle] = v[[2]], {v,
Table[{i, palette[[sol[[i]]]]}, {i, 1, VertexCount[graph]}]}];

(*Fractional Coloring *)
fracG = explodeGraph[graph2, 2];
vlist = VertexList[fracG];
newmapping =
Association[
Table[2*(vlist[[i]][[1]] - 1) + vlist[[i]][[2]] ->
vlist[[i]][[1]], {i, Length[vlist]}]];
newvl =
Table[2*(vlist[[i]][[1]] - 1) + vlist[[i]][[2]], {i,
Length[vlist]}];
fracG =
Graph @@ ({vlist, EdgeList[fracG]} /. Thread[vlist -> newvl]);

fracC = brelaz[fracG];
vstyle = MapIndexed[First[#2] -> ColorData[61, #1] &, fracC];
map = mapping[2, fracG, vstyle, newmapping];
cmap = Table[map[[i]][[2]], {i, Length[map]}];
cmaplist =
Table[cmap[[2*(i - 1) + j]], {i, 1, VertexCount[fracG]/2}, {j, 1,
2}];
fracColoring =
FractionalColoring[VertexCount[graph2], 2, cmaplist];

is = independentSets[graph];
matrix = A[is, graph];
yV = y[OneVector[Length[is]], matrix, OneVector[VertexCount[graph]]];
fracChrom = Total[yV];
Row[
{Column[{
Row[{Style["Integral Graph", Bold, RGBColor[0., 0.79, 0.76],
Row[{Style["Integral Chromatic Number: ", 15], Style[chrom, 20] }],
Graph3D[graph, ImageSize -> {400, 400},
EdgeStyle -> RGBColor[0.8, 0.8, 0.8]]
}, Center, 5],
Column[Table["|", {t, 1, 35}]],
Column[{
Row[{Style["Fractional Graph", Bold, RGBColor[0., 0.94, 0.33],
Row[{Style["Fractional Chromatic Number: ", 15], If[fracChrom < chrom, Style[fracChrom, 20, Bold, Pink],
Style[fracChrom, 20]]}],
Graph[graph2, ImageSize -> {400, 400},
EdgeStyle -> RGBColor[0.8, 0.8, 0.8]]
},
Center, 5]},
"          "
]
],
{{n, 3,
"Number of Vertices"}, 3, 7, 1, Appearance -> "Labeled"},
{{m, 3, "Number of Edges"}, 3, n*(n - 1)/2, 1,
Appearance -> "Labeled" },
{{s, 1, "Random Seeding"}, 1, 10000, 1, Appearance -> "Labeled"},
SaveDefinitions -> True
]

## Future Work

First of all, the coloring process needs to be drastically optimized. Because the current algorithm is extremely slow, it cannot color a graph with more than 7 vertices. Initially, I hoped that I would be able to handle at least 100 vertices, but I realized that coloring a graph is not easy as it seems like. With further optimization, I hope to improve this project so that it can efficiently compute both integral and fractional chromatic number and optimally color both integral and fractional graphs almost instantly. Second of all, I wanted to explain the relationships between different topics of graph theory and graph colorings, but I was not able to do so because I spent too much time trying to figure out how to color a fractional graph. For instance, one of the most surprising characteristic of fractional chromatic number is that it is equal to the fractional clique number. Rigorously proving the previous statement requires deep insight into properties and characteristics of both fractional clique number and chromatic number, so doing so would make me digress and talk about tangential topics. Lastly, I want to handle more complicated fractional graphs, such as the ones that have more than just 2 colors assigned to them. In this project, each vertex is assigned 2 colors each. However, I want to expand on this project by having varying number of colors in each vertex. Moreover, the algorithm is not exact because I used the Brelaz heuristic, which is just an approximation of the coloring.

Attachments:


text:
Overlaying drawings and annotations over tables and ordinary text

Okay, here's another one on tables (maybe we should do a series).

So, we've got our tables grouped together nicely with braces (thanks to some great answers to an earlier question).

Follow the link for the code.

The new question is about overlaying annotations (perhaps with tikz) over tables and tex, etc. Like so:

Just some faint lines to help the reader trace between corresponding values located in adjacent tables. This is particularly useful for comparing and contrasting similarities and differences.

Here's a couple of quick examples showing how easy it is to draw the lines in a tikz only environment.

\documentclass{standalone}
\usepackage{tikz,xcolor}
\usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}

\tikzstyle{block} = [draw, rectangle,
minimum height=2.5em, text centered,
text width=1.9em]

\node[block,                    ] (A) {$A$};
\node[block, below=+1.000cm of A] (B) {$B$};
\node[block, right=-0.015cm of A] (C) {$C$};
\node[block, right=-0.015cm of B] (D) {$D$};
\node[block, right=-0.015cm of C] (E) {$E$};
\node[block, right=-0.015cm of D] (F) {$F$};
\node[block, right=-0.015cm of E] (G) {$G$};
\node[block, right=-0.015cm of F] (H) {$H$};
\draw[-,dotted,thick,       color={black!40!white}] (A) -- (B);
\draw[-,dotted,thick,       color={black!40!white}] (C) -- (D);
\draw[-,dotted,thick,       color={black!40!white}] (E) -- (F);
\draw[-,dotted,thick,       color={black!40!white}] (G) -- (H);

\end{tikzpicture}

\begin{tikzpicture}

\tikzstyle{block} = [draw, rectangle,
minimum height=2.5em, text centered,
text width=1.9em]

\node[block,                    ] (A) {$A$};
\node[block, below=+1.000cm of A] (B) {$B$};
\node[block, right=-0.015cm of A] (C) {$C$};
\node[block, right=-0.015cm of B] (D) {$D$};
\node[block, right=-0.015cm of C] (E) {$E$};
\node[block, right=-0.015cm of D] (F) {$F$};
\node[block, right=-0.015cm of E] (G) {$G$};
\node[block, right=-0.015cm of F] (H) {$H$};
\draw[-,line width=+0.916cm,color={black!20!white}] (A) -- (B);
\draw[-,line width=+0.916cm,color={black!20!white}] (E) -- (F);

\end{tikzpicture}

\end{document}

Or simply:

\documentclass{standalone}
\usepackage{tikz,xcolor}
\usetikzlibrary{positioning}
\begin{document}

\tikzstyle{block} = [draw, rectangle,
minimum height=2.5em, text centered,
text width=1.9em]

\begin{tikzpicture}

\node[block,               ] (A) {$A$};
\node[block, below=1cm of A] (B) {$B$};
\draw[-,dotted,thick,      color={black!40!white}] (A) -- (B);

\end{tikzpicture}

\begin{tikzpicture}

\node[block,               ] (A) {$A$};
\node[block, below=1cm of A] (B) {$B$};
\draw[-,line width=0.916cm,color={black!40!white}] (A) -- (B);

\end{tikzpicture}

\end{document}

Maybe I should have done the table in tikz from the beginning, but no matter, sometimes you already have the tables prepared, or for whatever reason you might just want/need to do it a certain way. So anyway, the problem is overlaying the annotations over the things that are already on the page - as opposed to before or after.

2 Answers

I think you got cheated. The code I base my answer on cannot be from David. It is neither complicated nor does it have any z's. To rectify this I add something slightly more complicated with a \Z.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usepackage{eso-pic}
\begin{document}
\begin{table}
$\left\{ \begin{minipage}[c]{0.45\textwidth}% \begin{center} \tikzmarknode{tab1}{\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline a & b & c & d & e & f & g & h\\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline a & b & c & d & e & f & g & h\\ \hline \end{tabular}} \end{center} \caption{Table \#1} \begin{center} \tikzmarknode{tab2}{\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline a & b & c & d & e & f & g & h\\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline a & b & c & d & e & f & g & h\\ \hline \end{tabular}}% \end{center} \caption{Table \#2} \end{minipage} \begin{minipage}[c]{0.45\textwidth}% \begin{center} \tikzmarknode{tab3}{\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline a & b & c & d & e & f & g & h\\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline a & b & c & d & e & f & g & h\\ \hline \end{tabular}} \end{center} \caption{Table \#3} \begin{center} \tikzmarknode{tab4}{\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline a & b & c & d & e & f & g & h\\ \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline a & b & c & d & e & f & g & h\\ \hline \end{tabular}}% \end{center} \caption{Table \#4} \end{minipage} \right\}$
\end{table}
\AddToShipoutPictureBG*{%
\begin{tikzpicture}[remember picture,overlay]
\foreach \Z in {1,3} {% <- this \Z is dedicated to David Carlisle
\path (tab\Z.south west) -- (tab\Z.south east) foreach \X in {0,...,8}
{coordinate[pos=\X/8] (p\Z-\X)};
\foreach \X  in {0,2,4,6}
{\fill[gray!20] (p\Z-\X) rectangle
(p\Z-\the\numexpr\X+1\relax|-tab\the\numexpr\Z+1\relax.north);}
}
\end{tikzpicture}}
\end{document}

And this is also just for fun. In case you get bored typing 1, 2 and a, b etc. by hand, you can ask TikZ for help.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,matrix,backgrounds,decorations.pathreplacing}
\newcounter{dummy}
\begin{document}
\begin{table}
\centering
\begin{tikzpicture}[mymat/.style={matrix of nodes,nodes in empty cells,
cells={nodes={draw,minimum width=1.8em,text height=1em,text
depth=0.5ex}},
column sep=-\pgflinewidth,row sep=-\pgflinewidth,
row 1/.style={nodes={execute at begin node={%
\setcounter{dummy}{\the\pgfmatrixcurrentcolumn}\alph{dummy}}}},
row 2/.style={nodes={execute at begin node={%
\the\pgfmatrixcurrentcolumn}}},
row 3/.style={nodes={execute at begin node={%
\setcounter{dummy}{\the\pgfmatrixcurrentcolumn}\alph{dummy}}}}}]
\node[mymat] (mat1){
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\node[below=1ex of mat1,text width=10em] (cap1) {\caption{Table \#1.}};
\node[mymat,below=6em of mat1] (mat2){
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\node[below=1em of mat2,text width=10em] (cap2) {\caption{Table \#2.}};
\node[mymat,right=4em of mat1] (mat3){
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\node[below=1ex of mat3,text width=10em] (cap3) {\caption{Table \#3.}};
\node[mymat,below=6em of mat3] (mat4){
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
};
\node[below=1em of mat4,text width=10em] (cap4) {\caption{Table \#4.}};
\draw[thick,decoration={brace,mirror},decorate] (mat1.north west) --
(mat2.west|-cap2.south);
\draw[thick,decoration={brace},decorate] (mat3.north east) --
(mat4.east|-cap4.south);
\begin{scope}[on background layer]
\foreach \X in {1,3,5,7}
{\fill[gray!20] (mat1-3-\X.south west) rectangle (mat2-1-\X.north east);
\fill[gray!20] (mat3-3-\X.south west) rectangle (mat4-1-\X.north east);}
\end{scope}
\end{tikzpicture}
\end{table}
\end{document}

• Cheated how? Z's? I'm not sure what you mean. It might seem less complicated if you explain what you've done or how your code works. You introduce new packages, libraries, styles, \tikzmarknode{, various calculations involving \the\numexpr, something called \AddToShipoutPictureBG*{%. It is kind of complicated. Which is fine -- it does more; it's going to be more complex. It would be nice if you included some comments in the code, or spoke a bit about what's going on for the new guys like myself. <3 Thanks though, I'll try it out in the meantime. – voices Aug 10 '19 at 12:52
• @tjt263 The comment on David was a joke. (I am now trapped at an airport and there won't be lenghty explanations at this point. The first code uses David's code literally but wraps it into a \tikzmarknode such that we can draw the shaded regions between the tables. \AddToShipoutPictureBG*{ is a trick to to draw these on the background even though we use dimensions of objects that we were adding before. The second code switches gears completely and does everything with TikZ. All of this is standard with the only exception of filling in the entries. – user121799 Aug 11 '19 at 1:01
\documentclass{article}
\usepackage[hscale=0.65]{geometry} % enlarge margins a little bit for the example
\usepackage{tikz}
\usetikzlibrary{calc, fit, matrix, positioning}

\newdimen\mytableswidth

\tikzset{my matrix of nodes/.style={
inner sep=0, row sep=-\pgflinewidth, column sep=-\pgflinewidth,
execute at begin cell=\node\bgroup\strut,
execute at end cell=\egroup;,
nodes={draw, anchor=base,
minimum width=
\pgfkeysvalueof{/tikz/matrix separator/minimum width},
minimum height=1cm}
},
matrix separator/.style={
every node/.style={
minimum width=\pgfkeysvalueof{/tikz/matrix separator/minimum width},
minimum height=2.5cm
},
every odd column/.style={nodes={draw=white, fill={gray!30}}},
every even column/.style={nodes={draw=white}},
execute at empty cell={\node {};}
}
}

\begin{document}

\begin{table}
\centering
\begin{tikzpicture}[matrix separator/minimum width/.initial=0.7cm]
\matrix[my matrix of nodes, name=A, matrix anchor=south]
{
a & b & c & d & e & f & g & h\\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
a & b & c & d & e & f & g & h\\
};

\matrix[my matrix of nodes, name=sep, below, matrix separator]
{   &   &   &   &   &   &   &  \\};

\matrix[my matrix of nodes, name=B, below=0pt of sep]
{
a & b & c & d & e & f & g & h\\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
a & b & c & d & e & f & g & h\\
};

% This:
\path let \p1=($(A.east)-(A.west)$) in \pgfextra{\global\mytableswidth=\x1};
% or \global\mytableswidth=10cm to manually set the width of the caption boxes
\node[text width=\mytableswidth] (caption1) at ([yshift=-\baselineskip]A.south)
{\caption{Table \#1}};
\node[text width=\mytableswidth] (caption2) at ([yshift=-\baselineskip]B.south)
{\caption{Table \#2}};

\coordinate (lpadding) at ([xshift=-0.7em]sep.west);
\node[inner sep=0, fit=(A) (sep) (B) (lpadding) (caption1) (caption2),
left delimiter=\{] {};
\end{tikzpicture}%
%
\hfill
%
\begin{tikzpicture}[matrix separator/minimum width/.initial=0.7cm]
\matrix[my matrix of nodes, name=A, matrix anchor=south]
{
a & b & c & d & e & f & g & h\\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
a & b & c & d & e & f & g & h\\
};

\matrix[my matrix of nodes, name=sep, below, matrix separator]
{   &   &   &   &   &   &   &  \\};

\matrix[my matrix of nodes, name=B, below=0pt of sep]
{
a & b & c & d & e & f & g & h\\
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
a & b & c & d & e & f & g & h\\
};

\path let \p1=($(A.east)-(A.west)$) in \pgfextra{\global\mytableswidth=\x1};
\node[text width=\mytableswidth] (caption1) at ([yshift=-\baselineskip]A.south)
{\caption{Table \#3}};
\node[text width=\mytableswidth] (caption2) at ([yshift=-\baselineskip]B.south)
{\caption{Table \#4}};

\coordinate (rpadding) at ([xshift=0.7em]sep.east);
\node[inner sep=0, fit=(A) (sep) (B) (rpadding) (caption1) (caption2),
right delimiter=\}] {};
\end{tikzpicture}
\end{table}

\end{document}


text:
Franklin.jl website generated on Github is much different than what i created on Local system

<!--
-->
+++
author = "Raman Kumar"
mintoclevel = 2
@def prepath  = "maria.github.io"

# Add here files or directories that should be ignored by Franklin, otherwise
# these files might be copied and, if markdown, processed by Franklin which
# you might not want. Indicate directories by ending the name with a /.
# Base files such as LICENSE.md and README.md are ignored by default.
ignore = ["node_modules/"]

# RSS (the website_{title, descr, url} must be defined to get RSS)
website_title = "Maria Giovanna Dainotti"
website_descr = "Example website using Franklin"
website_url   = "https://tlienart.github.io/FranklinTemplates.jl/"
+++

<!--
-->
\newcommand{\R}{\mathbb R}
\newcommand{\scal}[1]{\langle #1 \rangle}

Should i push it all again ?

don’t use @def here, follow the blueprint

Ok sir, I will keep only prepath = “maria.github.io

New link is Dr. Maria Giovanna Dainotti

   ~/Maria    master !1    git push --set-upstream origin master    ✔

remote: Permission to raman-maker/maria.github.io.git denied to raman-maker.
fatal: unable to access 'https://github.com/raman-maker/maria.github.io/': The requested URL returned error: 403
   ~/Maria    master !1                                 128 ✘  27s 

I have difficulty in pushing up prepath addition.

it is still not working even after git push . Please see changes GitHub - raman-maker/Maria.github.io here. Dr. Maria Giovanna Dainotti
Please look my prepath in config.md file below.

<!--
-->
+++
author = "Raman Kumar"
mintoclevel = 2
prepath  = "https://github.com/raman-maker/Maria.github.io"

# Add here files or directories that should be ignored by Franklin, otherwise
# these files might be copied and, if markdown, processed by Franklin which
# you might not want. Indicate directories by ending the name with a /.
# Base files such as LICENSE.md and README.md are ignored by default.
ignore = ["node_modules/"]

# RSS (the website_{title, descr, url} must be defined to get RSS)
website_title = "Maria Giovanna Dainotti"
website_descr = "Example website using Franklin"
website_url   = "https://tlienart.github.io/FranklinTemplates.jl/"
+++

<!--
-->
\newcommand{\R}{\mathbb R}
\newcommand{\scal}[1]{\langle #1 \rangle}

You are mixing up the adress of the repository

which links to the main branch reporitory where only two files are but for example not the file you can find in the source code of your generated html at

https://raman-maker.github.io/Maria.github.io/

which does of course not exist (you see that by looking at the repository). Not only is the URL itself wrong, it also starts with a / which looks at the current URLs base path and starts from there with https:/// - you will not find anything there even if there would be a css folder with the Franklin css in the repo, which it isn’t .
What you want to link to is

https://raman-maker.github.io/Maria.github.io/

as a prefix to get the css at the place where it is namely

https://raman-maker.github.io/Maria.github.io/css/franklin.css

(copy this to your browser and you see it works and delivers a css). This is what you want to end up with having in the <link rel=> s href. And that is also explained in the tutorial on Franklin.

What changes should i do and where ?? where in line 5 should i correct it ?

The shortest guess is – as explained in my very long last answer – your PREPATH is wrong, it has a / upfront with is wrong and the adress you postet in there is also wrong, it is currently the adress of the GitHub repository but it should be set to the URL you are deploying the page to.
Line 5 refers to your deployed HTML where the <link rel= is at, since I can not point to your code, since you do not provide code here.

But I do not know what it is set to, since even after mentioning that 3 times by now, you never provided any insight into any code, so I can only describe what I see not what is to fix. You also never describe what you tried and where you are at.
So I can only solve the “inverse problem”, looking at the result and guessing what your code might be. That is challenging, takes a lot of time, and I can only give you hints what the reason might be, since you never provide examples. So I write looong answers, and you answer with further very short questions. That is not much fun.

And at this point - after mentioning all this a fourth time – and presuming you do this page for someone else, I think you might even get paid (and I at this point don’t) – so I give up now.

1 Like

Sir , I am just learning to make it even the professor does not know that i am making website for her. .

Posting her personal data (though possibly publicly available) here – is kind of creepy, you should then maybe focus on a project or your own page instead.

2 Likes

NO, Actually her original website is bad so i thought to make it better. I am nothing to make my own website.

I do not think that is a good idea to do that without asking her.
Even less ok is to post her data here.

1 Like

Nothing changed in website . How to make changes ?

I made my website for myself since I can do with my data what I want. Also: Over my own website containing my data, I have full control, that is, I can take that down if I want to. I do not want to, since that page represents my research.

But using other persons data, even if publicly available, is not nice. Posting that data somewhere else (for example here) – is not ok.

Concerning your latest screenshot. Please read again what Thiebaut wrote (no I will not @ mention him) on deploying a homepage and the pre path. That page explains what you have to do with the pre path. And please – I am writing that for the fifth time now – read this Please read: make it easier to help you .

Finally, please take her data down and do a project that does not use other peoples personal data.

PS: The website did change – you just have not read any of the previous posts about how the pre path works. its called pre path for a reason and not url-prefix for example.

Ok sir , now website is working but still one error that https://raman-maker.github.io/Maria.github.io/Publications/ is not working till yet. i had to set prepath = Maria.github.io/. thanks for your hint. Now i would like to delete her data , but how can i delete it ? should i put flag in it ?

Also for the sixth post without code, I am not a code wizard, so I can not tell you why Publications does not work.

If you want to delete it I would just delete the whole GitHub repository and all traces on the GitHub pages and start a new Franklin project.

Yeah, it’s not very cool to do that without consent.


text:
# Variational inference with Normalizing Flows

I keep coming back to this ICML 2015 paper by Rezende and Mohamed (arXiv version). While this is not due to the particular novelty of the papers contents, I agree that the suggested approach is very promising for any inference approach, be it VI or adaptive Monte Carlo. The paper adopts the term normalizing flow for refering to the plain old change of variables formula for integrals. With the minor change of view that one can see this as a flow and the correct but slightly alien reference to a flow defined by the Langevin SDE or Fokker-Planck, both attributed only to ML/stats literature in the paper.
The theoretical contribution feels a little like a strawman: it simply states that, as Langevin and Hamiltonian dynamics can be seen as an infinitesimal normalizing flow, and both approximate the posterior when the step size goes to zero, normalizing flows can approximate the posterior arbitrarily well. This is of course nothing that was derived in the paper, nor is it news. Nor does it say anything about the practical approach suggested.
The invertible maps suggested have practical merit however, as they allow “splitting” of a mode into two, called the planar transformation (and plotted on the right of the image), as well as “attracting/repulsing” probability mass around a point. The Jacobian correction for both invertible maps being computable in time that is linear in the number of dimensions.

# A non-parametric ensemble transform method for Bayesian inference

This 2013 paper by Sebastian Reich in the Journal on Scientific Computing introduces an approach called the Ensemble Transport Particle Filter (ETPF). The main innovation of  ETPF, when compared to SMC-like filtering methods, lies in the resampling step. Which is

1.  based on an optimal transport idea and
2. completely deterministic.

No rejuvenation step is used, contrary to the standard in SMC. While the notation is unfamiliar to me, coming from an SMC background, I’ll adopt it here: by $\{x_i^f\}_{i=1}^M$ denote samples from the prior with density $\pi_f$ (the $f$, meaning forecast, is probably owed to Reich having done a lot of Bayesian weather prediction). The idea is to transform these into samples $\{x_i^a\}_{i=1}^M$ that follow the posterior density $\pi_a$ (the $a$ meaning analyzed), preferably without introducing unequal weights. Let the likelihood term be denoted by $p(y|x)$ where $y$ is the data and let $w_i = \frac{p(y|x_i^f)}{\sum_{j=1}^M p(y|x_i^f)}$ be the normalized importance weight. The normalization in the denominator stems from the fact that in Bayesian inference we can often only evaluate an unnormalized version of the posterior $\pi_a(x) \propto p(y|x) \pi_f(x)$.

Then the optimal transport idea enters. Given the discrete realizations $\{x_i^f\}_{i=1}^M$, $\pi_f$ is approximated by assigning the discrete probability vector $p_f = (1/M,\dots,1/M)^\top$, while $\pi_a$ is approximated by the probability vector $p_a=(w_1,\dots, w_m)^\top$. Now we construct a joint probability between the discrete random variables distributed according to $p_f$ and those distributed according to $p_a$, i.e. a matrix $\mathbf{T}$ with non-negative entries summing to 1 which has the column sum $p_f$ and row sum $p_a$ (another view would be that $\mathbf{T}$ is a discrete copula which has prior and posterior as marginals). Let $\pi_\mathbf{T}(x^f,x^a)$ be the joint pmf induced by $\mathbf{T}$. To qualify as optimal transport, we now seek $\mathbf{T}^* = \mathrm{arg min}_\mathbf{T} \mathbb{E}_{\pi_\mathbf{T}} \|x^f - x^a\|_2^2$ under the additional constraint of cyclical monotonicity. This boils down to a linear programming problem. For a fixed prior sample $x^f_j$ this induces a conditional distribution over the discretely approximated posterior given the discretely approximated prior $\pi_{\mathbf{T}^*}(\cdot|x^f_j) =\pi_{\mathbf{T}^*}(x^f_j, \cdot)/\pi_f(x^f_j) = M \pi_{\mathbf{T}^*}(x^f_j, \cdot)$.

We could now simply sample from this conditional to obtain equally weighted posterior samples for each $j =1,\dots,M$. Instead, the paper proposes a deterministic transformation using the expected value $x^a_j = \mathbb{E}_{\pi_{\mathbf{T}^*}(\cdot|x^f_j)} x^f_i = \sum_{i=1}^M M t^*_{ij} x^f_i$. Reich proves that the mapping $\Psi_M$ induced by this transformation is such that for $X^f \sim \pi_f$, $\Psi_M(X^f) \sim \pi_a$ for $M \to \infty$. In other words, if the ensemble size M goes to infinity, we indeed get samples from the posterior.

Overall I think this is a very interesting approach. The construction of an optimal transport map based on the discrete approximations of prior and posterior is indeed novel compared to standard SMC. My one objection is that as it stands, the method will only work if the prior support covers all relevant regions of the posterior, as taking the expected value over prior samples will always lead to a contraction.

Of course, this is not a problem when M is infinite, but my intuition would be that it has a rather strong effect in our finite world. One remedy here would of course be to introduce a rejuvenation step as in SMC, for example moving each particle  $x^a_j$ using MCMC steps that leave $\pi^a$ invariant.

# Operator Variational Inference

This NIPS 2016 paper by Ranganath et al. is concerned with Variational Inference using objective functions other than KL-divergence between a target density $\pi$ and a proposal density $q$. It’s called Operator VI as a fancy way to say that one is flexible in constructing how exactly the objective function uses $\pi, q$ and test functions from some family $\mathcal{F}$. I completely agree with the motivation: KL-Divergence in the form $\int q(x) \log \frac{q(x)}{\pi(x)} \mathrm{d}x$ indeed underestimates the variance of $\pi$ and approximates only one mode. Using KL the other way around, $\int \pi(x) \log \frac{pi(x)}{q(x)} \mathrm{d}x$ takes all modes into account, but still tends to underestimate variance.

As a particular case, the authors suggest an objective using what they call the Langevin-Stein Operator which does not make use of the proposal density $q$  at all but uses test functions exclusively. The only requirement is that we be able to draw samples from the proposal. The authors claim that assuming access to $q$ limits applicability of an objective/operator. This claim is not substantiated however. The example they give in equation (10) is that it is not possible to find a Jacobian correction for a certain transformation of a standard normal random variable $\epsilon \sim \mathcal{N}(0,I)$  to a bimodal distribution. However their method is not the only one to get bimodality by transforming a standard normal variable and actually the Jacobian correction can be computed even for their suggested transformation! The problem they encounter really is that they throw away one dimension of $\epsilon$, which makes the tranformation lose injectivity. However by not throwing the variable away, we keep injectivity and it is possible to compute the density of the transformed variables. The reasons for not accessing the density $q$ I thus find rather unconvincing.

To compute expectations with respect to $q$, the authors suggest Monte Carlo sums, where every summand uses an evaluation of $\pi$ or its gradient. As that is the most computationally costly part in MCMC and SMC often times, I am very curious whether the method performs any better computationally than modern adaptive Monte Carlo methods.

# Talk on Reproducing Kernel Hilbert Spaces in machine learning

Yesterday I gave a talk on Reproducing Kernel Hilbert Spaces (RKHSs) in machine learning, in the Uncertainty Quantification seminar organized by Tim Sullivan. In earlier meetings, Tim himself an Han Cheng Lie gave talks on Vladimir Bogachevs use of RKHSs in his book on Gaussian Measures, which does not seem to mention where the “Reproducing Kernel” part comes from. Which is why I decided to start out with and concentrate on kernels. I pointed out the equivalence of a very simple classification algorithm using the dot product in an RKHS with the usage of KDEs for classification (at least for a certain class of positive definite kernels that are also densities).

You can take a look at my Jupyter Notebook online or download it from Github.

# Accelerating Stochastic Gradient Descent using Predictive Variance Reduction

During the super nice International Conference on Monte Carlo techniques in the beginning of July in Paris at Université Descartes (photo), which featured many outstanding talks, one by Tong Zhang particularly caught my interest. He talked about several variants of Stochastic Gradient Descent (SGD) that basically use variance reduction techniques from Monte Carlo algorithms in order to improve the convergence rate versus vanilla SGD. Even though some of the papers mentioned in the talk do not always point out the connection to Monte Carlo variance reduction techniques.

One of the first works in this line, Accelerating Stochastic Gradient Descent using Predictive Variance Reduction by Johnson and Zhang, suggests using control variates to lower the variance of the loss estimate. Let $L_j(\theta_{t-1})$ be the loss for the parameter at $t-1$ and jth data point, then the usual batch gradient descent update is $\theta_{t} =\theta_{t-1} - \frac{\eta_t}{N} \sum_{j=1}^N\nabla L_j(\theta_{t-1})$ with $\eta_t$ as step size.

In naive SGD instead one picks a data point index uniformly $j \sim \mathrm{Unif}(\{1,\dots,N\})$ and uses the update $\theta_{t} =\theta_{t-1} - \eta_t \nabla L_j(\theta_{t-1})$, usually with a decreasing step size $\eta_t$ to guarantee convergence. The expected update resulting from this Monte Carlo estimate of the batch loss is exactly the batch procedure update. However the variance of the estimate is very high, resulting in slow convergence of SGD after the first steps (even in minibatch variants).

The authors choose a well-known solution to this, namely the introduction of a control variate. Keeping a version of the parameter that is close to the optimum, say $\tilde\theta$, observe that $\nabla L_j(\tilde\theta) - \frac{1}{N} \sum_{i=1}^N \nabla L_i(\tilde\theta)$ has an expected value of 0 and is thus a possible control variate. With the possible downside that whenever $\tilde\theta$ is updated, one has to go over the complete dataset.

The contribution, apart from the novel combination of knowledge, is the proof that this improves convergence. This proof assumes smoothness and strong convexity of the overall loss function and convexity of the $L_j$ for the individual data points and then shows that the proposed procedure (termed stochastic variance reduced gradient or SVRG) enjoys geometric convergence. Even though the proof uses a slightly odd version of the algorithm, namely where $\tilde\theta \sim\mathrm{Unif}(\{\theta_0,\dots,\theta_{t-1}\})$. Rather simply setting  $\tilde\theta = \theta_{t-1}$ should intuitively improve convergence, but the authors could not report a result on that. Overall a very nice idea, and one that has been discussed in more papers quite a bit, among others by Simon Lacoste-Julien and Francis Bach.

# Nonparametric maximum likelihood inference for mixture models via convex optimization

This arXival by Feng and Dicker deals with the problem of fitting multivariate mixture estimates with maximum likelihood. One of the advantages put forward being that nonparametric maximum likelihood estimators (NPMLEs) put virtually no constraints on the base measure $G_0$. While the abstract claims  their approach works for arbitrary distributions as mixture components, really they make the assumption that the components are well approximated by a Gaussian (of course including distributions arising from sums of RVs because of the CLT). While theoretically NPMLEs might put no constraints on the base measure, practically in the paper first $G_0$ is constrained to measures supported on at most as many points as there are data points. To make the optimization problem convex, the support is further constrained to a finite grid on some compact space that the data lies on.

The main result of the paper is in Proposition 1, which basically says that the finite grid constraint indeed makes the problem convex. After that the paper directly continues with empirical evaluation. I think the method proposed is not all that general. While the elliptical unimodal (gaussian approximation)  assumption would not be that problematic, the claimed theoretical flexibility of NPMLE is not really bearing fruit in this approach, as the finite grid constraint is very strong and gets rid of most flexibility left after the gaussian assumption. For instance, the gaussian location model fitted is merely a very constrained KDE without even allowing the ability of general gaussian mixture models of fitting the covariance matrix of individual components. While a finite grid support for location and covariance matrix is possible, to be practical the grid would have to be extremely dense in order gain flexibility in the fit. While it is correct that the optimization problem is becoming convex, this is bought for the price of a rigid model. However, Ewan Cameron assured me that the model is very useful for astrostatistics, and I realized that it might be so in other contexts, e.g. adaptive Monte Carlo techniques.

A minor comment regarding the allegation in the paper that nonparametric models lack interpretability: while this is certainly true for the model proposed in the paper and mainstream bayesian nonparametric models, this is not a given. One notable interpretable class of models are Mixture models with a prior on the number of components by Miller and Harrison (2015).


text:
# Romeo is missing!!!!!!!!!!!!!!

Level pending

The sum $\sum_{n=1}^{\infty}\frac{n}{2015^n},$ can be represented as$$\frac{a}{b}$$ where $$a,b$$ are positive coprime integers, find the value of $$Romeo=a+b$$

×


text:
## Use logistic-growth models

Exponential growth cannot continue forever. Exponential models, while they may be useful in the short term, tend to fall apart the longer they continue. Consider an aspiring writer who writes a single line on day one and plans to double the number of lines she writes each day for a month. By the end of the month, she must write over 17 billion lines, or one-half-billion pages. It is impractical, if not impossible, for anyone to write that much in such a short period of time. Eventually, an exponential model must begin to approach some limiting value, and then the growth is forced to slow. For this reason, it is often better to use a model with an upper bound instead of an exponential growth model, though the exponential growth model is still useful over a short term, before approaching the limiting value.

The logistic growth model is approximately exponential at first, but it has a reduced rate of growth as the output approaches the model’s upper bound, called the carrying capacity. For constants a, b, and c, the logistic growth of a population over time x is represented by the model

$f\left(x\right)=\frac{c}{1+a{e}^{-bx}}$

Figure 6 shows how the growth rate changes over time. The graph increases from left to right, but the growth rate only increases until it reaches its point of maximum growth rate, at which point the rate of increase decreases.

Figure 6

### A General Note: Logistic Growth

The logistic growth model is

$f\left(x\right)=\frac{c}{1+a{e}^{-bx}}$

where

• $\frac{c}{1+a}$ is the initial value
• c is the carrying capacity, or limiting value
• b is a constant determined by the rate of growth.

### Example 5: Using the Logistic-Growth Model

An influenza epidemic spreads through a population rapidly, at a rate that depends on two factors: The more people who have the flu, the more rapidly it spreads, and also the more uninfected people there are, the more rapidly it spreads. These two factors make the logistic model a good one to study the spread of communicable diseases. And, clearly, there is a maximum value for the number of people infected: the entire population.

For example, at time = 0 there is one person in a community of 1,000 people who has the flu. So, in that community, at most 1,000 people can have the flu. Researchers find that for this particular strain of the flu, the logistic growth constant is = 0.6030. Estimate the number of people in this community who will have had this flu after ten days. Predict how many people in this community will have had this flu after a long period of time has passed.

### Solution

We substitute the given data into the logistic growth model

$f\left(x\right)=\frac{c}{1+a{e}^{-bx}}$

Because at most 1,000 people, the entire population of the community, can get the flu, we know the limiting value is = 1000. To find a, we use the formula that the number of cases at time = 0 is $\frac{c}{1+a}=1$, from which it follows that = 999. This model predicts that, after ten days, the number of people who have had the flu is $f\left(x\right)=\frac{1000}{1+999{e}^{-0.6030x}}\approx 293.8$. Because the actual number must be a whole number (a person has either had the flu or not) we round to 294. In the long term, the number of people who will contract the flu is the limiting value, = 1000.

### Analysis of the Solution

Remember that, because we are dealing with a virus, we cannot predict with certainty the number of people infected. The model only approximates the number of people infected and will not give us exact or actual values.

Figure 7 gives a good picture of how this model fits the data.

### Try It 5

Using the model in Example 5, estimate the number of cases of flu on day 15.

Solution


text:
Question: vegdist for beta diversity
0
4 months ago by
nabiyogesh0 wrote:

Hi,

I am trying to use vegan bioconducter package for beta diversity and permutation analysis for amplicon data but it is giving distance according to ASV instead of sample names, please help me with it.

> werra_sp <- read.table("convent.fert.root.count.txt",header=T,sep='\t',check.names=F,row.names=1)
> str(werra_sp)
'data.frame':   1327 obs. of  18 variables:

$Root-19.S46.L001: int 44 0 52 16 13 0 0 32 7 0 ...$ Root-22.S56.L001: int  0 0 114 0 0 0 0 40 7 0 ...

$Root-24.S66.L001: int 43 0 484 24 0 6 0 17 0 0 ...$ Root-25.S76.L001: int  22 0 82 19 0 0 0 31 0 22 ...

$Root-26.S6.L001 : int 0 14 0 0 0 0 0 10 0 0 ... > str(werra_env) 'data.frame': 18 obs. of 2 variables:$ Treatment: Factor w/ 1 level "convent.fert.": 1 1 1 1 1 1 1 1 1 1 ...

\$ Region   : Factor w/ 2 levels "Mymensingh","Rajshahi": 1 1 1 1 1 1 1 1 1 2

> dist_werra <- vegdist(werra_sp^0.25, method= 'bray')
> dis

> dist_werra
270d52396ceaab2f1506f5a6c6100c10
d644684b08ae9b136307d9d2ce8975c0                       0.89217116
aed34f36d535976c247278bec289fd12                       0.36933629
030329dbd6777daa2f0a75400b60b583                       0.59543568

Thanks

vegan • 94 views
written 4 months ago by nabiyogesh0

thanks, it is resolved, I just need to transpose the count data.


text:
# pz202101

Astrophysicist Sheperd Doeleman Awarded National Academy of Sciences Henry Draper Medal
Thursday, January 21, 2021
Prize Announcement

Sheperd (Shep) Doeleman, an astrophysicist at the Center for Astrophysics | Harvard & Smithsonian, has been named the recipient of the National Academy of Sciences' 2021 Henry Draper Medal. As founding director of the Event Horizon Telescope (EHT), Doeleman is widely known for his pivotal role in capturing the first image of a supermassive black hole in 2019.

This year's Henry Draper Medal recognizes Doeleman's vision and decades-long leadership in developing the instruments and global telescope arrays necessary to produce the world’s first black hole image.

"It's an honor and quite humbling to receive the medal. To bring a black hole into focus has been the central theme of my career, and to capture the image was really a dream fulfilled," Doeleman says. "At the same time, the EHT could not have achieved its goals without the exceptionally hard work and dedication of the entire collaboration. It has been an absolute privilege and joy to work with teams at MIT, the CfA, and across the U.S. and world on this grand scientific adventure. When we saw the telltale 'shadow,' a ring of light bent in the immense gravity of black hole, we were all speechless."

Awarded every four years, the Henry Draper Medal is presented with a $25,000 cash prize. Doeleman will share the award with Heino Falcke of Radboud University. "There is no more spectacular scientific result than the iconic image of the supermassive black hole in the center of galaxy M87," says Charles Alcock, director of the Center for Astrophysics. "I'd like to extend my sincere congratulations to both Doeleman and Falcke for their greatly deserved recognition with the Henry Draper Medal." Doeleman's interest in black holes dates back to his graduate student days at the Massachusetts Institute of Technology, where he served as a teaching assistant (TA) to physicist and Nobel laureate Rainer Weiss. Weiss still recalls Doeleman’s energy and enthusiasm as a TA. "He was a superb teacher, full of knowledge and whimsy. The students were delighted with him," Weiss says. "If you had a free moment, he would tell you how interesting it might be to actually 'see' a black hole. At the time, he probably didn't realize how to do it, nor how difficult it would be. But he stuck with the idea." It was at MIT that Doeleman focused on how to improve the bandwidth, sensitivity and magnification power of radio telescopes, which at the time were not powerful enough to image black holes, or even peer into the dark, energy-sucking cores of the galaxies where they live. Looking back, Doeleman recalls that he was driven by curiosity of the great, mysterious objects, but there was never any assurance of success. “It was a time of great risk. Could we make this work? Could we imagine, design and build the systems and the instrumentation that we needed to do this?" Spearheaded by Doeleman, the EHT project started as a small group of just 10 to 20 researchers in the 2000s. The hard work paid off in 2008 when Doeleman and his team used their new technology to measure the size of Sagittarius A*, the supermassive black hole in the center of our Milky Way galaxy. Four years later, the team glimpsed a spinning black hole that powers a cosmic jet of material erupting from the heart of galaxy M87. The success confirmed that visualizing a black hole was both technically and scientifically possible, launching Doeleman on a voyage to capture the first image of one. By 2017, the EHT had exploded into a massive border-hopping team of more than 300 people, each working at various facilities to build and synchronize a global array of radio dishes that formed a virtual, Earth-sized telescope. The final array was composed of eight observatories, including locations in Hawaii, Chile, Mexico, Arizona, the South Pole and Spain. "No one knew if the black hole shadow would be observable," says France Cordova, physicist and 14th director of the National Science Foundation. "It took belief and courage on Shep's part to persist with this project and to aggregate a diverse and passionate team, all in the face of funding challenges and doubts on the part of some about whether the objectives could be accomplished." In April 2019, however, Doeleman’s vision finally became reality when his team unveiled the first direct, visual evidence of a supermassive black hole and its shadow. The image made the front page of hundreds of newspapers around the world and led to some of the world’s most respected scientific awards, including the 2020 Breakthrough Prize in fundamental physics; the American Astronomical Society's 2020 Bruno Rossi Prize; the NSF’s 2019 Diamond Achievement Award; and now, the Henry Draper Medal. Doeleman and Falcke will be formally presented with the award at the annual meeting of the National Academy of Sciences in April 2021. "Many people made important contributions to the Event Horizon Telescope," Cordova says. "At the same time, we should recognize the herculean efforts of the pioneer who took risks, both in career and in intellectual focus, to champion and launch a new, extremely technically challenging approach in observational astronomy — with a result that simply astounded the world." ### Shep Doeleman holds a B.A. from Reed College and a Ph.D. in astrophysics from MIT. Doeleman served as assistant director of the MIT Haystack Observatory prior to joining the Center for Astrophysics | Harvard & Smithsonian in 2012, where he is founding director of the EHT. Doeleman is a 2012 Guggenheim Fellow and co-founder of the Harvard Black Hole Initiative — the first center dedicated to the interdisciplinary study of black holes. Funded by a$12.7 million grant from the NSF, Doeleman is currently designing a next-generation Event Horizon Telescope to capture real-time videos of black holes.

About the Center for Astrophysics | Harvard & Smithsonian

The Center for Astrophysics | Harvard & Smithsonian is a collaboration between Harvard and the Smithsonian designed to ask—and ultimately answer—humanity’s greatest unresolved questions about the nature of the universe. The Center for Astrophysics is headquartered in Cambridge, MA, with research facilities across the U.S. and around the world.

Media Contact: