Starting from:

$29.99

Assignment 0 Python Machine Learning Stack

ELEC 576 / COMP 576
Assignment 0
Due: https://elec576.rice.edu/assignments via Canvas
This assignment is to help you get ready for future assignments. You are
required to submit your report as a PDF file on Rice Canvas.
1 Python Machine Learning Stack (Anaconda)
You will use Python in this course. In order to prepare for future assignments and the
final project, you will be asked to install Python and its useful packages via Anaconda.
Anaconda is a high performance distribution of Python and R and includes over 100 of
the most popular Python, R and Scala packages for data science. More information on
Anaconda can be found here.
Follow these instructions Installing Anaconda to install Anaconda.
Make sure you confirm that Anaconda is installed and working by opening a terminal
window and running the command
>> conda list
If Anaconda is installed and working, this will display a list of installed packages and their
versions.
You can also confirm that Anaconda is installed and working by opening a terminal
window and running the command
>> python
to run the Python shell. If Anaconda is installed and working, the version information it
displays when it starts up will include ”Continuum Analytics, Inc.”. Use the command
>> quit()
ELEC 576 / COMP 576 – Fall 2022 – Assignment 0 2
to exit the Python shell.
Read this Cheat sheet to learn how to use the ”conda” command.
Task 1: In your terminal, run
>> conda info
and paste the result into your report.
2 Interactive Terminal (IPython/Jupyter)
IPython/Jupyter is an interactive computational environment in which you can combine
code execution, rich text, mathematics, plots, and rich media.
Follow this IPython Tutorial and Jupyter Documentation to get up and running on
IPython/Jupyter. For more on IPython/Jupyter, check out this great Gallery of Jupyter
Notebooks.
3 Transition from MATLAB to Python
MATLAB is a great language, especially for signal processing research and applications.
However, in the world of data science, Python is a better choice in terms of memory efficiency and speed. The good news is that transitioning from MATLAB to Python is easy.
Read the following tutorial Numpy for MATLAB Users.
In order to run Python in OS X and Linux, open your terminal and type
>> python
For Window users, please follow this instruction Running Python in Windows.
In order to run the commands in Numpy for MATLAB Users, make sure you import
numpy and scipy.linalg as follow.
import numpy as np
import scipy.linalg
Task 2: Run all of Python commands in the table ”Linear Algebra Equivalents” in Numpy for MATLAB Users. You are required to do this task in
ELEC 576 / COMP 576 – Fall 2022 – Assignment 0 3
IPython and paste the results into your report.
Task (Optional): Go through Stanford Numpy Tutorial for additional Numpy
exercises.
4 Plotting (MatPlotLib/PyPlot)
Matplotlib is the main plotting library for Python and is capable of very powerful publicationquality graphics. Check out this Matplotlib Gallery if you would like to learn more about
plotting using Matplotlib.
Pyplot is a library within Matplotlib that is there to ease the transition from MATLAB
to Python. It has a collection of MATLAB-like functions that makes plotting in Python
as easy as in MATLAB. Please read through the following Pyplot Tutorial.
Task 3: Run the following script in IPython and paste the figure created by
the script into your report.
import matplotlib.pyplot as plt
plt.plot([1,2,3,4], [1,2,7,14])
plt.axis([0, 6, 0, 20])
plt.show()
Task 4: Use Matplotlib to create a figure of your choice in IPython. Paste
your code and figure into your report.
5 Version Control System (BitBucket/GitHub)
When you are working on a big project with your team, managing the changes in your code
will be challenging. Version control systems (VCS) like Git help streamline this process.
Read this article on why VCS is necessary. Bitbucket and Github are two commonly used
web-based hosting services for projects that use Git version control systems. In this course,
you can use either Bitbucket or GitHub.
For Bitbucket user: Please apply for a free Bitbucket account here. Then go through
these tutorials to get up and running on Bitbucket. You can skip the Mercurial tutorial
because we will not use it.
For GitHub user: Please register for a student account here for free private repository
access for future projects and go through these tutorials.
ELEC 576 / COMP 576 – Fall 2022 – Assignment 0 4
Task 5: Paste your VCS account into your report.
6 Integrated Development Environment (PyCharm)
Coding and debugging will be much easier with a powerful IDE. PyCharm is among IDEs
of choice for Python. The professional version of PyCharm is free for students. Apply for
a free PyCharm license here, then follow the instructions Pycharm Download and Installation to download and install PyCharm.
Watch these PyCharm Tutorials to get started. The last three tutorials will show you
how to set up and use VCS in PyCharm. Checkout PyCharm Debugging for a nice PyCharm debugging tutorial.
Task 6: Start a new project in Pycharm. Commit and push your project to
Bitbucket/GitHub as a public project. Paste the link of your project in your
report.
ELEC 576 / COMP 576 – Fall 2022 – Assignment 0 5
Submission Instructions
Every student must submit their work in PDF format, providing intermediate and final
results as well as any necessary code. Submit your homework on Canvas.


More products