Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing in

  Enroll Now

End to End ML Project - Import the libraries

First, let's import a few common modules, set a random seed so that the code can produce the same results every time it is executed. We will also ignore non-essential warning.

We will also set the rc params to change the label size for the plots' axes, x- and y-axis ticks using rc method.

matplotlib.rc(group, **kwargs)

group is the grouping for the rc, e.g., for lines.linewidth the group is lines, for axes.facecolor, the group is axes, and so on. Group may also be a list or tuple of group names, e.g., (xtick, ytick).

INSTRUCTIONS
  • Import sklearn, Numpy as np, and Pandas as pd

    import <<your code goes here>>
    import numpy as <<your code goes here>>
    import pandas as <<your code goes here>>
    
  • Set the random.seed to 42

    np.random.seed(<<your code goes here>>)
    
  • Import Matplotlib as mpl, and Pyplot as plt

    %matplotlib inline
    import matplotlib as <<your code goes here>>
    import matplotlib.pyplot as <<your code goes here>>
    
  • Set the rc params for axes, xtick, and ytick

    mpl.rc('axes', labelsize=14)
    mpl.<<your code goes here>>('xtick', labelsize=12)
    mpl.rc('ytick', labelsize=12)
    
  • Finally, we will import warnings and ensure that the non-essential warnings are ignored

    import <<your code goes here>>
    warnings.filterwarnings(action="ignore", message="^internal gelsd")
    

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...