Create Machine Learning Models
October 2020
Create Machine Learning Models
https://docs.microsoft.com/en-us/learn/paths/create-machine-learn-models/
Setting up local environment
$ conda create -n ml-basics python=3.7
$ conda activate ml-basics
$ pip install jupyter
$ pip install matplotlib
$ pip install pillow
$ pip install requests
$ pip install numpy
$ pip install pandas
$ pip install scikit-learn
$ pip install scikit-image
$ pip install scipy
$ pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
$ pip install tensorflow
01 - Data Exploration
https://github.com/MicrosoftDocs/ml-basics/blob/master/01%20-%20Data%20Exploration.ipynb
df_students.query('Name=="Aisha"')
Create a bar plot of name vs grade
fig = plt.figure(figsize=(8,3))
plt.bar(x=df_students.Name, height=df_students.Grade, color='orange')
# Customize the chart
plt.title('Student Grades')
plt.xlabel('Student')
plt.ylabel('Grade')
plt.grid(color='#95a5a6', linestyle='--', linewidth=2, axis='y', alpha=0.7)
plt.xticks(rotation=90)
df_students.plot.bar(x='Name', y='StudyHours', color='teal', figsize=(6,4))
var_data.plot.density()
Create a bar plot of name vs grade and study hours
df_sample.plot(x='Name', y=['Grade','StudyHours'], kind='bar', figsize=(8,5))