Using python for research week 5 answers

Python-for-Research

  • Review the basics of Python 3 programming
  • Learn how to use Python tools (e.g., the NumPy and SciPy modules) for research applications
  • Learn how to apply Python research tools in practical settings

OUTLINE

Week 1: Basics of Python 3

Week 1 Overview Part 1: Objects and Methods (Comprehension Check) Part 2: Sequence Objects (Comprehension Check) Part 3: Manipulating Objects (Comprehension Check) Week 1 Homework (Homework)

Week 2: Python Libraries and Concepts Used in Research

Week 2 Overview Part 1: Scope Rules and Classes (Comprehension Check) Part 2: NumPy (Comprehension Check) Part 3: Matplotlib and Pyplot (Comprehension Check) Part 4: Randomness and Time (Comprehension Check) Week 2 Homework (Homework)

Week 3: Case Studies Part 1

Week 3 Overview DNA Translation (Comprehension Check) Homework: DNA Translation (Homework) Language Processing (Comprehension Check) Homework: Language Processing (Homework) Introduction to Classification (Comprehension Check) Homework: Introduction to Classification (Homework)

Week 4: Case Studies Part 2

Classifying Whiskies (Comprehension Check) Homework: Classifying Whiskies (Homework) Bird Migration (Comprehension Check) Homework: Bird Migration (Homework) Social Network Analysis (Comprehension Check) Homework: Social Network Analysis (Homework)

Week 5: Statistical Learning

Week 5 Overview Part 1: Linear Regression (Comprehension Check) Part 2: Logistic Regression (Comprehension Check) Part 3: Random Forest (Comprehension Check) Homework: Case Study 7 (Homework) Homework: Case Study 7, Part 2 (Homework)

PH526x-Harvard-Python-Research

