In preparation for an introductory talk on category theory, I recently spent some time thinking about natural transformations. The first example, or maybe the second, that everyone gives to motivate the concept of a natural transformation is the double dual: a vector space is naturally isomorphic to its double dual, and category theory makes this notion precise by saying that there is a natural isomorphism between the identity functor and the double dual functor $\text{Vec}_k\to\text{Vec}_k$. At this point, whoever is giving the example cautions that the dual functor $\text{Vec}_k^{\text{op}}\to\text{Vec}_k$ is not naturally isomorphic to the identity functor, and this is because making an isomorphism between a vector space and its dual requires choosing a basis.  But no one ever proves it! Implicitly, there is a "theorem" here to the following effect:     "Theorem": There is no natural isomorphism between the identity functor $\text{Vec}_k\to\text{Vec}_k$ and the dual functor $\text{Vec}_k^{\text{op}}\to\text{Vec}_k$.   The problem with this "theorem" is that, to my knowledge, it doesn't make sense to talk about a natural transformation between a covariant and a contravariant functor. The obvious commutative diagram to write down, something like $$ \newcommand{\ra}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\la}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xleftarrow{\quad#1\quad}\!\!\!\!\!\!\!\!} \newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.} % \begin{array}{ll} V &amp; \ra{f} &amp; W \\ \da{\eta_V} &amp; &amp; \da{\eta_W} \\ V^* &amp; \la{f^*} &amp; W^* \\ \end{array}, $$  will almost certainly not commute -- take, for instance, $f=0$. This failure is caused by the contravariance of the dual functor, not its unnaturality.  My question, then, is this: make precise the claim that there does not exist a natural isomorphism between the identity functor and the dual functor, and prove it.
I've read in several places that one motivation for category theory was to be able to give precise meaning to statements like, "finite dimensional vector spaces are canonically isomorphic to their double duals; they are isomorphic to their duals as well, but not canonically."  I've finally sat down to work through this, and -  Okay, yes, it is easy to see that the "canonical isomorphism" from $V$ to $V^{**}$ is a functor that has a natural isomorphism (in the sense of category theory) to the identity functor.  Also, I see that there is no way that the functor $V\mapsto V^*$ could have a natural isomorphism to the identity functor, because it is contravariant whereas the identity functor is covariant. My question amounts to:     Is contravariance the whole problem?   To elaborate:   I was initially disappointed by the realization that the definition of natural isomorphism doesn't apply to a pair of functors one of which is covariant and the other contravariant, because I was hoping that the lack of a canonical isomorphism $V\rightarrow V^*$ would feel more like a theorem as opposed to an artifact of the inapplicability of a definition.  Then I tried to create a definition of a natural transformation from a covariant functor $F:\mathscr{A}\rightarrow\mathscr{B}$ to a contravariant functor $G:\mathscr{A}\rightarrow\mathscr{B}$. It seems to me that this definition should be that all objects $A\in\mathscr{A}$ get a morphism $m_A:F(A)\rightarrow G(A)$ such that for all morphisms $f:A\rightarrow A'$ of $\mathscr{A}$, the following diagram (in $\mathscr{B}$) commutes:  $$\require{AMScd}\begin{CD} F(A) @&gt;m_A&gt;&gt; G(A)\\ @VF(f)VV @AAG(f)A\\ F(A') @&gt;&gt;m_{A'}&gt; G(A') \end{CD}$$  This is much more stringent a demand on the $m_A$ than the typical definition of a natural transformation.  Indeed, it is asking that $m_A=G(f)\circ m_{A'}\circ F(f)$, regardless of how $f$ or $A'$ may vary. Taking $\mathscr{A}=\mathscr{B}=\text{f.d.Vec}_k$, $F$ the identity functor and $G$ the dualizing functor, it is clear that this definition can never be satisfied unless $m_V$ is the zero map for all $V\in\text{f.d.Vec}_k$ (because take $f$ to be the zero map). In particular, it cannot be satisfied if $m_V$ is required to be an isomorphism.     Is this the right way to understand (categorically) why there is no natural isomorphism $V\rightarrow V^*$?   As an aside, are there any interesting cases of some kind of analog (the above definition or another) of natural transformations from covariant to contravariant functors?  Note: I have read a number of math.SE answers regarding why $V^*$ is not naturally isomorphic to $V$. None that I have found are addressed to what I'm asking here, which is about how categories make the question and answer precise. ( was closest.) Hence my question here.
ASP.NET MVC controller actions that return JSON or partial html Reading the target of a .lnk file in Python? I'm trying to read the target file/directory of a shortcut (.lnk) file from Python. Is there a headache-free way to do it? The  is way over my head. I don't mind using Windows-only APIs.  My ultimate goal is to find the "(My) Videos" folder on Windows XP and Vista. On XP, by default, it's at %HOMEPATH%\My Documents\My Videos, and on Vista it's %HOMEPATH%\Videos. However, the user can relocate this folder. In the case, the %HOMEPATH%\Videos folder ceases to exists and is replaced by %HOMEPATH%\Videos.lnk which points to the new "My Videos" folder. And I want its absolute location. I have a shapefile with contours and their heights.   Is it possible to make a DEM from contours in QGIS without using GRASS?   I found  but the answer is for ArcGIS Desktop. Why didn't the basilisk bite in Chamber of Secrets destroy the Horcrux? As the title asks, why didn't the basilisk bite received in the Chamber of Secrets destroy the Horcrux inside the bitten person?   Yes, I know Fawkes quite quickly healed the bite wound with his phoenix tears, but when Harry used the basilisk fang to destroy Tom Riddle's diary the destruction of that Horcrux was immediate. When Ron hit the locket with the Sword of Gryffindor, it was destroyed immediately. Although the destruction of the ring occurred off-page, Dumbledore used the Sword of Gryffindor to destroy it, so presumably, like the locket, it was gone right away. Nagini died straightaway when Neville decapitated her. The destruction of the Hufflepuff cup happens off-page. The diadem seems to have been destroyed by Fiendfyre immediately as well, as when Harry examined it outside the Room of Requirement it was already leaking a blood-like substance, and then it cracked in half. When Voldemort hit Harry with Avada Kedavra in the forest, Harry woke up in limbo with the last fragment of Voldemort's soul - that awful flayed baby-like being - separated from him immediately.   Is there a logical/canon-based explanation for why the fragment of Voldemort's soul residing in Harry wasn't destroyed upon Harry being bitten by the basilisk?  NOTE: I've read the HP Wiki's entry on Horcruxes; however, I find the HP Wiki to be inconsistent in its accuracy, so I'm hesitant to accept the Wiki's explanation on the matter. I'd prefer an explanation constructed from information in the books or a statement by JKR, or the like. I have been wondering about the differences between model paramters and model hyperparameters, as well as what their categorization means for a learning problem.  Is the distinction between model parameters and hyperparameters only about reducing the complexity of the problem or are there implications for the 'model quality' to be considered?  Let's consider an example from (1, Eq. 2.43), a linear expansion of basis functions   $$f_\theta(x) = \sum_{m=1}^{M} \theta_m h_m(x), $$  where $h_m\:\forall m=1,...,M$ is some function of $x$, $\theta=[\theta_1,...,\theta_M]^\intercal$ is a vector of the parameters of the model and $M$ is the number of basis functions.   In my understanding, we would consider $\theta$ to contain the parameters of the model, while $M$ is a .  To quote the Wikipedia article of hyperparameter that I linked above:     In machine learning, a hyperparameter is a parameter whose value is   set before the learning process begins. By contrast, the values of   other parameters are derived via training.   It makes sense treating the values in $\theta$ as parameters that should be learned from the data, similar to the coefficients in a linear model - it is surely far more reliable  and  specifying them manually would be quite annoying, although it's not impossible. But what about $M$? It surely is easier to pick some integer value for it. But would it really be terrible to determine $M$ based on the data, too? Probably not, as that is what we would do if we search a grid of possible values for the best performing one.   Let's consider the above basis expansion model and choose Gaussian kernel functions to serve as basis functions. As the Kernel itself has parameters too  this makes the problem a bit more complicated.  $$f_\theta(x) = \sum_{m=1}^{M}\theta_m K_{\lambda_m}(\mu_m,x), $$ with $\mu_1,...,\mu_m$ being the location of the kernels and $\lambda_1,...,\lambda_m$ their scales/bandwidths.  Friedman et al. write in (1, p. 36)        "In general we would like the data to dictate them as well. Including   these as parameters changes the regression problem from a   straightforward linear problem to a combinatorially hard nonlinear   problem. In practice, shortcuts such as greedy algorithms or two stage processes are used."   I see that if we were to treat $M$, $\theta_1 ... \theta_M$, $\mu_1 ... \mu_M$ and $\lambda_1 ... \lambda_M$, as model parameters, this problem would be really complex, especially with the choice of $M$ determining the number of the other parameters. But what if we simplify the model definition - let us for example use the same scale/bandwidth for each kernel, that gives us only one parameter $\lambda$. Furthermore, let's say we specify $\mu_1 ... \mu_M$ based on some heuristic, which would mean we treat it as a hyperparameter.  This gives us   $$f_{\theta,\lambda}(x) = \sum_{m=1}^{M}\theta_m K_\lambda(\mu_m,x), $$  Besides increased complexity of the involved optimization problem, does treating $\lambda$ as a parameter rather than a hyperparameter have other negative or undesired effects?      (1) Friedman, Jerome, Trevor Hastie, and Robert Tibshirani. The   elements of statistical learning. Vol. 1. No. 10. New York: Springer   series in statistics, 2001. Determining whether two $k$-chromatic graphs are isomorphic (respecting vertex coloration) How can I use "." as the delimiter with String.split() in java Create a directly-executable cross-platform GUI app using Python How can I block all traffic *except* Tor? Transforms moving around the 3D cursor? I think I accidentally pressed something to make it like this:    See how the XYZ arrows are at the 3D cursor instead of those vertexes I've selected?  How do I fix that? Whenever I select on a vertex or something, those blue, red, green arrows would always be where I selected, now it just keeps going to the 3D cursor. Is it possible for test error to be lower than training error Is it possible to have test error lower than training error?  I have a classification problem with 2000 samples, 500 of which are positives, 1500 are negatives. I split my data into 70% training data, 30% test data.  Run random forest with 200 estimators and cv=10. I did this several times and compared the recall and precision score and notice the scores for my test set is significantly better. Is this possible? Putting a piece of code in between two html tags in Solaris On a solaris HTML file, how do I insert between an html tag and head tag? through bash scripting.  I have an html tag that looks like this:  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:arf="http://scap.nist....-format/1.1" lang="en"&gt;   I want to insert a script written in text file, inside this 'SOLARIS' run HTML file, AFTER the long &lt;html....&gt; tag and BEFORE &lt;head&gt; tag, meaning BETWEEN the two tags, How do I do that?  I want to test using the bash commands to do it for one file at a time as well as multiple file in a folder directory. Will I have to use the folder path in my BASH code? Will I have to use FOR loop or interation in my BASH code? What would be the right code. Note: it is SOLARIS run html file not LINUX one. The name of my HTML file is report.usc20.html.  These are the lines of script that I want to use that are in my backbutton_and_scroller_script.txt file:  &lt;div id="button"&gt;&lt;a href="http://.....index.php"&gt;Back To The Hardening Page&lt;/a&gt;&lt;/div&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://arrow.scrolltotop.com/arrow78.js"&gt;&lt;/script&gt; &lt;noscript&gt;Not seeing a &lt;a href="http://www.scrolltotop.com/"&gt;Scroll to Top Button&lt;/a&gt;? Go to our FAQ page for more info.&lt;/noscript&gt; This post has been locked; locked posts can't be voted on Move EFI System Partition to another drive Evaluate definite interval of normal distribution I have dual boot configured with Windows 7 (32bit) and Ubuntu 12.04(64bit). I installed Ubuntu after windows, now my windows is corrupt due to some virus and I need to reinstall it. Currently when I start my PC, grub loader comes up and I need to select Ubuntu or Windows.   I was wondering how can I install windows again and still have my Ubuntu install? Is there a way to do this?  I do not want to install Ubuntu again and lose my settings and data there.   Thanks, Ketan Inertial forces and centre of mass Is inertial force always attached to the centre of mass of the object? Why? What rules cause this to happen?  See the  below of the leaned bike in a corner.    The force $m\frac{v^2}{r}$ pointing to the right is the centrifugal force (inertial force - because it's a rotating reference frame, therefore a non-inertial reference frame). It is attached to the centre of gravity of the bike.  I'm thinking that inertial force is attached to the centre of mass because of the fact that it should simply avoid creating a torque on the object. That's intuitive, but there must be a general rule that allows us to conclude that. If I know $\| f_n - f \|_{L^p(\mathbb{R})} \to 0$ as $n \to \infty$, do I know that $\lim_{n \to \infty}f_n(x) = f(x)$ for almost every $x$? How to tell the probability of failure if there were no failures? I was wondering if there is a way to tell the probability of something failing (a product) if we have 100,000 products in the field for 1 year and with no failures? What is the probability that one of the next 10,000 products sold fail? Help! My party isn't challenged? While I've been running my campaign, I'm starting to get stumped. I am playing with a party of four, and we recently switched from 3.5 to Pathfinder, but the problem was the same in both situations.  No matter what I throw at the party, they seem to have no problems. Even if I put them up against something that is supposed to be 'Epic' or 'overwhelming' in terms of CR, they make out just fine. The one exception to this is when I had several encounters in one day that taxed them to near death. Usually I have about two encounters a day, but that day I had four encounters, with two of them being APL+1 and the other two being APL+2, and that was challenging. But other than that nothing seems to faze them!  How can I make the game more challenging without making it harder?  Just for reference, the party is fairly standard, and low level (level 4):   Wizard (tends to resort to mind-affecting spells, or grease if the creature is immune) Cleric (heals a lot, but always has spells / healing left over) Rogue (sneak attack, of course, which is more potent in Pathfinder) Fighter (gets enlarged and in-charge'd)