How should new variables to be added in logistic regression model in production? We have built a LR model (online SGD ) in Spark. There are more that 15 categorical variables only as independent variables.  At run time new values come in few of the columns.  We have used StreamingLinearRegressionWithSGD of Spark Mlib to build the model.  
How should I handle new values in the model at run time? Any guidance would be helpful.  
How does model handle the coming of new variables at run time on production in industry? (Irrespective for tool/framework used to build model)? 
 A: When you create logistic regression model, you estimate the values of the coefficients ($\beta$'s) that allow you to predict your dependent variable. 
Let's say you create your first model, and we name it m1, which was built using your first dataset, let's name this ds1. Now, m1 was created using all the values in ds1, and so if you update the dataset, your model has already been created and your estimates remains static forever unless you do something about about it. 
In your case, you are getting new data, but that can be interpreted in two ways. Let's say you have a categorical variables with levels $a$, $b$, $c$ and then your data set (ds1) gets updates to ds2 in one of the following two ways:


*

*Some of the subjects in your study change between $a$, $b$ and $c$, in which case, if your model is robust then you don't necessarily have to update your model as you have already accounted for the effects of those 3 levels. If on the other hand they are updated because they were incorrect, then you should definitely update your model (by rebuilding it).

*A new level $d$ has been added to your categorical variable. This is another case where you should definitely rebuild your model because your model is not accounting for that new level and won't be able to give you an actual prediction.
The only way to update your model is by rebuilding it again by using your new data set, so that you would have a new model m2 which was built on the data set ds2.
Hope that helped!
A: In general, you training data should be big enough and representative to production data. Therefore we should not expect to see unseen factor levels in the production.
However, in real world any thing can happen, it is possible to see some new levels in production, BUT it should be very small.
You can treat them similar missing values replace the new levels with modes. Because the amount is small, it would not have big impact on performance.
A: I haven't worked on MLlib earlier but in general the only way is to re-train the data with the new values.
When a categorical variable with n levels is used as a feature, the logit model creates (n-1) coefficients, during prediction the machine will search for the new values' coefficients and eventually throws an error. 
The following error occurs in R when I add a new level U in gender and predict using an already created model with 2 levels(M, F)
Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : 
  factor Gender has new level U

Relevant information can be found here
