Logistic Regression Steps: 8 and 9
This lesson will finish introducing the implementation steps (8-9) of logistic regression.
8) Predict
Let’s use our model now to predict the likely outcome of an individual Kickstarter campaign based on the input of its independent variables.
C++
#8. Predictmodel_predict = model.predict(X_test)new_project = [0, #Comments9, #Rewards2500, #Goal157, #Backers31, #Duration in Days319, #Facebook Friends110, #Facebook Shares1, #Creator - # Projects Created0, #Creator - # Projects Backed0, ## Videos12, ## Images872, ## Words (Description)65, ## Words (Risks and Challenges)0, ## FAQs0, #Currency_AUD1, #Currency_CAD0, #Currency_EUR0, #Currency_GBP0, #Currency_NZD0, #Currency_USD0, #Top Category_Art0, #Top Category_Comics0, #Top Category_Crafts0, #Top Category_Dance0, #Top Category_Design0, #Top Category_Fashion1, #Top Category_Film & Video0, #Top Category_Food0, #Top Category_Games0, #Top Category_Journalism0, #Top Category_Music0, #Top Category_Photography0, #Top Category_Publishing0, #Top Category_Technology0, #Top Category_Theater#0, #Facebook Connected_No#0, #Facebook Connected_Yes#0, #Has Video_No#1, #Has Video_Yes]new_pred = model.predict([new_project])print(new_pred)
According to the positive binary outcome of our model [1], the new campaign is ...