Reference for this claim: important features in data can be "hidden" in the higher PCA axes that are typically thrown out
Examples of PCA where PCs with low variance are "useful"
Recursive feature elimination and one-hot & dummy encoding? When using RFE in linear regression and logistic regression, do we one-hot encode the features (K levels and K dummy features) or dummy-encode the features (K levels and K-1 dummy features leaving one out).   As per a comment by @Matthew Drury in an answer (URL below), one hot encoding is applied for a regularized linear model and for unregularized linear model dummy encoding. My doubt is what type of encoding when using RFE without any L1/L2 penalties.    My understanding is since in RFE some features gets eliminated so if for a categorical variable with say 4 levels we do dummy encoding and have 3 features/levels in model &amp; RFE eliminated 1, we will only have 2 features/levels left and the interpretation of its coefficient would not make sense in absence of the one level which was left out as reference.  Whereas if we have done one-hot encoding and RFE considers 2 features as important and eliminates other 2 then we can very well judge/interpret the coefficients or importance of 2 features RFE keeps.  So question which type of encoding is needed to be done when using RFE with linear and logistic regression? Plotting complex numbers as an Argand Diagram How to open port via SSH tunnel? There is a system B with the following open servers: I have a web server listening on port 80 and a ssh server listening on 22. However, only port 22 is publicly available. Now, I would like to create some kind of tunnel, so that I can access B:80 from A. However, my client computer A that would like to connect to the system B is not publicly open, either.  So, all I have is a client computer A from where I would like to access the server B and, there, an open port 22. On A, no port is open or can be opened.  What (I think) I would need is to open locally (on A) some port that connects in some way through port 22 of B to port 80 on B.  Is this possibly without using any man-in-the-middle open servers with multiple ports? I must have a blind spot, but I cannot find what it is.   I made a small python script that removes VLC from the sound menu. It runs perfectly in any way I run it from the terminal or from a launcher or whatever you can think of.   What the script actually does is nothing more than get the get the current settings:  gsettings get com.canonical.indicator.sound interested-media-players   edit the list, and set the changed list by:  gsettings set com.canonical.indicator.sound interested-media-players "['newlist']"   These commands are executed by a python script,. However, when run from a cronjob (crontab -e) only the gsettings - get - part works, but not the gsettings - set - section. That the get section works fine with cron, I checked by making the script write data (the original as well as the edited) to an external file.  Not a python problem  To see if the problem is related to python code, I created a bash script that applies a changed sound menu items list. The story is the same: the bash script runs fine from the command line or a launcher, not from cron, while any other command in the same script would run fine. Also, if I add any command at the end of the script below, it works fine and it looks like the script is satisfied with its own work.  Why is the gsettings set command not working when initiated from cron?  This is the script:  #!/usr/bin/python3 import subprocess  def read_soundmenu():     # read the current launcher contents     get_menuitems = subprocess.Popen([         "gsettings", "get", "com.canonical.indicator.sound", "interested-media-players"         ], stdout=subprocess.PIPE)     return eval((get_menuitems.communicate()[0].decode("utf-8")))  def set_current_menu(current_list): # this takes no effect from cron     # preparing subprocess command string     current_list = str(current_list).replace(", ", ",")     subprocess.Popen([         "gsettings", "set", "com.canonical.indicator.sound", "interested-media-players",         current_list,         ])  current_list = read_soundmenu() for item in current_list:     if item == "vlc.desktop":         current_list.remove(item) set_current_menu(current_list) What is ground and what does it do? Strange result when removing item from a list while iterating over it Proving $\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$ I am being asked to prove that $$\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$$ I have some progress made, but I am stuck and could use some help. What I did: It holds that $$\sum\limits_{k=0}^{n}\cos(kx)=\sum\limits_{k=0}^{n}Re(\cos(kx))=\sum\limits_{k=0}^{n}Re(\cos(x)^{k})=Re(\sum\limits_{k=0}^{n}\cos(x)^{k})=Re\left(\cos(0)\cdot\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right) $$ For any $z_{1},z_{2}\in\mathbb{C}$ we have it that if $z_{1}=a+bi,z_{2}=c+di$ then $$\frac{z_{1}}{z_{2}}=\frac{z_{1}\overline{z2}}{|z_{2}|^{2}}=\frac{(a+bi)(c-di)}{|z_{2}|^{2}}=\frac{ac-bd+i(bc-ad)}{|z_{2}|^{2}}$$ hence $$Re\left(\frac{z_{1}}{z_{2}}\right)=\frac{Re(z_{1})Re(z_{2})-Im(z_{1})Im(z_{2})}{|z_{2}|^{2}}$$ Thus, $$Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=\frac{(\cos(nx)-1)(\cos(x)-1)-\sin(nx)\sin(x)}{(\cos(x)-1)^{2}+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{\cos^{2}(x)-2\cos(x)+1+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2\cos(x)+2}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(\cos(x)-1)}= \frac{=\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(-2\cdot\sin^{2}(x/2))}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(x(n+1))-\cos(nx)-\cos(x)+1}{4\sin^{2}(x/2)} $$ This is the part where I am stuck, I would appriciate any help or hint on how to continue. Edit: Given the corrections by André I get: $$(\cos(nx+x)-1)(\cos(x)-1)+\sin(nx+x)\sin(x)=\cos(nx+x)\cos(x)-\cos(nx)-\cos(x)+1+\sin(nx+x)\sin(x)$$ so $$\cos(nx+x)\cos(x)+\sin(nx+x)\sin(x)=\cos(xn+x-x)-\cos(nx)=0$$ Edit 2: I found anoter mistake in the above, I will try to correct Edit 3: When multiplying correctly the above it works out :-) Why is disk usage greater than the size of all files on it? I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that  \usepackage{array} \begin{tabular}{| c | c | m{5cm} |}   vertically centers the text in the last column, but justifies it horizontally (like text in normal paragraphs).  Update: With Jake's method, it seems both \\ and \hline cause an error. How to fix it? So I was configuring VS code on my Notebook when suddenly I noticed that my interface font got really small on my desktop, terminal and files. I use Gnome Tweaks Tool to increase my scaling factor to 1,15 , but, even though it was active, the font stayed tiny. The solution I found was moving my scaling factor, which instantly fixed my font issue, however, every time I restart my Notebook the font gets tiny again and I have to repeat the process. I tried reseting my font configuration using this command, but had no success. gsettings reset org.gnome.desktop.interface text-scaling-factor  I also tried using the command dconf reset -f /  Finally, I tried using dconf-editor, but still had no success altering the font rendering DPI or changing the scaling factor. All of the steps I mentioned fixed my fonts temporarily, but the issue still persists when I restart my Notebook I am out of ideas and even considered getting a fresh Ubuntu install by now... My video card: NVIDIA GeForce GTX 1050 GPU Prove that $f'(a)=\lim_{x\rightarrow a}f'(x)$. I am really having trouble working a problem in my course. I will post it and then add what I have thought etc.  Let p be an odd prime, then using the Euclidian Algorithm, calculated the GCD of of $x^{p-1}-1$ and $x^2+1$ in $\mathbb{Z} / p\mathbb{Z}[x]$  Also, how does $p=1 (mod4)$ tell us that  $-1$ is a square in $\mathbb{Z} / p\mathbb{Z}$, infact that $-1$ is a square here if and only if $p=1(mod4)$.  My thoughts:   I know that $$x^{p}-x=(x)(x-1)(x-2)…(x-(p-1))$$ and so that in this sense our roots will be the congruence classes of $1,2,…p-1$  and also that $$x^{p-1}-1=(x-1)(x-2)…(x-(p-1))$$  But I get lost when trying to apply the EA to these polynomials,  like how can I do it when p is arbitrary?  Preferably id like to be able to understand/see how to do the first part first i.e. using division with residue and then move on to the second part. Any insight/hint or solution to this would be great,  Thank you all  Update:  When I try to do division with residue, I just get  $$x^{p-1}-1=(x^2+1)(x^{p-3}-x^{p-5}+x^{p-7}-x^{p-9}...)$$  for example,  $p=7$  $$(x^{6}-1)=(x^2+1)(x^4-x^2+1)$$  for $p=11$  $$(x^{10}-1)=(x^2+1)(x^{8}-x^{6}+x^{4}-x^{2}+1)$$  which for specific cases tells me that 1 is the gcd, but I dont know how to generalize that for the case with arbitrary prime p. The SourceForge signon page says I can associate an OpenID with my existing SourceForge account:    I enter my currently-signed-in SourceForge account password I select the custom OpenID URL and enter https://openid.stackexchange.com I'm redirected to https://openid.stackexchange.com/account/login?&lt;session key bits&gt; I enter my openid.stackexchange.com login information there I get the error message:     Cannot Complete Login      Detected an attempt to send an assertion when the identifier () is not owned by the logged in user.    I don't understand what that means. \@seccntformat only for section I would like to add a dot between the number of the section and section name. I used   \makeatletter \renewcommand*{\@seccntformat}[1]{% \csname the#1\endcsname .} \makeatother   The problem is that, obviously, it put a dot also among subsection number and subsection name which I do not want. Is it possible to add the dot only between section number and section using low level instructions i.e. without any additional package? 3-manifold examples of homomorphisms between fundamental groups that are not induced by continuous maps Who can use magic scrolls? I'm confused about who can use scrolls in 5e. In the DMG, p139 under Magic Item Categories: Scrolls, it states that:     Any creature that can understand a written language can read the   arcane script on a scroll and attempt to activate it.   This implies that anyone can try to cast a spell using a scroll. However, on p.200 in the Spell Scroll entry it states that:     If the spell is on your class's spell list, you can use an action to read the scroll and cast its spell without having to provide any of the spell's components. Otherwise, the scroll is unintelligible.   Then there is the bit about a DC 10 + scroll spell level ability check if the spell is higher than a spell slot that you can cast.     If the spell is on your class's spell list but of a higher level than you can normally cast, you must make an ability check using your spellcasting ability to determine whether you cast it successfully. The DC equals 10 + spell's level. On a failed check, the spell disappears from the scroll with no other effect.    So, which is it? Can anyone who can read a language use a scroll (like a fighter) if they make an arcana check, or just a PC with that specific spell in their spell list (only spell casters)? How can a computer with dynamic IP work as a webserver? How can a computer with dynamic IP work as a WebServer? Leaving values blank if not passed in str.format Should the number "0" be pronounced "zero" or "oh"? I am looking for a way to replace a string in a file with a string that contains a slash by using sed.  connect="192.168.100.61/foo" srcText="foo.bar=XPLACEHOLDERX" echo $srcText | sed "s/XPLACEHOLDERX/$connect"   The result is:  sed: -e Expression #1, Character 32: Unknown option for `s'