GithubHelp home page GithubHelp logo

mitxcompthinkdatasci's Introduction

MITxCompThinkDataSci

This repository contains scripts related to the course Introduction to Computational Thinking and Data Science by MITx on edX. In all projects, MITx provides the skeleton code (function wrappers) and some helper functions (functionality outside the scope of the course).

I completed this course in September 2018. View my certificate!

Brute Force Space Cows

This program implements a brute force algorithm to find the minimum number of trips needed to take all cows across the universe in the function brute_force_cow_transport. The function returns a list of lists, where each inner list represents a trip and contains the names of cows taken on that trip.

  • The ps1.py script contains the brute force algorithm.
  • The ps1_cow_data.txt file contains cow names and weights in tons.
  • The ps1_partition.py script is a helper function provided by MITx that fetches all of the available partitions to use for the brute force algorithm.

Power Set Generators

The files in this folder are power set generators. The power set aspect means the code generates all possible combinations of a list of items. The generator aspect means the codes generates the lists as you go along - it does not generate and store all of the combinations. This is helpful because all combinations of a large list is extremely large - 2^n where n is the number of items in the original list.

  • The brute_force_generator.py script contains a generator that returns every arrangement of items from a list such that each is in one or none of two different bags. Each combination is given as a tuple of two lists, the first being the items in bag1, and the second being the items in bag2.
  • The wk1_powerSet.py script contains two power set generators that each generate all combinations of N items.

Random Walk Simuation

This program simulates the time it takes a group of vacuum cleaner robots to clean the floor of a room. Two different strategies are developed and compared: 1) a standard robot with a standard movement strategy and 2) a random walk robot with a stochastic movement strategy.

  • The ps2.py script contains the class assignments and simulation code for the program.
  • The ps2_visualize.py file contains a helper function provided by MITx for visualizing the robots vacuuming.
  • The ps2_verify_movement35.pyc and ps2_verify_movement36.pyc files provided by MITx contain supporting code for the visualization.

Virus Reproduction

This program uses pylab to implement a stochastic simulation of patient and virus population dynamics. Two scenarios are developed: 1) patient and simple virus and 2) treated patient and resistant virus. Finally, conclusions are drawn about treatment regimens based on the simulation results.

  • The ps3b.py script contains the class assignments and simulation code for the program.
  • The ps3b_precompiled_35.pyc and ps3b_precompiled_36.pyc files provided by MITx contain supporting code for the simulation.

Climate Change

This program models the climate of different areas with regression and tries to find evidence of global warming. Models are created to analyze and visualize climate change in terms of temperature.

  • The ps4.py file contains the source code.
  • The data.csv file contains the data used in the regression analysis.

Strings and Graphs

This folder contains miscellaneous exercises.

  • The wk1_student_swaps_graphs.py file contains a WeightedEdge class extends Edge (povided by MITx). The WeightedEdge constructor requires a weight parameter, as well as the parameters from Edge. It also includes a getWeight method.
  • The wk3_problems_strings.py file contains string manipulation exercises.

mitxcompthinkdatasci's People

Contributors

lisaover avatar

Forkers

wesenu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.