Skip to content

Instantly share code, notes, and snippets.

#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# BFSI CAPSTONE PROJECT - Acquisition Analytics #
#------------------------------------------------------------------------------#
#---------------------------Business Understanding-----------------------------#
# Build credit scorecard to define whether to lend a credit card to an applicant or not for the credit card provider CredX
########################################### I. BUSINESS UNDERSTANDING ####################################################
# Goal - To predict the probability of response of each prospect
# and target the ones most likely to respond to the next telemarketing campaign.
#Including all the necessary libraries
library(caret)
library(caTools)
library(ggplot2)
#### 1 Loading the required libraries
library(forecast)
library(tseries)
require(graphics)
library(hash)
library(FinCal)
#2 Data understanding and Cleaning
############################ Handwritten Digit Recognition Assignment #################################
# 1. Business Objective:
#The objective is to identify digits (between 0-9) which is in an image format
# To develop a Support Vector Machine which classifies the handwritten digits
#based on the pixel values given as features
###################################################### DATA PREPARATION ######################################################
# libraries ----
library(MASS)
library(car)
library(e1071)
library(caret)
library(ggplot2)
library(cowplot)
library(caTools)
library(ROCR)
#I. LOAD DATA SETS
#Import the "CarPrice_Assignment.csv" and store it in a variable "CarPrice".
#We us stringsAsFactors = FALSE to ensure that no attribute is stored as factor by default.
CarPrice <-read.csv("CarPrice_Assignment.csv", stringsAsFactors = FALSE)
# Lets take a look at the dataset
View(CarPrice)
# FIRST - LOAD THE DATASET
#Setting Directory
getwd()
setwd("C:/Users/chakravarthi/OneDrive/Data Analytics/Upgrad Classes/Course 2/Module 7 - Gramener case Study")
# Reading the loan.csv file to a dataframe called loan
loan<-read.csv("loan.csv")
# FIRST - LOAD THE DATASET
# 1. Load the "Uber Request Data.csv" to a data frame called uber_request_data.
uber_request_data <- read.csv("Uber Request Data.csv")
# 2. Now that the dataset is loaded to uber_request_data, let's check for its structure
str(uber_request_data)
# We see that the Request.id and Driver.id are of interger type, whereas Pickup.point, Status, Request.timestamp and Drop.timestamp are all factors.
# From this it is also clear that both the timestamps are not in proper format of date datatype.