import pandas as pd
import numpy as np
from sklearn.cross_validation import train_test_split
from sklearn.neighbors import KNeighborsClassifier
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.tree import DecisionTreeClassifier
from sklearn.linear_model import LinearRegression
data=pd.read_csv('Orange_Telecom_Churn_Data.csv')
data.head()
x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.20, random_state=42)
model=LogisticRegression()
model.fit(x_train,y_train)
new_prediction=model.predict(testing_data)
from sklearn.metrics import accuracy_score
acc_logreg = round(accuracy_score(prediction, y_test) * 100, 2)
print(acc_logreg)
model=KNeighborsClassifier(n_neighbors=10)
model.fit(x_train,y_train)
new_prediction=model.predict(testing_data)
from sklearn.metrics import accuracy_score
acc_logreg = round(accuracy_score(prediction, y_test) * 100, 2)
print(acc_logreg)
model=DecisionTreeClassifier()
model.fit(x_train,y_train)
new_prediction=model.predict(testing_data)
from sklearn.metrics import accuracy_score
acc_logreg = round(accuracy_score(prediction, y_test) * 100, 2)
print(acc_logreg)