This is a follow up question to:  I want to know why should we use fit at all when we have fit_transform which is much faster than using fit and transform separately? After all we will always transform the training data after fitting it. Do we have any use of fit all by itself?
I'm a newbie to data science, and I do not understand the difference between the fit and fit_transform methods in scikit-learn. Can anybody explain simply why we might need to transform data? What does it mean, fitting a model on training data and transforming to test data? Does it mean, for example, converting categorical variables into numbers in training and transforming the new feature set onto test data?
Why upload rates are lower than download rates in normal internet connections? I'm trying to understand why the find command is not deleting files in one particular case. I've got the following command:  find C:\\path\\to\\Pictures\\pmcctv -name cap_*.jpg -o -name cap_*.ogg -o -name cap_*.flv -o -name cap_*.mp4 -o -name cap_*.webm -mtime +7   Which returns the files I would expect:  C:\path\to/Pictures/pmcctv/cap_20160915T193251_620067800.jpg C:\path\to/Pictures/pmcctv/cap_20160915T193322_742708800.jpg C:\path\to/Pictures/pmcctv/cap_20160916T081046_394767500.jpg C:\path\to/Pictures/pmcctv/cap_20160916T081125_615129600.jpg C:\path\to/Pictures/pmcctv/cap_20160916T081129_503678200.jpg C:\path\to/Pictures/pmcctv/cap_20160916T081255_842394600.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161008_693586800.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161012_749396800.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161043_774132200.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161150_497251900.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161154_437379600.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161337_350955300.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161341_452596000.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161412_870774000.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161443_969064400.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161554_468109900.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161558_378086000.jpg C:\path\to/Pictures/pmcctv/cap_20160916T161916_668433100.jpg   Now if I try to run the same command with -delete, the files are not deleted:  find C:\\path\\to\\Pictures\\pmcctv -name cap_*.jpg -o -name cap_*.ogg -o -name cap_*.flv -o -name cap_*.mp4 -o -name cap_*.webm -mtime +7 -delete   I've also tried with -exec rm, but they are also not deleted:  find C:\\path\\to\\Pictures\\pmcctv -name cap_*.jpg -o -name cap_*.ogg -o -name cap_*.flv -o -name cap_*.mp4 -o -name cap_*.webm -mtime +7 -exec rm {} \;   find returns no error and the files are owned by me with permissions 644.  Any idea what could be causing this?  (note: I've cut the commands to make it more readable but normally there's no line break) My rear rim brakes are squeaking loudly. I don't know what the problem is, but I am sure it has nothing to do with rain because it happens all the time even if it is dry.  Anybody have an idea what could be problem and how to solve it? It makes the rear brakes kind of useless, because if I use them I will scare the people or drivers around me. How to do the same crop on a batch of photos? I've got a batch of photos (an owl coughing up a pellet in case you're curious).  I want to make an animated GIF out of them, but the result would be improved if they were all given an identical crop first.  I'm currently using Picasa for my basic photo editing on a Windows 7 PC.  While Picasa does have batch editing, crop is not one of the items on the batch menu.  Does Lightroom have a batch crop?  If there's a way to get Picasa to show me the coordinates of the crop selection rectangle, I could also use that information to do the same crop repeatedly.  Are there any tools that let you crop an animated GIF?  I know I can create the animated GIF by uploading the component images to Google+ and then looking in the Auto Awesome area. I don't know about tools for working with animated GIFs. dpkg error: "trying to overwrite file, which is also in..." How can I make it so that each space has its own isolated dock?  Basically what I'm looking for is:   The dock in one space should not show the icon of an app that was open in another space. If I have the same program open in two different spaces, clicking on the icon in one space should not go to the app in the other space.   Is this possible natively, or with a third party program? python: restarting a loop Why didn't the Ministry use owls to find Sirius? Harry, before the Triwizard Tournament, was able to send owls to Sirius when he was in hiding (not at Grimmauld Place) just by telling them "just find him, will you?", and the owl would come back a few days later with an answer. This doesn't happen with Hedwig only, because, if I recall correctly, he uses school owls as well.  If finding Sirius was as easy as telling an owl "find him", and a 13-year-old wizard could do it, how come the Ministry had no clue as to where he was? They could've sent an owl with a summons and followed it from a distance.  Two theories, neither mentioned in the book, and both a bit unlikely:   He was living as a dog and -hopefully- the Ministry would not be able to recognize him. Unlikely because the owl would have got there anyway, so they would have guessed the dog was Sirius in disguise, not necessarily as an animagus, but maybe he could perform human-animal transfiguration (remember he was brilliant at school).. Kingsley Shacklebolt was already in charge of the hunt and Dumbledore told him Sirius was innocent and all that. Then, Kingsley would have prevented the Ministry from using any method that could've actually worked. Unlikely because they could've used owls before Dumbledore's tip, when Kingsley didn't know Sirius was innocent, and also because Kingsley was quite powerful and had the support of Crouch and others at the Ministry, so if he was in charge, they would probably have succeeded.   Your thoughts? NSDictionary with ordered keys I have an NSDictionary (stored in a plist) that I'm basically using as an associative array (strings as keys and values).  I want to use the array of keys as part of my application, but I'd like them to be in a specific order (not really an order that I can write an algorithm to sort them into).  I could always store a separate array of the keys, but that seems kind of kludgey because I'd always have to update the keys of the dictionary as well as the values of the array, and make sure they always correspond.  Currently I just use [myDictionary allKeys], but obviously this returns them in an arbitrary, non-guaranteed order.  Is there a data structure in Objective-C that I'm missing?  Does anyone have any suggestions on how to more elegantly do this? I've been riding a mountain bike for years, but I prefer to go longer distances on paved ground, so I think a road bike would be better. When I ask what is a good bike, I don't need brands or models - more like what components of the bike should I look for, and what should I avoid? Additionally, is it necessary to "go big or don't go at all" as far as spending - getting a real good quality road bike for $500 to a few thousand, or should I cheap out on a $100-200 road bike, as it is my first, then get a better one when I'm more experienced? I am trying to find the formula for the number $f(n,k)$ which is defined as the number of $k$-subsets of $[n]$ in which no two elements are consecutive numbers in $[n]$.  From the simple thinking I had made up following recursion:  $$f(n,k) = f(n-1,k) + f(n-2, k-1) $$  This is true since I can construct without last element of $[n]$ then make up $k$-subsets, then otherwise must contain the last element of $[n]$ then construct remaining $k-1$ elements among $[n-2]$ since with the last one, I can't use $n-1$.  However, I had never learned any techniques regarding changing those recursion into a well-summarized formula in terms of $n$ and $k$.  Any guidance would be appreciate. Why does ice form on bridges even if the temperature is above freezing? So with this "arctic blast" continuing, I've noticed that for my area, the temperature drops below freezing just long enough to cause freezing rain, but then the sun comes out and the temperature rises immediately. However, on bridges, ice continues to form.   How can ice form even if the temperature is above freezing? Using wilcox.test() and t.test() in R yielding different p-values Can an html element have multiple ids? I understand that an id must be unique within an HTML/XHTML page.  My question is, for a given element, can I assign multiple ids to it?  &lt;div id="nested_element_123 task_123"&gt;&lt;/div&gt;   I realize I have an easy solution with simply using a class. I'm just curious about using ids in this manner. I got a positive definite matrix $B,$ that is, $V(x) = x^TBx &gt; 0$ for any vector $ x \neq 0.$  I want to show that $ \lambda_\min \|x\|_2^2 \leq V(x) \leq \lambda_\max \|x\|_2^2$ for any $x \neq 0,$ where $\lambda_\min$ and $ \lambda_\max$ are defined by $$ \lambda_\min = \min \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B \rbrace$$ and  $$ \lambda_\max = \max \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B  \rbrace$$  Any hint please? Are there any massless (zero invariant mass) particles carrying electric charge?  If not, why not? Do we expect to see any or are they a theoretical impossibility? How to get the current date/time in Java When a user votes to close a question (for whatever reason), it would helpful to receive a notification (in the inbox) when the question is edited (either the text, tags, if it closes then is re-opened) so that the user can then modify his or her vote if the question is properly adjusted. What are the fault tolerances on the FDA food handling guidelines? Sometimes I have suggested that food that sat out a little longer than optimal may be safe to eat.    Granted, this is based on my experience, and I always qualify that it shouldn't be served to guests (and by extension, customers) and that one should determine their own tolerance to risk, but I want to know if there is information as to the methodology of the FDA guidelines.  Specifically, what is the contamination rate at n hours, and what are the initial conditions of the food and environment?  How much risk is there REALLY (in incidences per n-population and such) in a standard kitchen for food that has sat out 50%, 100%, 200%, etc. longer than recommended? How to grep a specific line _and_ the first line of a file?