I would like to execute multidimensional scaling () based on a matrix of Pearson correlation coefficients. The  function takes a dissimilarity matrix as an input and I therefore need to convert my similarity matrix into a dissimilarity/distance matrix. What is the correct way of doing so?  According to  answer, a similarity matrix (S) can be converted to an euclidean distance matrix (d) via:  d = sqrt(2(1-S))   It also notes that on some occasions, the factor 2 can be omitted:  d = sqrt(1-S)   According to  paper (eq. 3.4) and  paper (eq. 3), the conversion should be done as follows:  d = 1-S   Which of those answers is correct, given that my similarity matrix has values between [-1,1] and the diagonal elements are 1 (it is symmetric)?
In Random forest algorithm, Breiman (author) constructs similarity matrix as follows:   Send all learning examples down each tree in the forest If two examples land in the same leaf increment corresponding element in similarity matrix by 1 Normalize the matrix with number of trees   He says:     The proximities between cases n and k form a matrix {prox(n,k)}. From their definition, it is easy to show that this matrix is symmetric, positive definite and bounded above by 1, with the diagonal elements equal to 1. It follows that the values 1-prox(n,k) are squared distances in a Euclidean space of dimension not greater than the number of cases.    In his implementation, he uses sqrt(1-prox), where prox is a similarity matrix, to convert it to distance matrix. I guess it has something to do with the "sqaured distances in a Euclidean space"-quoted above.  Can somebody shine a little light on why it follows that 1-prox are squared distances in a Euclidean space and why he uses squared root to get distance matrix?
Adding holes simultaneously within mesh I've got a "diagnostics" page in my ASP.NET application which does things like verify the database connection(s), display the current appSettings and ConnectionStrings, etc.  A section of this page displays the Assembly versions of important types used throughout, but I could not figure out how to effectively show the versions of ALL of the loaded assemblies.  What is the most effective way to figure out all currently referenced and/or loaded Assemblies in a .NET application?  Note: I'm not interested in file-based methods, like iterating through *.dll in a particular directory.  I am interested in what the application is actually using right now. proving of inequality $(n!)^2 \leq n^n\cdot n!\leq (2n!)$, where $n\in \mathbb{N}$ How can we prove the inequality $(n!)^2 \leq n^n\cdot n!\leq (2n!)$, where $n\in \mathbb{N}$  $\bf{My \; Try}$::  $1\leq n$  $2\leq n$  $3\leq n$  ....  ....  $n\leq n$  So $1\cdot 2 \cdot 3 ..n \leq n^n$  So $n!\leq n^n\Rightarrow (n!)^2 \leq n^n\cdot n!$  But  did not understand how can we prove $n^n\cdot n! \leq (2n!)$  Help me  Thanks SQL to generate a list of numbers from 1 to 100 How to convert a single char into an int How do I create a hinged door that opens and closes in Blender? If I knew how to do this, then it would help me also create moving control surfaces on model aircraft, such as the rudder and horizontal stabilizers. How do I perform a redirect to a custom URL after login? I am trying to redirect users to a custom URL after they logged in, but my code doesn't work.  How do I redirect users after they logged in? I know Newton's third law of motion might be the answer for this but still I am wondering how the rockets could thrust in the empty space and move in the opposite direction. I guess an astronaut wouldn't be able to push in the empty space with his hands or legs to move himself, but with a rocket engine it's possible. How? What might be the explanation for this in General Relativity? How to solve "Extra junk at end of file" when using apt? I'm trying to configure some proxies for a guest virtual machine and now I'm getting:  sudo apt-get update E: Syntax error /etc/apt/apt.conf.d/95proxy:4: Extra junk at end of file   The content of the file is:  cat /etc/apt/apt.conf.d/95proxy   Acquire::http::proxy  "http://10.0.0.60:3128/" Acquire::ftp::proxy "http://10.0.0.60:3128/" Acquire::https::proxy "http://10.0.0.60:3128/" Is there a proof that $\pi$ is an irrational number? Most math texts claim that $\pi$ is an irrational number. However, I'm having a little bit of trouble understanding that.  Since nobody has calculated all of the digits of $\pi$, how can we know that either:   one of the digits repeats (as in $\frac{10}{3}$) the number eventually terminates     Note: Please be very descriptive in your answers... I don't have anything beyond high school math. What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic? Is there any work-around if you are somewhere where images are blocked? I'm currently working in a bank, and while about 99.7% of the internet is blocked, Stack Exchange thankfully isn't (yet) however imgur is.  It means I can't view images posted alongside questions. The only workaround I have found is to search Google images for the URL, but you get a  which is a bit useless.  Does anybody know any clever tricks for viewing the images accompanying questions when you are somewhere where imgur is blocked?  Are there any plans to route the images stored on imgur through a Stack Exchange URL? What is the closed formula for finding      $$ \sum_{i=0}^{k} \binom{n}{2i}=?\quad ,k\leq \lfloor{n/2}\rfloor $$   I need summation only up to some intermediate  $k$ where $k\leq \lfloor{n/2}\rfloor$ .  SAY I need a closed formula to calculate $\binom{8}{0}+ \binom{8}{2}+\binom{8}{4} +\binom{8}{6}$  HERE $n=8$ and $k=6$ Find $(a,b)$ such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$ implies $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ Let $f$ denote any function such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$. Find the value of $a$ and $b$, assuming that $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$.   My  attempt: $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3\frac{(f(x))^3}{x^3}}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b\frac{\sin x}{x}}{x^2}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b}{x^2}=1$ As denominator is tending to zero,so numerato will also tend to zero. $1+a-b=0............................(1)$ Applying L Hospital rule, $\lim_{x\to 0}\frac{-a\sin x}{2x}=1$ So $a=-2$ and $b=-1$ But the answer given in my book is $a=\frac{-5}{2}$ and $b=-\frac{3}{2}$. I do not understand where have i gone wrong? Move files from multiple folders all into parent directory with command prompt I have multiple .rar files in multiple folders like this:    C:\Docs\Folder1\rarfile1-1.rar C:\Docs\Folder1\rarfile1-2.rar C:\Docs\Folder1\rarfile1-3.rar    C:\Docs\Folder2\rarfile2-1.rar C:\Docs\Folder2\rarfile2-2.rar C:\Docs\Folder2\rarfile2-3.rar    C:\Docs\Folder3\rarfile3-1.rar C:\Docs\Folder3\rarfile3-2.rar C:\Docs\Folder3\rarfile3-3.rar     I want to move all of the .rar files to the parent directory 'C:\Docs'. I have a lot more than 3 folders, so I was thinking of making a batch file or something. What would be the commands to do this? Thanks More than one optional argument for newcommand The \newcommand macro allows to use an optional argument for the first parameter #1 with:  \newcommand{\mycommand}[3][defaultfor1]{blah blah blah}   Is it possible to have more than one option with \newcommand? I tried Libreoffice, but its Import option while pasting in the cell is very  annoying.I also tried Gnumeric but I am not able to paste using middle button.Parcellite to make copy paste faster and middle button pasting is not working with Gnumeric. Is there any simple table maker app available that can accept only simple unformatted text? All these software are very complicated for this simple work. Prove that $\mathbb{|Q| = |Q\times Q|}$ Tiny navigation buttons and tags on responsive mobile I know it will be hard for you to tell on desktop because the resolution is so high, but the clickable text in the upper left, the icons on the upper right, and the navigation buttons at the bottom are all tiny. I have to squint to read the tags, I can't reasonably tap any navigation button except for Next without zooming, and selecting the achievements dialog, etc. is all very difficult. It seems to me that this would not be terribly difficult to change, so I am posting this feature request. I'm using a relatively large Samsung phone (Note 8), so I can imagine it would be worse on smaller phones.  Edit: I see from posted images that the responsive design on other phones looks nothing like mine. I'm wondering if it has something to do with the high resolution  where it thinks it is bigger than it is, or it's picking the wrong sizes because it's a tiny bit over some size threshold, in which case this would be a bug. Magnetic field lines When I searched the net about magnetic field lines,  told something about contour lines and that magnetic materials placed along a magnetic field has some specific loci, which i did not understand. Can someone explain it to me in details.  Also how do we know that tangent to a magnetic field line gives the direction of magnetic field? I am very confused.