I have a sample set of data about Leads that gets generated every day. Leads are nothing but a user expressing request to be our partner or not. Sample data set is as shown below

810029,24-DEC-17 AM,open,LeadType1
806136,30-DEC-17 AM,open,LeadType2
812134,31-DEC-17 AM,open,LeadType2
806147,31-DEC-17 AM,open,LeadType1
806166,01-JAN-18 AM,open,LeadType2
28002,04-MAR-16 AM,open,LeadType2
808156,01-JAN-18 AM,open,LeadType1
808162,01-JAN-18 AM,open,LeadType2
806257,07-JAN-18 AM,open,LeadType1
832091,17-JAN-18 AM,open,LeadType2
838079,17-JAN-18 AM,open,LeadType1
66001,26-MAR-16 AM,open,LeadType1
70001,28-MAR-16 AM,open,LeadType2
806019,23-DEC-17 AM,open,LeadType2
822064,12-JAN-18 AM,open,LeadType1
834043,14-JAN-18 AM,open,LeadType2
836053,16-JAN-18 AM,open,LeadType1
838119,19-JAN-18 AM,open,LeadType2

As you can see Lead types can be of LeadType1 or LeadType2 and this get generated every day.

In order to make sense of data I created the following plot using Python

enter image description here

The supporting code is as follows. Note I am just a Noob to Python and AI but I want to check if this proves a valid use case for Machine Learning and what should be my approach

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#%matplotlib inline
in_file = 'lead_data.csv'
mydf = pd.read_csv(in_file,encoding='latin-1')

fig, ax = plt.subplots(figsize=(15,7))
#g = mydf.groupby(['R4GSTATE','LEADTYPE']).count()['STATUS'].unstack()
g = mydf.groupby(['R4GSTATE','STATUS']).count()['LEADTYPE'].unstack()
ax.set_ylabel('Number of Leads')
ax.set_xticklabels(["%s" % item for item in g.index.tolist()], rotation=90);

Basically I just read the csv, curated the data( I have cleaned the original csv) to keep what is meaningful for me. I also created grouping of number of leads Month-Year wise so that I can see the historical lead generated every month.

I want to know if Machine Learning helps me to predict number of Lead generated in next coming months based on previous months data.

If the answer is yes then is Linear Regression the right path to explore further


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.