Homework for the Harvard Python for Research course (PH526x available here: https://online-learning.harvard.edu/course/using-python-research)

Week 1: basics of python3

Homework stored under 'Homework1' focus on the basics of Python

Week 2: Python librairies and concepts used in research

Homework is stored under 'Homework2'.

The second assignment reports on the evaluation of different strategies in the game 'Tic-Tac-Toe'.

Week 3: Case studies part 1

The emphasis is on few key points:

  • Learn how to translate DNA,
  • Learn how to process texts,
  • Learn how to classify items using the k-nearest neighbors method.

Week 4: Case studies part 2

Key points:

  • Learn how to classify whisky,
  • Learn how to use GPS data to track the migration patterns of birds,
  • Learn how to analyze social networks.

Week 5: Statistical Learning

Key points:

  • Learn the basics of linear and logistic regression,
  • Learn how to use scikit-learn to fit linear and logistic regression models,
  • Learn the basics of random forest methods for regression and classification,
  • Learn how to use scikit-learn to fit a random forest model,
  • Apply the techniques learned to analyze a dataset of movies.

Final grade: 91%

Harvard University - PH526x: Using Python for Research

This repository contains all programming assignments solutions for the PH526x: Using Python for Research course on edX offered by Harvard University.

Nội dung chính

  • Harvard University - PH526x: Using Python for Research
  • Certificate of Completion
  • ⚠️ Disclaimer ⚠️
  • Py4Research
  • DNA Translation
  • Case Study 1 : Caesar Cipher
  • Language Processing
  • Case Study 2 : Translations of Hamlet
  • Choose your session:
  • Choose your session:
  • At a glance
  • About the instructors
  • HarvardX Honor Code
  • Ways to take this course
  • Interested in this course for your business or team?

This course cover:

  • Python 3 programming basics (a review)
  • Python tools (e.g., NumPy and SciPy modules) for research applications
  • How to apply Python research tools in practical settings

Course Syllabus:

  • Week 1: Python Basics.
    Review of basic Python 3 language concepts and syntax.

  • Week 2: Python Research Tools.
    Introduction to Python modules commonly used in scientific computation, such as NumPy.

  • Weeks 3 & 4: Case Studies.
    This collection of six case studies from different disciplines provides opportunities to practice Python research skills.


Certificate of Completion

You can see the Certificate of Completion and other certificates in my Certificates Repo that contains all my certificates obtained through my journey as a self-made Data Science and better developer.


⚠️ Disclaimer ⚠️

Please, don't fork or copy this repository.

The Using Python for Research course offered by Harvard University, is a introductory level course. You can complete this course with a minimal effort.

Py4Research

My solutions for HarvardX & EdX.org's 'Using Python for Research' course material.

Week 1

Python basics; Skipped in this record, but easy enough even if you've just learned python 3 like I had.

"Exercises for homework (Week 1). In this homework, we will use objects, functions, and randomness to find the length of documents, approximate pi, and smooth out random noise."

Week 2

Libraries and python research concepts; This is where I will start to save some of my homework assignments.

"Exercises for Homework (Week 2). Tic-tac-toe (or noughts and crosses) is a simple strategy game in which two players take turns placing a mark on a 3x3 board, attempting to make a row, column, or diagonal of three with their mark. In this homework, we will use the tools we've covered in the past two weeks to create a tic-tac-toe simulator and evaluate basic winning strategies."

Week 3

DNA Translation

Code created following course notes. It takes a txt file containing a dna sequence from the NCBI and uses a table to translate it to proteins. Then it takes the NCBI protein txt and compares it to your result. Prints the translated protein if its correct.

Case Study 1 : Caesar Cipher

Woo cyrptography, starting with the basics. Et tu Brute?

"Over the next five exercises, we will create our own Caesar cipher, as well as a message decoder for this cipher. In this exercise, we will define the alphabet used in the cipher."

Language Processing

Code created following course notes. Takes given books file from the Gutenberg Project in 4 languages and reads them all. Counts unique words and amount of words. Then plots them respective to language using matplotlib.pyplot

Case Study 2 : Translations of Hamlet

Use knowledge from previous exersizes to analyze one specific literary work in multiple translations and plot data.

"In this case study, we will find and visualize summary statistics of the text of different translations of Hamlet"

Data plot

Choose your session:

322,188 already enrolled!

I would like to receive email from HarvardX and learn about other offerings related to Using Python for Research.

Frequently Asked Questions

12 weeks

2–4 hours per week

Self-paced

Progress at your own speed

Free

Optional upgrade available

Choose your session:

I would like to receive email from HarvardX and learn about other offerings related to Using Python for Research.

Using Python for Research

This course bridges the gap between introductory and advanced courses in Python. While there are many excellent introductory Python courses available, most typically do not go deep enough for you to apply your Python skills to research projects. In this course, after first reviewing the basics of Python 3, we learn about tools commonly used in research settings. This version of the course includes a new module on statistical learning.

Using a combination of a guided introduction and more independent in-depth exploration, you will get to practice your new Python skills with various case studies chosen for their scientific breadth and their coverage of different Python features.

At a glance

  • Institution: HarvardX
  • Subject: Computer Science
  • Level: Intermediate
  • Prerequisites:

    Some previous Python programming experience (in any version of Python)

  • Language: English
  • Video Transcript: English
  • Python 3 programming basics (a review)
  • Python tools (e.g., NumPy and SciPy modules) for research applications
  • How to apply Python research tools in practical settings

Week 1: Python Basics
Review of basic Python 3 language concepts and syntax.

Week 2: Python Research Tools
Introduction to Python modules commonly used in scientific computation, such as NumPy.

Weeks 3 & 4: Case Studies
This collection of six case studies from different disciplines provides opportunities to practice Python research skills.

Week 5: Statistical Learning
Exploration of statistical learning using the scikit-learn library followed by a two-part case study that allows you to further practice your coding skills.

About the instructors

HarvardX Honor Code

HarvardX requires individuals who enroll in its courses on edX to abide by the terms of the edX honor code. HarvardX will take appropriate corrective action in response to violations of the edX honor code, which may include dismissal from the HarvardX course; revocation of any certificates received for the HarvardX course; or other remedies as circumstances warrant. No refunds will be issued in the case of corrective action for such violations. Enrollees who are taking HarvardX courses as part of another program will also be governed by the academic policies of those programs.

HarvardX Nondiscrimination/Anti-Harassment Statement
Harvard University and HarvardX are committed to maintaining a safe and healthy educational and work environment in which no member of the community is excluded from participation in, denied the benefits of, or subjected to discrimination or harassment in our program. All members of the HarvardX community are expected to abide by Harvard policies on nondiscrimination, including sexual harassment, and the edX Terms of Service. If you have any questions or concerns, please contact and/or report your experience through the edX contact form.

HarvardX Research Statement
HarvardX pursues the science of learning. By registering as an online learner in an HX course, you will also participate in research about learning. Read our research statement to learn more.

Ways to take this course

Choose your path when you enroll.

Verified Track

Audit Track

Price

$169 USD

Free

Access to course materials

Unlimited

Limited

Expires on Dec 7

World class institutions and universities

edX support

Shareable certificate upon completion

Graded assignments and exams

Read our FAQsin a new tab

about frequently asked questions on these tracks.

Interested in this course for your business or team?

Train your employees in the most in-demand topics, with edX For Business.