首页 > > 详细

Python辅导:CS4300 Keeping Up With Social解析Python语言程序

matplotlib,。

Requirement

In this assignment we will further build upon our analysis of the transcripts from the reality TV show “Keeping Up With The Kardashians” from where we left off since Assignment 1. We will try to uncover some simple social dynamics that are shown through language using various statistical and linguistic techniques to better understand conversational behavior.

Instructions

Follow the instructions below to get the necessary packages installed and set up your Python environment, then open the attached Jupyter notebook.

Run the notebook and complete the tasks contained in it, then upload the completed notebook and an HTML copy of it to CMS.

Learning Objectives

This project aims to help you get comfortable working with the following tools / technologies / concepts:

  • Standard/Generalized Jaccard similairty
  • Plotting heatmaps in matplotlib
  • Advanced numpy functionality
  • Gender and Social Interaction Analysis

Setting up your environment

System Configuration

Perform the following steps in order:

Check your Version of Python3 (should be 3.5)

You can check via:

gt; python3 --version Python 3.5.2 

If your version differs, then download 3.5 here.

Get PyPI (Python Package Index)

PyPI allows one to easily download Python modules required to run the project, as well as ones that may help you perform certain tasks in the future of the course. PyPI is essential. As such, run:

gt; python3 get-pip.py 

Download Virtualenv

Virtualenv helps establish an isolated Python environment. The environment allows you to separate project-specific dependencies and their versions from the Python modules installed locally on your computer. Once you have virtualenv, cd into the directory where the extracted assignment is stored (e.g. assignment1), and run:

gt; virtualenv -p python3 venv 

This creates a virtual environment called venv. In order to enter than virtual environment, run the following:

gt; source venv/bin/activate 

The following command line prompt will indicate that you’re in the virtual environment:

gt; (venv) gt; 

To deactivate the virtual environment, run the following:

gt; (venv) gt; deactivate gt; 

Whenever you work with this project, you should always be in your virtual environment. Without this isolation, we might run into module versioning issues and other problems when trying to run your project, which creates administrative overhead.

Install Dependencies

At the root of directory of the project skeleton code, run the following:

(venv) gt; pip3 install -r requirements.txt 

This installs within your virtual environment all the necessary modules that are required at the beginning of the project.

Setup Jupyter Notebook

To use your virtualenv as the kernel for your Jupyter Notebook you run the following:

(venv) gt; python3 -m ipykernel install --user --name=venv 

Open Jupyter Notebook and start working

Open the Jupyter Notebook enviroment and complete the assignment. Make sure to go to Kernel - Change Kernel and click venv as the option.

gt; source venv/bin/activate (venv) gt; jupyter notebook 
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!