What will the output be?
favSport = "Golf"
favSubject = "Math"
print(favSport)
Output will be Golf
Increasing the size of what will improve the performance of our Machine learning model.
The size of the dataset.
Python
What library is used to create plots in Python?
Matplotlib
True or False is what kind of variable?
Boolean
How is ML different from Traditional Programming?
In Traditional Programming the rules are written by us humans, but in ML we train a model to write the rules for us.
Name an advantage ML has over Traditional Programming.
1. More Accurate
2. Easier to Maintain/Shorter
3. Time saving
or anything along those lines
How do you display the first 5 rows of a dataframe?
dataframe.head()
John wants to import a library "matplotlib.pyplot" as plt. What is the correct syntax?
A. import matplotlib as plt
B. import matplotlib.pyplot as plt
C. import matplotlib.pyplot
The correct answer is B
What is a common filetype to import data into your AI code?
.csv
What are the ideal steps to take when creating a ML model?
1. Collect Data
2. Train the model
3. Tweak the model
4. Automate the process
What is the function we use to load a csv in a Jupyter Notebook?
import pandas as pd
pd.read_csv()
array = [[0, 9], [1, 5], [3, 8]]
What is the index of [1, 5]?
Index is 1
What is the process of making an ML model learn from data called?
Model Training
What is pandas?
How do you add a colour bar to the plot?
cbar = plt.colorbar()
What is the difference between for loops and while loops?
For loops are used to iterate through a list, and can perform actions on the items
While loops will continue to run as long as the condition is True. If not then it won't run again.
The process of converting textual features to numbers so that Computers can understand them
Ex. Replacing "Ontario" with 0, and "Quebec" with 1.
Encoding
What is machine learning?
A way computers can recognize patterns, make predictions and automate decision-making. All are based on data that has been given to the machine learning model.
How do you encode the data?
(HINT: use lambda function)
.apply(lambda x:1 if x == "Ontario" else 0)