Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
c799eac
started conversion of slides
jretz Dec 3, 2013
d1614a0
start conversion to markdown
jretz Dec 6, 2013
b4205d1
finished converting 2013-01-25 to markdown
jretz Dec 8, 2013
8137f49
updated date of 1st class
jretz Dec 8, 2013
0a2ccb3
convert README to markdown
jretz Dec 8, 2013
1b0fc24
starting to update dates
jretz Dec 8, 2013
4482e70
more README cleanup
jretz Dec 8, 2013
196a68d
fix brackets
jretz Dec 8, 2013
43e5edb
converted/updated Cast Studies slides
jretz Dec 8, 2013
96a3601
fix dates in filenames
jretz Dec 8, 2013
daac5de
converted git Lab slides to markdown and improved styling
jretz Dec 8, 2013
8b45666
converted the rest of the second lecture to markdown
jretz Dec 8, 2013
f991adc
make slides functional offline by including remark js
jretz Dec 10, 2013
b6895a2
converted 3rd lecture lab
jretz Dec 10, 2013
56c682c
converted Preprocessing deck
jretz Dec 10, 2013
149d58a
converted Probability deck
jretz Dec 11, 2013
82ef493
moved old decks to uncoverted directory
jretz Jan 20, 2014
8547f41
cleaned up readme links
jretz Jan 22, 2014
4a2eb28
Update index.html
jretz Jan 22, 2014
7b80a53
making github.io site functional
jretz Jan 22, 2014
4fe6bac
resolved merge conflicts
jretz Jan 22, 2014
493e49a
restore title
jretz Jan 22, 2014
406dd83
fix URLs in intro slides
jretz Jan 23, 2014
1c32843
updated Shreyas' intro
jretz Jan 23, 2014
07932da
update tech location
jretz Jan 23, 2014
89c31ec
brought schedules in sync
jretz Jan 27, 2014
79e987b
improved hw instructions
jretz Jan 27, 2014
fd79c00
Enlarge fonts and make things fit
jretz Jan 29, 2014
5bc5323
Make images work on GitHub Pages
jretz Jan 29, 2014
8e1a837
Update links in hw-stats
jretz Feb 2, 2014
301d616
More cleanup on stats hw.
jretz Feb 2, 2014
bbd8fc9
Cleanup slides for week 3.
jretz Feb 4, 2014
fef02ee
Remove Waterworld reference.
jretz Feb 6, 2014
133528c
fixed wording
jretz Feb 7, 2014
f1e62eb
moved 4th lecture slides into place
jretz Feb 9, 2014
a510ed0
added script to convert org-mode slides to markdown slides
jretz Feb 10, 2014
d0596cd
mechanically translated Feb 13 lecture
jretz Feb 10, 2014
b83d57a
updated MapReduce lecture
jretz Feb 10, 2014
64f5467
updated MapReduce lecture further
jretz Feb 10, 2014
90fa813
start to update mrjob homework
jretz Feb 10, 2014
2d9df6c
more tuning of 2014-02-13 lecture
jretz Feb 13, 2014
086166d
Data Warehouse cleanup
jretz Feb 13, 2014
92682d8
updated project due dates
jretz Feb 13, 2014
71474c8
mechanical conversion of Feb 20 lecture
jretz Feb 17, 2014
b8ce994
cleanup conversion of Feb 20 slides
jretz Feb 17, 2014
1078f8e
adapt gini hw to new dataset and small lecture corrections
jretz Feb 20, 2014
7c4f32b
mechanically converted NN/SVM lecture
jretz Feb 23, 2014
30ea25e
cleanup up SVM/NN lecture
jretz Feb 24, 2014
10f3919
more refinements to svm/nn lecture
jretz Feb 27, 2014
6867f9d
final touches on svm/nn lecture
jretz Feb 27, 2014
747f296
mechanical translation of clustering lecture
jretz Mar 2, 2014
d718729
manual cleanup of clustering lecture
jretz Mar 6, 2014
fa8e7b2
fixed slide titles in syllabus
jretz Mar 6, 2014
9330c75
last minute fixes for clustering lecture
jretz Mar 6, 2014
9a60a04
converted clustering/review lecture
jretz Mar 9, 2014
98c7e1c
change review lecture to numbered lists to help with lost voice
jretz Mar 13, 2014
c516ff8
select numbers to review in class
jretz Mar 13, 2014
07fcbea
converted Frequent Pattern lecture
jretz Apr 2, 2014
1e30074
updates to AWS intro
jretz Apr 3, 2014
91f488f
refining cluster/pattern/aws lecture
jretz Apr 3, 2014
7578952
fixed typos in patterns lecture
jretz Apr 3, 2014
98d786d
mechanical translation of adjacency/graphs/pagerank lecture
jretz Apr 6, 2014
beb5853
initial cleanup of graph lecture
jretz Apr 6, 2014
b7fd43a
rearrange graph/pagerank lecture
jretz Apr 10, 2014
98470a3
more tweaks for graph/pagerank lecture
jretz Apr 10, 2014
b7d6643
fix typo in graph lecture
jretz Apr 10, 2014
6e33ca2
updated syllabus and mechanical translation of 4/17 lecture
jretz Apr 17, 2014
5edbd6c
simple cleanup of 4/17 lecture
jretz Apr 17, 2014
c6678c7
more cleanup of 4/17 lecture
jretz Apr 17, 2014
be967af
cleanup of multimedia lecture
jretz Apr 17, 2014
fc9c00a
move midterm stats to midterm slides
jretz Apr 17, 2014
81e576f
mechanical translation of visualization lecture
jretz Apr 24, 2014
4d85daf
mechanical translation of visualization lecture
jretz Apr 24, 2014
6e34d7a
simple cleanup of visualization lecture
jretz Apr 24, 2014
33c018a
more work on visualization lecture
jretz Apr 24, 2014
00131dc
last minute cleanup for visualization lecture
jretz Apr 24, 2014
2161d50
mechanical translation of real world lecture
jretz Apr 26, 2014
1c6280d
initial cleanup of real world lecture
jretz Apr 26, 2014
226d8e9
cleanup of real world lecture
jretz May 1, 2014
b1a0bdb
fixed SICP acronym
jretz May 1, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PLACE_HOLDER=<\!--markdown goes here-->
SLIDE_SOURCES=$(wildcard slides/*.markdown)
SLIDES=$(SLIDE_SOURCES:.markdown=.html)

all: index.html $(SLIDES)

index.html: README.markdown
pandoc README.markdown -t html -c slides/production/common.css > index.html

%.html: %.markdown slides/slide_template.html
sed -e "/$(PLACE_HOLDER)/r $<" < slides/slide_template.html | sed -e "s/$(PLACE_HOLDER)//" > $@
43 changes: 43 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Data Mining 290

### Description
Learn how to obtain, clean, visualize, understand, model, and
predict the world around you using data. Grading will consist of homework
(30%), a midterm (30%), and a project (40%).

### Instructor
Jimmy Retzlaff &lt;jretz@ischool&gt;

### GSI
Shreyas &lt;shreyas@ischool&gt;

### Textbook
Han, J., Kamber, M., & Pei, J. (2011). _Data Mining: Concepts and Techniques_, Third Edition *(3rd ed.)*. Morgan Kaufmann.

### Course Discussion
[Info 290T: Data Mining on Piazza](https://piazza.com/berkeley/spring2014/info290t03)

---

# Syllabus
DM[0-9]+ indicates chapters from the text, _Data Mining_.

| Date | Readings | Slides | Homework / Project |
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| Jan 23 | [Try Github](http://try.github.com) ; [A Taxonomy of Data Science](http://www.dataists.com/2010/09/a-taxonomy-of-data-science/) | [Class Intro](slides/2014-01-23-Intro.html) ; [Tools Intro](https://speakerdeck.com/seekshreyas/introduction-to-git-and-github) by GUEST: Shreyas | [Git Intro](slides/2014-01-23-Lab.html) |
| Jan 30 | DM1 ; [The Yelp Factor: Are Consumer Reviews Good for Business?](http://hbswk.hbs.edu/item/6836.html) | [Case Studies](slides/2014-01-30-CaseStudies.html) ; [Obtaining Data](slides/2014-01-30-Obtaining-Data.html) | [Obtain & Explore Data](slides/2014-01-30-Lab.html) |
| Feb 6 | DM2, DM3 | [Probability](slides/2014-02-06-Probability.html) ; [Preprocessing](slides/2014-02-06-Preprocessing.html) | [Data Stats](slides/2014-02-06-Lab.html) |
| Feb 13 | DM4, [Apache Hadoop: Petabytes and Terawatts](http://www.youtube.com/watch?v=SS27F-hYWfU) ([slides](http://prezi.com/u0ukvqzpyh5p/apache-hadoop-petabytes-and-terawatts/)); [mrjob docs](http://packages.python.org/mrjob/) (for homework) | [Data Warehouse](slides/2014-02-13-Data-Warehouse.html) ; [MapReduce](slides/2014-02-13-MapReduce.html) | [Project Details](slides/2014-02-13-Project.html) ; [mrjob](slides/2014-02-13-mrjob.html) |
| Feb 20 | DM8 | [Decision Trees](slides/2014-02-20-Decision-Trees.html); [Naive Bayes](slides/2014-02-20-Bayes.html) | [Gini Index](slides/2014-02-20-Gini.html) |
| Feb 27 | DM[9.1-9.3], 9.5 ; [Understanding the Bias-Variance Tradeoff](http://scott.fortmann-roe.com/docs/BiasVariance.html) | [SVM](slides/2014-02-27-SVM.html) ; [Neural Networks](slides/2014-02-27-Neural-Network.html) | [Neural Network Back Propagation](slides/2014-02-27-Lab-NN.html) |
| Mar 6 | DM10 | [Clustering - Partitioning](slides/2014-03-06-Clustering.html) ; [Clustering - Hierarchical & Density](slides/2014-03-06-Hierarchical.html) | [K-Means](slides/2014-03-06-k-means.html) |
| Mar 13 | DM11.1 | [Review](slides/2014-03-13-Review.html) | prepare 1 cheat sheet |
| Mar 20 | 1 cheat sheet | *Midterm* | |
| Mar 27 | HOLIDAY | | |
| Apr 3 | DM6 | [Advanced Clustering](slides/2014-03-13-Advanced-Cluster.html) ; [Frequent Patterns](slides/2014-04-03-Frequent-Pattern.html) | [AWS](slides/2014-04-03-AWS.html) ; Project Proposal due April 9 |
| Apr 10 | DM11.3; [PageRank](http://ilpubs.stanford.edu:8090/422/1/1999-66.pdf); [Uncovering Social Network Sybils in the Wild](http://arxiv.org/pdf/1106.5321) | [Graphs](slides/2014-04-10-Graphs.html); [PageRank](slides/2014-04-10-PageRank.html) | [Adjacency Representations](slides/2014-04-10-AdjacencyRepresentations.html) |
| Apr 17 | DM12; [Shazam Audio Search](http://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf) | [Outliers](slides/2014-04-17-Outliers.html); [Images & Audio](slides/2014-04-17-Multimedia.html) | [Midterm Review](slides/2014-04-17-Midterm-HW.html) |
| Apr 24 | [Embedded Plots](https://groups.google.com/group/gsofgs/attach/2f1cdd7a999c3ad8/embedded-plots.pdf?part=2&authuser=0) ; [Data-Driven Documents](http://vis.stanford.edu/files/2011-D3-InfoVis.pdf) | [Visualization](slides/2014-04-24-Visualization.html) ; [Yelp's Visualizations](slides/2014-04-24-Yelp-Visualization.html) | [D3 Intro](http://vogievetsky.github.io/IntroD3/); [D3 Lab](slides/2014-04-24-D3.html) |
| May 1 | [A Few Useful Things to Know about Machine Learning](http://homes.cs.washington.edu/~pedrod/papers/cacm12.pdf) ; [Top 10 Algorithms in Data Mining](http://www.cs.uvm.edu/~icdm/algorithms/10Algorithms-08.pdf) | [In Real Life](slides/2014-05-01-Real-World.html) | Project Data and Presentation due May 8th |
| May 8 | | Final Presentation | Project Code & Papers due May 14th |
| May 15 | | | Bye! |
48 changes: 0 additions & 48 deletions README.org

This file was deleted.

32 changes: 21 additions & 11 deletions code/gini.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,32 @@
import fileinput
import csv

(cmte_id, cand_id, cand_nm, contbr_nm, contbr_city, contbr_st, contbr_zip,
contbr_employer, contbr_occupation, contb_receipt_amt, contb_receipt_dt,
receipt_desc, memo_cd, memo_text, form_tp, file_num, tran_id, election_tp) = range(18)

(
CMTE_ID, AMNDT_IND, RPT_TP, TRANSACTION_PGI, IMAGE_NUM, TRANSACTION_TP,
ENTITY_TP, NAME, CITY, STATE, ZIP_CODE, EMPLOYER, OCCUPATION,
TRANSACTION_DT, TRANSACTION_AMT, OTHER_ID, CAND_ID, TRAN_ID, FILE_NUM,
MEMO_CD, MEMO_TEXT, SUB_ID
) = range(22)

CANDIDATES = {
'P80003338': 'Obama',
'P80003353': 'Romney',
}

############### Set up variables
# TODO: declare datastructures

############### Read through files
for row in csv.reader(fileinput.input()):
if not fileinput.isfirstline():
###
# TODO: replace line below with steps to save information to calculate
# Gini Index
row[cand_nm], row[contbr_zip]
##/
for row in csv.reader(fileinput.input(), delimiter='|'):
candidate_id = row[CAND_ID]
if candidate_id not in CANDIDATES:
continue

candidate_name = CANDIDATES[candidate_id]
zip_code = row[ZIP_CODE]
###
# TODO: save information to calculate Gini Index
##/

###
# TODO: calculate the values below:
Expand Down
Loading