Marketing Prediction
Bank Deposits Prediction Model
Function get_data():
training dataset
url<string>
URL of a training CSV file
testing dataset
url<string>
URL of a testing CSV file
Returns pandas.dataframe, pandas.dataframe
Usage
data_train, data_test = get_data(train = 'https://raw.githubusercontent.com/../banking_dataset_train.csv', test = 'https://raw.githubusercontent.com/../banking_dataset_test.csv')
Function preprocess_inputs():
training dataset
*pandas.dataframe*
Model training dataset in dataframe
testing dataset
*pandas.dataframe*
Model testing dataset in dataframe
model_name
string
Model name as a string Default = "Logistic_Regression" | "Support_Vector_Machine" "Support_Vector_Machine_Optimized" "Decision_Tree" "Neural_Network" "Random_Forest"
Returns pandas.dataframe, pandas.dataframe
Usage
X, y = preprocess_inputs(data_train, data_test, "Random_Forest")
Function pretrained():
model_name
string
Model name as a string Default = "Logistic_Regression" | "Support_Vector_Machine" "Support_Vector_Machine_Optimized" "Decision_Tree" "Neural_Network" "Random_Forest"
Returns model
Usage
model = pretrained("Random_Forest")
Function train():
training dataset
*pandas.dataframe*
Model training dataset in dataframe
testing dataset
*pandas.dataframe*
Model testing dataset in dataframe
model_name
string
Model name as a string Default = "Logistic_Regression" | "Support_Vector_Machine" "Support_Vector_Machine_Optimized" "Decision_Tree" "Neural_Network" "Random_Forest"
Returns model
Usage
model = train(data_train, data_test, "Random_Forest")
Function predict():
test dataset
*pandas.dataframe*
Model test dataset in dataframe
model
function()
Model function from pretrained / train
Returns array
Usage
print(predict(X_test, model))
Last updated