пятница, 16 августа 2019 г.

Logistic Regression 12

Logistic Regression. In this example, a logistic regression is performed on a data set containing bank marketing information to predict whether or not a customer subscribed for a term deposit. The logistic regression, using the 1010data function g_logreg(G;S;Y;XX;Z) , is applied to the Bank Marketing Data Set, which contains information related to a campaign by a Portuguese banking institution to get its customers to subscribe for a term deposit. As a response, the column y is used, which is yes if a customer has subscribed for a term deposit. Open the Bank Marketing data set ( pub.demo.mleg.uci.bankmarketing ). These operations create a computed column for each of the categories, where a 1 in the column indicates that the category is true for that row. For instance, in the following screenshot, the rows where hsng = 1 indicate that the client had a housing loan (i.e., housing = 'yes' in the original table), and the rows where h_unk = 1 indicate that it is unknown if the client had a housing loan (i.e., housing = 'unknown' ). See Dummy Variables for a list of the dummy variables used here and their meanings. This creates a column named model that contains the results of the logistic regression: Clicking on the > opens a window containing a summary of the model output: You should see results similar to the following: A number of new columns containing the various fit statistics (as well as some intermediary columns that are used in the calculation of the fit statistics) will be added to the table. For example, the following columns show deviance and AIC: The columns below show the standard error, z-values, and p-values for both the intercept (indicated by const in the column names) and the age variable: Let's chart the results for our training data: Create computed columns that contain the prob_score and z_estimate for just the training data. Let's chart the results for our test data: Create computed columns that contain the prob_score and z_estimate for just the test data. The results should look similar to the following charts:

Комментариев нет:

Отправить комментарий