I am looking for a measure to see if the model that I have used is predicting correctly. E.g., I created a model that uses multiple independent features to predict a dependent feature. The model that I show here is Support Vector Regressor (SVR), although I use other models. During the training, I obtained an R-Squared of 0.29 and during the test, R-squared is -0.67. SVR_model.score(X_train, y_train) -&gt; 0.29 SVR_model.score(X_test, y_test) -&gt; -0.67  I am looking for a measure that gives me a single value that helps me to evaluate if the model is predicting well or not.  What could be the reasons to have a positive R-Squared in the training and a negative R-squared in the testing? How can I say if this model is predicting well? What is the best measure to use? Root Mean Square, Adjusted R-Squared?
Let's say I have some data, and then I fit the data with a model (a non-linear regression). Then I calculate the R-squared ($R^2$).  When R-squared is negative, what does that mean? Does that mean my model is bad? I know the range of $R^2$ can be [-1,1]. When $R^2$ is 0, what does that mean as well?
Jeffrey Wooldridge in his Econometric Analysis of Cross Section and Panel Data (page 357) says that the empirical Hessian "is not guaranteed to be positive definite, or even positive semidefinite, for the particular sample we are working with.".  This seems wrong to me as (numerical problems apart) the Hessian must be positive semidefinite as a result of the definition of the M-estimator as the value of the parameter which minimizes the objective function for the given sample and the well-known fact that at a (local) minimum the Hessian is positive semidefinite.  Is my argument right?  [EDIT: The statement has been removed in the 2nd ed. of the book. See comment.]  BACKGROUND Suppose that $\widehat \theta_N$ is an estimator obtained by minimizing $${1 \over N}\sum_{i=1}^N q(w_i,\theta),$$ where $w_i$ denotes the $i$-th observation.  Let's denote the Hessian of $q$ by $H$, $$H(q,\theta)_{ij}=\frac{\partial^2 q}{\partial \theta_i \partial \theta_j}$$  The asymptotic covariance of $\widehat \theta_n$ involves $E[H(q,\theta_0)]$ where $\theta_0$ is the true parameter value. One way to estimate it is to use the empirical Hesssian  $$\widehat H=\frac{1}{N}\sum_{i=1}^N H(w_i,\widehat \theta_n)$$  It is the definiteness of $\widehat H$ which is in question. How to embed Stack Overflow flair in a WordPress.com (free) blog? Has anyone successfully embedded their  on a WordPress.com-hosted blog?  The free hosted version of  (not )  from all posts before publishing. So they to strip out just about anything I can add to embed my Stack Overflow flair.  Note: I'll be switching to a paid, hosted site in the future (fixing the problem), but I'm looking for a quick, short-term solution. tables with lots of columns I have a table that lists various attributes of an individuals personal development plan; objective, time to complete objective, comments etc. The table is editable so the user can directly add comments without having to go to an intermediate form. The problem is that the client wants to add more columns and this is messing up the visual display.   The alternatives I have are:   allowing columns to expand out on click keeping essential attributes in table, rest in 'advanced edit option form' or somesuch I don't know - have you any ideas?   One more thing to add: I think the addition of extra columns is based on user feedback ...  edit: here is what I have gone for I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python.   I understand that it's not always good to do so. But how might one do this? I want to hatch the area under a curve (graph of a function) with oblique lines on an interval (to illustrate the function's integral on that interval). This can be done elegantly in gnuplot...   ...but I simply cannot reproduce this with pgfplots. The only solution I managed to find with google is the use of the patterns tikz library, however it is unacceptibly ugly:    I'm not aware of any way to alter the color, line width and - especially - the distance between the hatching lines when patterns library is employed. Is there any way to set it? (So that I can change it to resemble the gnuplot version.)  Or, should I choose a completely different approach to reproduce the gnuplot-style hatching...?  Also note that   pgfplots changes the color of the x-axis to red on the interval (which is not a critical problem, of course, but not elegant). the legend for the filling is much more logical in case of gnuplot. Can I reproduce it with pgfplots?   Here is the code I currently use:  \begin{figure}[ht!] \centering \begin{tikzpicture}     \begin{axis}[xmin=-4,xmax=4,xlabel={z},ymin=0,ymax=1]      \addplot[color=red,domain=-4:4,samples=100] {1/sqrt(2*pi)*exp(-x^2/2)};     \addlegendentry{z}     \addplot[color=red,fill=red, pattern=north east lines,  domain=0:1,samples=100] {1/sqrt(2*pi)*exp(-x^2/2)} \closedcycle;     \addlegendentry{Interval}     \end{axis} \end{tikzpicture} \end{figure} Where can I find web design projects? I am a recently graduated graphic designer. I would like to know if there are any worthwhile websites that I could present my portfolio and receive or look for job offers.  I have came across the following freelancewebsites by searching the web that seem to meet my criteria:       (the most famous website for people seeking for employers and employees)   I've also found two articles providing reviews on these types of sites:       I am new to the online freelance market. As a result, I don't have any clue which websites are mainstream for graphic designers and illustrators (which are my specialties). It's not immediately discernible to me which sites are the ones that are not a scam and are also good place for establishing myself.  I'm mainly looking for the resources that experienced designers are familiar with. I'm looking to narrow it down to the ones that have been used by those established in the industry. As a result I decided to consult the matter here and ask for input. Installing particular versions when repo has newer versions? Why does the base of this slinky not fall immediately to gravity? My guess is tension in the springs is a force > mass*gravity but even then it is dumbfounding. How to create custom config section in app.config? When to use self references or composition? I am looking for an Ubuntu version that consumes less Memory and CPU. I have read both Lubuntu and Xubuntu (The homepages, wikipedia, phoronix and other sites comparing both). But from experience, which one uses less memory and is less CPU intensive. I need to install them in very old hardware and want to persuade the owner of the hardware of the benefits of Ubuntu.  in this case I want to install 11.10 or 12.04 when it comes out. How are each behaving in those versions?  The 2 PCs I will be installing either Xubuntu or Lubuntu are:  Granpa PC:  CPU - Pentium 2 450Mhz RAM - 64MB DIMM Video - 16MB Used for - Documents and Internet. No listening to music, no looking at videos. Just using it for document writing.  The other old meat:  CPU - Pentium 3 550Mhz RAM - 128MB DIMM Video - 16MB Used for - Documents and Internet also but they want.. or maybe they are wishing for it to use it to see movies and listen to music. This one has internet. The other one does not.  UPDATE  Wanted to update this question with the test results for over 8 months worth of using Lubuntu and Xubuntu. When it comes to very old hardware, am talking about 64 MB, 128 MB or even 256 MB of RAM computers, Lubuntu is better than Xubuntu when comparing Memory usage. When it comes to CPU usage, both are the same.  This will not improve I/O Disk performance which will be the bottleneck for old computers. Also the difference in performance between Xubuntu and Lubuntu is about 10% to 20% percent in memory usage. Again, CPU usage is the same.  Now, when it comes to how responsive the Desktop is, LXDE (Lubuntu) has a much better response time than XFCE (Xubuntu). I would say about 50% or just simply noticeable to the eye. Lubuntu is similar to how Windows XP looks while Xubuntu is more like how Gnome 2 looked.  The computers (The old ones mentioned here) and 2 more are still working in excellent conditions thanks to the Ubuntu family. I also want to add I am using 13.10 for both distros. How do I stop program from skipping over getline? Could I use an IPS based TV to edit photos in a color-calibrated environment? Over the past weeks, I've been trying to get all of my color issues worked out. Getting closer, but I'm not there. I've calibrated my monitor with a friend's calibrator and that helped. I'm using the profiles provided by the local processor.  It's close. How close depends on the viewing angle.  So I'm thinking IPS monitor might be a good next step.  Googling around, I see that I could get an   Given that IPS based 22/23" monitors run $250-$300, this seems like a lot more monitor for not much more money.  What are the faults in this logic? Harry is a half-blood and Ginny is a pure-blood, so what does that make his children? I've been told it means they are pure-bloods but I can't be sure. What do you think? Good books on complex numbers I searched on this site but I found posts asking for books on complex analysis which I guess is not what I want.   I want a book on problems concerning with roots of unity, argand plane, exponential form, inequalities etc. Some examples : , , .  I don't think these types of problems are covered in a analysis book but I don't know. I think I want a book on algebra of complex numbers.   Are these topics covered in analysis book ? If not, please suggests some books on this topic. I guess my question is bit vague, sorry for that. :).      As suggested in the comments I would like to have books similar to . Difference in output between SAS's proc genmod and R's glm I'm trying to replicate a model fitted in SAS in R but the fit I'm getting gives me slightly different coefficients and standard errors.  Data:  testdata &lt;- data.frame(matrix(c("f","Test", 1.75,   16, 0,  16, 0,  1,  1, "m",    "Test", 1.75,   15, 1,  16, 6.25,   1,  0, "f",    "Test", 2.75,   4,  12, 16, 75, 1,  1, "m",    "Test", 2.75,   9,  6,  15, 40, 1,  0, "f",    "WHO",  1.75,   15, 1,  16, 6.25,   0,  1, "m",    "WHO",  1.75,   14, 2,  16, 12.5,   0,  0, "f",    "WHO",  2.75,   2,  13, 15, 86.6667,    0,  1, "m",    "WHO",  2.75,   3,  13, 16, 81.25,  0,  0 ), ncol=9, byrow=TRUE)) names(testdata) &lt;- c("sex", "vaccine", "dose", "not_p", "para", "n", "pct",                       "vacnum", "sexno")   SAS:  proc genmod data=model_data; class sex; model para/n  = dose sex vacnum    /dist=bin    link=logit   type3; run;  Analysis Of Maximum Likelihood Parameter Estimates  Parameter   DF Estimate Std Error Wald 95% Conf Lim Wald Chi-Square Pr &gt; ChiSq  Intercept   1 -9.4020   1.6220    -12.5810  -6.2230  33.60           &lt;.0001  dose        1  3.9208   0.6460      2.6546   5.1870  36.83           &lt;.0001  sex f       1  0.5574   0.5184     -0.4587   1.5735   1.16           0.2823  sex m       0  0.0000   0.0000      0.0000   0.0000    .              .  vacnum      1 -1.3221   0.5483     -2.3967  -0.2475   5.81           0.0159  Scale       0  1.0000   0.0000      1.0000   1.0000        R:  testdata$sexno &lt;- as.factor(testdata$sexno)     a &lt;- contr.treatment(2, base = 1, contrasts = TRUE)  contrasts(testdata$sexno) &lt;- a  fitreduced &lt;- glm(para/n ~ dose + as.factor(sex) + vacnum,                    family=quasibinomial(link="logit"), data=testdata)  coef(summary(fitreduced))                    Estimate Std. Error   t value    Pr(&gt;|t|) (Intercept)     -9.4013750  1.7613982 -5.337450 0.005935450 dose             3.9173794  0.7001133  5.595351 0.005007179 as.factor(sex)1  0.5704671  0.5568436  1.024466 0.363525300 vacnum          -1.3336100  0.5887552 -2.265135 0.086189704   I believe I have the right contrasts to give me a type III SS but there is a small discrepency in values, have a missed something here? Hope someone can answer my Question. I live in Milwaukee WI.My neighbor just informed me she will have to have her basement excavated. The side of her house is 14 feet away from the side of my house. I have a bi-level home. On the side of my home is a finished family room and bedroom. Should I be worried about heavy machinery doing damage to the foundation to my home that could cause problems in the future. Thank You in advance of your answers. I would like to replace the search submit button with a Font Awesome character like the Magnifier (Search Icon) character, and put Search the site inside the search box.  How can I achieve something like this? how to extend a basis Prove that simultaneously diagonalizable matrices commute Two $n\times n$ matrices $A, B$ are said to be simultaneously diagonalizable if there is a nonsingular matrix $S$ such that both $S^{-1}AS$ and $S^{-1}BS$ are diagonal matrices.      a) Show that simultaneously diagonalizable matrices commute: $AB = BA$.      b) Prove that the converse is valid, provided that one of the matrices has no multiple eigenvalues. Is every pair of commuting matrices simultaneously diagonalizable?   My attempt:  a) Let $M=S^{-1}AS$ and $P=S^{-1}BS$, then it follows that $A= S^{-1}MS$ and $B=S^{-1}PS$. Thus $AB =S^{-1}MSS^{-1}PS = S^{-1}MPS = S^{-1}PMS$ (is it wrong that I switched MP to PM?) $=S^{-1}PSS^{-1}MS=BA$.   b) How can I do this?