logistic Regression Model - rxPredict ERROR RRS feed

  • Question

  • I have built a prediction for Lapse using logistic regression model

    My Logistic Regression model accepts two input parameters that is Amount and Method.

    Amount is a continuous variable of data type float

    Method is Discrete variable has got three possible values

    When calling rxPredict I pass the value for the two inputs i.e value for Amount and method.

    I receive the following error

    INTERNAL ERROR: In rxPredict, the number of parameters does not match the number of  variables: 3 vs. 5.

    It is my understanding that this error is shown because of the three discrete values in method as three different independent variables. Is this correct?

    How do I fix this error?

    How do I pass 5 values when there are only two input variable required to be passed?

    I am calling the rxPredict via Stored Procedure i.e,


    sp_execute_external_script@language =N'R',



    mod <- unserialize(as.raw(model));


    OutputDataSet<-rxPredict(modelObject = mod, data = InputDataSet, outData = NULL,

              predVarNames = "Score", type = "response", writeModelVars = FALSE, overwrite = TRUE);








    =N'@model varbinary(max),@Amount float,@Method nvarchar(100)',




    =@Amount ,




    RESULT SETS ((Score float));

    Monday, August 1, 2016 2:34 PM

All replies