This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
style.use("ggplot") | |
from sklearn import svm | |
import ggplot as ggp | |
from sklearn.model_selection import train_test_split | |
Data_main=pd.read_csv(filepath_or_buffer='D:\loan_data.csv') | |
np.sum(Data_main.isnull()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
employee<-read.csv("D:/WA_Fn-UseC_-HR-Employee-Attrition.csv") | |
View(employee) | |
str(employee) | |
dim(employee) | |
colnames(employee)[1]="Age" | |
library("caTools") | |
set.seed(12345) | |
emp <- sample.split(employee$Attrition,SplitRatio = 0.75) | |
emp_train <- subset(employee,emp==TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
train<-read.csv("D:/loan prediction/loan_train.csv",na.strings = c(""," ",NA)) | |
test<-read.csv("D:/loan prediction/loan_test.csv",na.strings = c(""," ",NA)) | |
View(train) | |
colSums(is.na(train)) | |
colSums(is.na(test)) | |
dim(train) | |
library(mlr) | |
summarizeColumns(train) | |
summarizeColumns(train) |