0
0
ML Pythonprogramming~10 mins

Python ML ecosystem overview in ML Python - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the popular library for numerical computing in Python.

ML Python
import [1] as np
Drag options to blanks, or click blank then click option'
Anumpy
Bpandas
Cmatplotlib
Dsklearn
Attempts:
3 left
2fill in blank
medium

Complete the code to load a dataset from scikit-learn.

ML Python
from sklearn.datasets import [1]
data = [1]()
Drag options to blanks, or click blank then click option'
Aload_iris
Bdatasets
Cload_digits
Dload_boston
Attempts:
3 left
3fill in blank
hard

Fix the error in the code to create a simple linear regression model.

ML Python
from sklearn.linear_model import [1]
model = [1]()
Drag options to blanks, or click blank then click option'
ALogisticRegression
BRandomForestRegressor
CDecisionTreeClassifier
DLinearRegression
Attempts:
3 left
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps words to their lengths if length is greater than 3.

ML Python
{word: [1] for word in words if [2]
Drag options to blanks, or click blank then click option'
Alen(word)
Bword
Clen(word) > 3
Dword > 3
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to create a filtered dictionary with uppercase keys and values greater than zero.

ML Python
result = { [1]: [2] for k, v in data.items() if v [3] 0 }
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk
Attempts:
3 left