When working with high dimensional data, it is almost useless to compare data points using euclidean distance - this is the   However, I have read that using different distance metrics, such as a cosine similarity, performs better with high dimensional data.  Why is this? Is there some mathematical proof / intuition?  My intuition is that it's because the cosine metric is only concerned with the angle between data points, and the fact that the plane between any two data points and the origin is 3 dimensional. But what if two data points have a very small angle but lie "far away" from each other (in an absolute difference sense) - then how would they still be considered close / similar?
I have seen somewhere that classical distances (like Euclidean distance) become weakly discriminant when we have multidimensional and sparse data. Why? Do you have an example of two sparse data vectors where the Euclidean distance does not perform well? In this case which similarity should we use?
What is JavaScript's highest integer value that a number can go to without losing precision? Design problem - Implement an approval process on case, which sends email to approver showing some additional info, which should not be visible to case owner/agent (who clicked on "Submit for approval" button).  Possible solution - All that additional info will not be stored on Case (otherwise agent will also be able to see it). I am creating a child object to case, where all that additional info be stored. We can make sure agent does not have access to that child object (lets call it ChildObj).   In the email template used, we can include info about that child object. From what i understand, standard email templates dont allow cross object reference. We probably need to use visualforce email templates.  Questions -  1) Can anyone see/point out any issues with that design? 2) I am very new to salesforce. Can anyone give me any example of how i will access child record's field? I mean there won't be any lookup or anything to child object, right? How do i access a field on the child object? Any clue would be helpful Is there any advantage to using pedal straps over clipless pedals? I recently made the switch to Ubuntu. Everything on my laptop works fine except my hybrid graphics card. It is Intel graphics combined with Nvidia GeForce GT650M. I tried Bumblebee, but primusrun doesn't work (segmentation fault, core dumped) and optirun works with glxspheres64, but steam games look worse with optirun than with Intel graphics (e.g. Surgeon Simulator 2013 runs fine with Intel and hangs a lot with optirun)   I tried Nvidia Prime, but it gives me a black screen on startup after install, so I can't do anything and have to power off my PC with the power button. I also tried nvidia-prime 0.5 on Ubuntu 14.04, and then I get 'low-graphics mode' and I can't get to Unity. What fallacy dismisses problems by presenting "bigger" problems? Wasn't really sure how to phrase this, but I'm thinking of an instance in which someone diminishes a problem by presenting one of larger scope - as a rather shoddy example, "x political problem in America doesn't matter because half the world's population is starving."  I honestly have no idea if this is considered fallacious or not, but for some odd reason I can't shake the feeling that someone has described it to me as a fallacy before. Am I crazy or is there something to this (or something similar)? I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name").   What is the most effective way of removing/deleting a folder/directory that is not empty? Which SUSY models are affected by the recent LHCb result? Often I need to recall the different \tracing commands; and a couple of times I stumbled on some webpages that worked fine for me; sadly, I didn't keep them, and my searches don't take me there anymore.   So I thought I'd ask about links to where one can read a list of \tracing commands?   For instance,  mentions:  \tracingall \tracingassigns \tracingcommands \tracinggroups \tracingifs \tracinglostchars \tracingmacros \tracingnesting \tracingonline \tracingoutput \tracingpages \tracingparagraphs \tracingrestores \tracingstats \tracingscantokens   .. but, I'm pretty sure there was something like \tracingboxes (and not so sure if there was something like \tracingglues); yet I cannot find any resources mentioning those. Are mixed geometry types allowed in shapefiles? Does the shapefile support mixed geometry types (ie. point and polygon all in the same file)? Can you create images like this:    when you have something like  0 = green (#54ff00) 1 = white (#ffffff) 2 = red   (#ff0000) 3 = blue  (#0048ff)  Image (Python list of integers defined above): [[2,0,0,0,0,0,0],  [0,3,0,0,0,0,0],  [0,3,2,1,1,0,0],  [0,3,2,2,2,1,1],  [0,3,2,0,0,1,0],  [0,0,0,0,0,1,0],  [0,0,0,0,0,1,0]]   with TikZ?  How far I got  The following MWE defines all colors, produces a grid of the correct size (though the size is determined by hand):  \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usepackage{xcolor}  \begin{document}     \newcommand\n{7}     \definecolor{green}{HTML}{54FF00}     \definecolor{wite}{HTML}{FFFFFF}     \definecolor{red}{HTML}{FF0000}     \definecolor{blue}{HTML}{0048FF}     \begin{tikzpicture}         \foreach \x in {1,...,\n}{             \foreach \y in {1,...,\n}{                 \begin{scope}[shift={(\x,\y)}]                   \draw [fill=green] (0,0) rectangle (1,1);                 \end{scope}             }         }     \end{tikzpicture} \end{document}   Of course, I could simpy make a lot of adjusted                   \begin{scope}[shift={(\x,\y)}]                   \draw [fill=green] (0,0) rectangle (1,1);                 \end{scope}   but I've wondered if this can (with reasonable effort) be done in TikZ / LaTeX.  My problem is giving TikZ the color array. I don't have any idea how to do this. I only know two types of looks in TikZ:  \foreach \x in {0,1,2,3,4,5}{...} \foreach \number in {1,...,\n}{...}   I have never seen a nested over a 2D-array. All I have seen so far were 1D-Arrays of tuples (with fixed tuple size). Why do proof authors use natural language sentences to write proofs? I haven't read very many proofs. The majority of the ones that I've read, I've read in my first-year proofs textbook. Nevertheless, its first chapter expatiates on the proper use of English in mathematical proofs, so I suspect that most proof authors do use both English (or another natural language) and formal proof systems for writing their proofs. However, I can't imagine many circumstances where mathematical notation and a formal proof system wouldn't suffice to convey the author's pertinent thoughts.   I suspect that proof authors have good reasons for making use of both English and formal expressions in their proofs, but I can't think of what those reasons are. Why do proof authors use English and formal expressions to write proofs? Are there stylistic rules (or guidelines) that state how, and in what parts of the proof, an author should, and shouldn't, use English? If I have a 18-55mm lens, is there a point in buying a 35mm prime lens? How to set font to Arial throughout the entire document? In preamble, I have:  \renewcommand{\familydefault}{\sfdefault} \usepackage{arial}   but it doesn't work.  How do I set my font to Arial throughout the entire document?  UPDATE:  In short, both answers work.  It really depends on the environment. If using LaTeX and don't mind using a cloned font then choose Herbert's answer. If using XeLaTex and want to use the authentic font then choose Leo's. XeLaTeX update [20201004] and item ball in Beamer Beamer item balls go missing while compiling in XeLateX since yesterday's TeXlive update, however, the same code works with pdfLaTeX. Any solution, please. Here is my MWE: \documentclass{beamer}  \setbeamertemplate{itemize item}[ball] \setbeamertemplate{enumerate item}[ball]  \begin{document}  \begin{frame} \frametitle{A tested title} text \begin{enumerate}     \item this is an item \end{enumerate} text3 \begin{itemize}     \item this is an item \end{itemize} \end{frame} \end{document} "None is" or "none are" "Its" and "it's" - how to remember? What is a good mnemonic rule that an English learner can use to remember the difference between its (possessive adjective: a team has started its lunch) and it's (verb: it's raining)? default permissions for /var/www I was trying to open a file and write to it with PHP at /var/wwwfolder but it wasn't working so I did  sudo chmod 777 /var/www   now I want to set the permissions for /var/www to the default. what are the default permissions for /var/www? How to use a variable for a key in a JavaScript object literal? Free way to clone HDD to SSD? Is there a free way to clone a full Windows 7 installation from HDD to SSD? (The free part is important, I know I can pay for Acronis True Image.)      SSDs are usually much smaller than HDDs which complicates matters. For instance, I have about 50GB data, my new SSD is 80GB but I still can't use Windows clone/restore system if my HDD is something like 300GB.  Therefore, I'm looking for a third party tool that will be able to:   Create a clone of my C: partition Store it onto an external USB drive Boot from some rescue / restore CD Load the image onto the new SSD   Acronis True Image seems like a tool that should support this but it's a paid-for software and the trial version cannot create clones. Acronis Migrate Easy is a fully functional tria for 15 days but need both the HDD and SSD connected at the same time which is a bit of a problem for me as a laptop user.  P.S. I almost got there combining Windows image backup combined with Acronis True Image restore CD (which can load .vhd's) but was not able to boot as some boot information were probably lost and could not be repaired using the Win7 installation DVD. One can contract I have to I've when have is a helping verb, e.g.     I've got an octopus in my pants.   Is contracting the main verb technically incorrect or merely antiquated? My father loves to say,     I've a month-old smoked shoulder I can cook for dinner,   and he sounds like a crazy old man when he does. I would like to know if I can shut him down by informing him that he is incorrect. :)