I'm learning logistic regression on Coursera.  In the class, we say the logistic regression model is $h_\theta(x) = p(y=1) =\frac{1}{1+e^{-\theta^Tx}}$. When making predictions, we say that $y=1$ if $h_\theta(x) \ge .5$ and $y=0$ otherwise. The cost function we use to find the parameters $\theta$ given the training set is $J(\theta)=\frac{1}{2m}\sum (-y^{(i)}h_\theta(x^{(i)}) - (1-y^{(i)})(1-h_\theta(x^{(i)})))$.  But couldn't we predict the exact same thing using linear regression? Our linear model is $a = \theta^TX$ and we output $y=1$ if $a \ge0$ and $y=0$ otherwise. We could make our cost function $J(\theta)=\frac{1}{2m}\sum (-y^{(i)}g(a) - (1-y^{(i)})(1-g(a)))$ where $g$ is the sigmoid function. Using linear regression with this new cost function and a threshold of $0$ would give us exactly the same predictions as logistic regression.  So why do we use logistic regression instead of linear regression with a new cost function? Is it just because the probability in logistic regression is more easily interpretable than the real number outcome in linear regression? Or is there another reason?
Recently I began studying machine learning, however I failed to grasp the intuition behind .   The following are the facts about logistic regression that I understand.   As the basis for hypothesis we use . I do understand why it's a correct choice, however why it's the only choice I don't understand. Hypothesis represents the probability that the appropriate output is $1$, therefore the domain of our function should be $[0,1]$, this is the only property of sigmoid function I found useful and appropriate here, however many functions satisfy this property. In addition, sigmoid function has a derivative in this form $f(x)(1-f(x))$, but I don't see the utility of this special form in logistic regression.   Question: what so special about sigmoid function, and why we cannot use any other function with domain $[0,1]$? The cost function consists of two parameters ${\rm Cost}(h_{\theta}(x),y)=-\log(h_{\theta}(x))$ if $y=1, {\rm Cost}(h_{\theta}(x),y)=-\log(1-h_{\theta}(x))$ if $y=0$. In the same was as above, I do understand why it's correct, however why is it the only form? For example, why couldn't $|h_{\theta(x)}-y|$ be a good choice for the cost function?  Question: what is so special about the above form of cost function; why cannot we use another form?   I would appreciate if you could share your understanding of logistic regression.
$f : S^1 \to\mathbb R$ is continuous then $f(x)=f(-x)$ for some $x\in S^1$ Question is to prove :  $f : S^1 \to \mathbb R$ is continuous then $f(x)=f(-x)$ for some $x\in S^1$  I guess it would be helpful to use intermediate value theorem  Assuming $f(x)\neq f(-x)$ then given any $p\in (f(-x),f(x))$ (assuming $f(-x)&lt;f(x)$) there exists $y\in (-x, x)$ such that $f(y)=p$  I am not very sure of how to use this..   It would be helpful if someone can give some hint which would help me to solve this..  Thank you. I can understand the choice of material, silicon 28, but why is it a sphere rather than (say) a cube? Article   I would have thought that a sphere would have been the hardest shape to machine accurately. "He is king" vs "He is a king." I'm reading a book and encountering the phrase "insert name is king" a lot. I'm wondering, what's the difference between them? When and why should I use "He is king" instead of "He is a king"?   Examples:        Tommen is king now   Yet if neither one is king, still, how could it be Lord Renly?   And he is a king, and you’re just a spy   Everyone else is a king or prince these days      Same with other words:        They elected him president.   They called him a thief. Proving $\sqrt{2}+\sqrt[3]{3}$ is algebraic. How do you explain the value of native files to an uneducated client? If you design a piece for print. It gets reproduced several times over the course of a few years. Then the client doesn't return for any work for a few more years. And suddenly you are contacted asking for native files (Indesign, Illustrator, Photoshop). As the client puts it, "We just want to be able to make minor changes, we aren't designers."  Now, there is absolutely value in the native files. They are my "secret recipe" as a designer and anyone asking for that recipe should provide compensation for the ease of reusing, repurposing, and altering the recipe.  How do you explain to this client that there is value in the native files?  How do you counter the "But we already paid for the design." argument?  Note: I know I own the files. I know my contract states I own the files. Heck even without a contract, US Copyright law states I own the files.  What I'm seeking is an elegant, less argumentative, method of explaining the file ownership to the uneducated client. Reciting legal statutes and contract clauses doesn't often make for friendly client relations. My goal is to find a method of explaining so it is fully understood by the client without the appearance of a contract clause which forces them to do something against their will. I want the client to respect and not resent these types of contract clauses. What caused the apocalypse in the Hunger Games? So the stories of the Hunger Games are set in , a post-apocalyptic society situated in North America. Is there anything to explain what caused the Apocalypse? Whether from the main books, any extra material or interviews? (No fanfic please.)  As well as the cause, is there any indication of when the apocalypse happened? And how long after the apocalypse are the events of the Hunger Games? Why do light disappears the moment we switch off the source (inside the wooden box)? I don't want my users to change the system wallpaper. How do I the lock the wallpaper down? Update  Users are changing wallpaper by right clicking the picture and choosing set as wallpaper. How to restrict this behaviour?  Is it possible to remove Backgrounds Tab from Appearance Preferences? If yes how? To show that Fermat number $F_{5}$ is divisible by $641$. How can I show that  $F_{5}=2^{2^5}+1$ is divisible by $641$. JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output Show that any set in a metric space can be written as the intersection of open sets Show that any set contained in the metric space $(X, d)$ can be   written as the intersection of open sets.   Definitions: A set $A \subseteq X$ is open if $\forall x \in A$, $\exists \varepsilon&gt;0$ such that $B_{\varepsilon}(x) \subseteq A$. A set $C \subseteq X$ is closed if and only if $X \setminus C$ is open.   I also know that the intersection of a finite collection of open sets is open and that any open ball contained in $X$ is open. How can I prove this question? What are some good examples of a function  $f : \mathbb{R} \to \mathbb{R}$ where its derivative is equal to its inverse? I attempted to find a monomial that satisfied it by starting with $f(x) = ax^b$ and showing that $f^{-1}(x) = f'(x) \implies b-1=\frac{1}{b} \implies b=\phi$ and got $$f(x) = \frac{x^\phi}{\sqrt[\phi]{\phi}}$$ Which seems to work according to WolframAlpha, but I'm having trouble double-checking it. Any other ideas? This is a  about redirecting from http to https in Apache Related:     I have an Appache web server which serves both http://example.com/ and https://example.com/. I want to redirect all http requests to https. Currently I'm using this .htaccess rule to redirect http requests to https. RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}   It's working as expected for example.com but the same rule is not working for sub links, when I access existing links, like example.com/about it will still load in http, no redirection happens for existing links. How can I make Apache redirect all http requests to https? What is the difference between kernel drivers and kernel modules? I am currently working on a project to create a (not prepaid) postage label.  In java, I would go about doing this by creating a bufferedimage and adding various other images to it to create what I want.  What I want is to put text, converted to an image, onto a template letter, to make a proper postage label.    For example, imagine I was given a document with blank spaces such as:  "Name: _________"  This document is in the form of an image, and I want to use apex and visualforce (the page is already constructed, I am just stuck at the image manipulation part) to add whatever name the user types in onto the image and pack it and email the new image.  The question I have here is: where do I even start?  Java is a little nicer when it comes to image manipulation, as far as I can see.  I've looked into using a web service and sending a soapxml request to return a proper encoded image, but I haven't found a web service that can do this.  Any pointers would be nice. Thanks. I have a directory that I am trying to clean out that contains both files and subdirectories.  What I am trying to do is simple: move all the files into another directory, but leave all the sub-directories as they are.  I am thinking something like:  mv [*_but_no_dirs] ./other_directory   It seems like there should be a simple way to do this with wildcards * and regex...  Anyone have ideas? What really is an indeterminate form? We can apply l’Hôpital’s Rule to the indeterminate quotients $ \dfrac{0}{0} $ and $ \dfrac{\infty}{\infty} $, but why can’t we directly apply it to the indeterminate difference $ \infty - \infty $ or to the indeterminate product $ 0 \cdot \infty $?  Furthermore, why can’t we call $ \infty + \infty $ and $ \infty \cdot \infty $ indeterminate forms?  I’m new to calculus, so please clear up my concepts if you can. Thanks! Bread and butter is/are my breakfast? Bread and butter (is or are) my breakfast?  And what's the difference between the above sentence and saying "My breakfast is bread and butter"?  Thanks. Is it normal for BibTeX to replace similar author names with "------"? In my .bib file, I have two entries with exactly the same author names:  @article{Seshadrinathan2010A-Subjective-St,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....  @article{Seshadrinathan2009Study-of-Subjec,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....   When cited after each other, and typeset with the IEEEtran bibliography style, the .bbl file reads:  \bibitem{Seshadrinathan2010A-Subjective-St} K.~Seshadrinathan, R.~Soundararajan, A.~C. Bovik, and L.~K. Cormack, ``A   subjective study to evaluate video quality assessment algorithms,''   \emph{SPIE Proceedings Human Vision and Electronic Imaging}, 2010.  \bibitem{Seshadrinathan2009Study-of-Subjec} ------, ``Study of subjective and objective quality assessment of video,''   \emph{IEEE Transactions on Image Processing}, 2009.   As you can see, the author names have been replaced with ------. It looks like this in the final PDF:    Is this normal behavior? I am travelling to Athens, Greece, shortly, and have seen . Should I be worried? Should I cancel my trip?  Update  It's fine, taxis are currently on strike, but Syntagma Sqaure is fine: