Closed ZachOID closed 4 years ago
model = LogisticRegression()
model.fit(x_train, y_train)
predicted= model.predict(x_test)
predicted = number.inverse_transform(predicted)
test_modified['Loan_Status']=predicted
outcome_var = 'Loan_Status'
classification_model(model, df,predictors_Logistic,outcome_var)
test_modified.to_csv("Logistic_Prediction.csv",columns=['Loan_ID','Loan_Status'])``
its sayinginit() got an unexpected keyword argument 'n_folds'
fixed in #3
Create logistic regression object
model = LogisticRegression()
Train the model using the training sets
model.fit(x_train, y_train)
Predict Output
predicted= model.predict(x_test)
Reverse encoding for predicted outcome
predicted = number.inverse_transform(predicted)
Store it to test dataset
test_modified['Loan_Status']=predicted
outcome_var = 'Loan_Status'
classification_model(model, df,predictors_Logistic,outcome_var)
test_modified.to_csv("Logistic_Prediction.csv",columns=['Loan_ID','Loan_Status'])``
its sayinginit() got an unexpected keyword argument 'n_folds'