Kernel: Python 3 (system-wide)
In [0]:
In [1]:
1
2
3
4
In [2]:
Import data
In [3]:
/usr/local/lib/python3.6/dist-packages/ipykernel/__main__.py:1: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support sep=None with delim_whitespace=False; you can avoid this warning by specifying engine='python'.
if __name__ == '__main__':
In [4]:
Screen Resolution | Browser | Browser Version | Device Type | Device | OS | OS Version | User Agent | Traffic Source | Combination Id | ... | Returning Visitor | Hit Time | User Language | URL | Referring URL | City | Region | Country | Goal 1 Converted | Goal 1 Converted Time | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 360x640 | Chrome Mobile | 64.0.3282 | Mobile | Samsung SM-G935F | Android | 7 | Mozilla/5.0 (Linux Android 7.0 SM-G935F Build/... | search_traffic | 1 | ... | False | 2018-03-22T08:47:39 | en-gb | https://www.mastersportal.eu/studies/56292/pha... | http://www.google.com/ | Bangalore | Karnataka | India | NaN | NaN |
1 | 1366x768 | Chrome | 64.0.3282 | Desktop | Other | Windows 10 | NaN | Mozilla/5.0 (Windows NT 10.0 Win64 x64) AppleW... | unknown | 1 | ... | True | 2018-03-22T08:47:40 | tr | https://www.mastersportal.com/studies/97603/cl... | https://www.mastersportal.com/search/ | Istanbul | Istanbul | Turkey | NaN | NaN |
2 | 1280x800 | Chrome | 65.0.3325 | Tablet | Samsung SM-T580 | Android | 7 | Mozilla/5.0 (Linux Android 7.0 SM-T580 Build/N... | unknown | 2 | ... | False | 2018-03-22T08:47:42 | es | https://www.mastersportal.com/ | https://www.mastersportal.com/?utm_source=goog... | Barcelona | Catalonia | Spain | NaN | NaN |
3 | 393x786 | Chrome Mobile | 65.0.3325 | Mobile | BND-AL10 | Android | 7 | Mozilla/5.0 (Linux Android 7.0 BND-AL10 Build/... | unknown | 1 | ... | True | 2018-03-22T08:47:41 | en-gb | https://www.mastersportal.com/universities/181... | https://www.mastersportal.com/ranking-country/... | Noida | Uttar Pradesh | India | NaN | NaN |
4 | 1366x768 | Vivaldi | 1.95.1077 | Desktop | Other | Windows 10 | NaN | Mozilla/5.0 (Windows NT 10.0 WOW64) AppleWebKi... | search_traffic | 1 | ... | False | 2018-03-22T08:47:42 | en-us | https://www.mastersportal.com/articles/2097/mo... | https://www.google.com/ | Hanoi | An Giang | Vietnam | NaN | NaN |
5 rows × 22 columns
Assignment 1
In [5]:
Index(['Screen Resolution', 'Browser', 'Browser Version', 'Device Type',
'Device', 'OS', 'OS Version', 'User Agent', 'Traffic Source',
'Combination Id', 'Converted', 'Conversion Time', 'Returning Visitor',
'Hit Time', 'User Language', 'URL', 'Referring URL', 'City', 'Region',
'Country', 'Goal 1 Converted', 'Goal 1 Converted Time'],
dtype='object')
In [6]:
Combination Id | Converted | |
---|---|---|
0 | 1 | No |
1 | 1 | No |
2 | 2 | No |
3 | 1 | No |
4 | 1 | No |
In [7]:
In [8]:
In [9]:
Browser | Device Type | OS | Traffic Source | Combination Id | Converted | Returning Visitor | Hit Time | User Language | Country | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Chrome Mobile | Mobile | Android | search_traffic | 1 | No | False | Thursday | en-gb | India |
1 | Chrome | Desktop | Windows 10 | unknown | 1 | No | True | Thursday | tr | Turkey |
2 | Chrome | Tablet | Android | unknown | 2 | No | False | Thursday | es | Spain |
3 | Chrome Mobile | Mobile | Android | unknown | 1 | No | True | Thursday | en-gb | India |
4 | Vivaldi | Desktop | Windows 10 | search_traffic | 1 | No | False | Thursday | en-us | Vietnam |
Assignment 2
In [10]:
In [11]:
In [12]:
In [13]:
In [14]:
In [15]:
In [16]:
In [17]:
Run beamsearch below
In [0]:
In [17]:
Candidates still in queue this level: 1
/usr/local/lib/python3.6/dist-packages/ipykernel/__main__.py:25: RuntimeWarning: invalid value encountered in long_scalars
End of level 1
Candidates still in queue this level: 10
Candidates still in queue this level: 9
Candidates still in queue this level: 8
Candidates still in queue this level: 7
Candidates still in queue this level: 6
Candidates still in queue this level: 5
Candidates still in queue this level: 4
Candidates still in queue this level: 3
Candidates still in queue this level: 2
Candidates still in queue this level: 1
End of level 2
Candidates still in queue this level: 10
Candidates still in queue this level: 9
Candidates still in queue this level: 8
Candidates still in queue this level: 7
Candidates still in queue this level: 6
Candidates still in queue this level: 5
Candidates still in queue this level: 4
Candidates still in queue this level: 3
Candidates still in queue this level: 2
Candidates still in queue this level: 1
End of level 3
Candidates still in queue this level: 10
Candidates still in queue this level: 9
Candidates still in queue this level: 8
Candidates still in queue this level: 7
Candidates still in queue this level: 6
Candidates still in queue this level: 5
Candidates still in queue this level: 4
Candidates still in queue this level: 3
Candidates still in queue this level: 2
Candidates still in queue this level: 1
End of level 4
[(nan, {'goed_Browser': 'Chrome Mobile'}), (nan, {'fout_Browser': 'Chrome Mobile'}), (nan, {'goed_Browser': 'Chrome'}), (nan, {'fout_Browser': 'Chrome'}), (nan, {'goed_Browser': 'Vivaldi'}), (nan, {'fout_Browser': 'Vivaldi'}), (nan, {'goed_Browser': 'Chrome Mobile iOS'}), (nan, {'fout_Browser': 'Chrome Mobile iOS'}), (nan, {'goed_Browser': 'Mobile Safari'}), (nan, {'fout_Browser': 'Mobile Safari'})]
In [0]:
In [0]:
In [0]: