• No results found

Introduction to predictive modeling and data mining

N/A
N/A
Protected

Academic year: 2021

Share "Introduction to predictive modeling and data mining"

Copied!
45
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction to predictive modeling

and data mining

Rebecca C. Steorts

Predictive Modeling and Data Mining: STA 521

August 25 2015

(2)

Today’s Menu

1. Brief history of data science (from slides of Bin Yu)

2. Motivation of this course.

3. What is predictive modeling and data science?

4. The boring bits (but they’re important).

(3)

Data science

(4)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(5)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(6)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(7)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(8)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(9)

Data science

(10)

Data science

(11)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(12)

Data science

[Bin Yu, IMS Presidential Address, 2014]

(13)

More about data science and how it’s relevant today....

(14)

Data science, today

(15)

Data science, today

(16)

Data science, today

[Credit: Jenny Bryan]

(17)

Data science, today

[Credit: Jenny Bryan]

(18)

So what is the class all about?

(19)

What is data mining?

Data miningis the science of discovering structure and making predictions in (large) data sets

I Unsupervised learning: discovering structure

E.g., given measurements X1, . . . Xn, learn some underlying

group structure based on similarity

I Supervised learning: making predictions

I.e., given measurements (X1, Y1), . . . (Xn, Yn), learn a model

to predict Yi from Xi

Note: Hidden underneath is the idea of prediction (which we will get into). As we have talked about words like data science, data mining, etc are just more sexy!

(20)

What is data mining?

Data miningis the science of discovering structure and making predictions in (large) data sets

I Unsupervised learning: discovering structure

E.g., given measurements X1, . . . Xn, learn some underlying

group structure based on similarity

I Supervised learning: making predictions

I.e., given measurements (X1, Y1), . . . (Xn, Yn), learn a model

to predict Yi from Xi

Note: Hidden underneath is the idea of prediction (which we will get into). As we have talked about words like data science, data mining, etc are just more sexy!

(21)

Google

Search Ads

Gmail Chrome

(22)

Facebook

People you may know

(23)

Netflix

$1M prize!

(24)

eHarmony

Falling in love with statistics

(25)

FICO

An algorithm that could cause a lot of grief

(26)

FlightCaster

Apparently it’s even used by airlines themselves

(27)

IBM’s Watson

A combination of many things, including data mining

(28)

Handwritten postal codes

(From ESL p. 404)

We could have robot mailmen someday

(29)

Subtypes of breast cancer

Subtypes of breastcancer based on wound response

(30)

Predicting Alzheimer’s disease

(From Raji et al. (2009), “Age, Alzheimer’s disease, and brain structure”)

Can we predict Alzheimer’s disease years in advance?

(31)

Kaggle 2015 Challenge

Competition to find interesting information in Census data and maps.

(32)

What to expect

Expect to be able to deal with messy data and writing coding that is reproducible

Why? Real applied problems are messy (and for others to

understand how you attacked something, it’s important that your method, process, and code be accessible, well documented, and reproducible)

I You can’t always open up R, download a package, and get a reasonable answer

I Real data is messy and always presents new complications

I Understanding why and how things work is a necessary precursor to figuring out what to do

(33)

Reoccuring themes

Exact approach versus approximation: often when we can’t do something exactly, we’ll settle for an approximation. Can perform well, and scales well computationally to work for large problems

Bias-variance tradeoff: nearly every modeling decision is a tradeoff between bias and variance. Higher model complexity means lower bias and higher variance

Interpretability versus predictive performance: there is also usually a tradeoff between a model that is interpretable and one that predicts well under general circumstances

(34)

There’s not a universal recipe book

Unfortunately, there’s no universal recipe book forwhen and in what situationsyou should apply certain data mining methods

Statistics doesn’t work like that. Sometimes there’s a clear

approach; sometimes there is a good amount of uncertainty in what route should be taken. That’s what makes it so hard, and so fun

This is true even at the expert level (and there are even larger philosophical disagreements spanning whole classes of problems)

The best you can do is try to understand the problem, understand the proposed methods and what assumptions they are making, and find some way to evaluate their performances

(35)

Hopefully you’re still awake

What do I need to know about the course?

(36)

Course staff:

I Instructor: Rebecca Steorts (you can call me “Beka” or “Professor Steorts”, please not “Professor”)

I TAs: Abbas Zaidi and Yikun (Joey) Zhou

Why are you here?

I Because you love the subject, because it’s required, because you eventually want to make $$$ ...

I No matter the reason, everyone can get something out of the course

I Work hard and have fun!

(37)

Culture of the class

I Teaching you to fish (versus giving you one).

I It’s amazing what a determined individual can learn from documentation, small learning examples, and ... “gasp” Googling. And also stackoverflow.

I Rewarding engagement, intellectual generosity and curiosity.

I Speaking up, sharing success OR failure, showing some interest in something will earn marks.

I Zero tolerance of plagiarism!

I Generating your own ideas, your own code, and finding your own way is a big reason you’re here. The process is much more important than simply getting to the end point or product.

(38)

Logistics/Grading

I Two lectures a week: concepts, methods, examples

I Lab to try stuff out and get fast feedback (10%)

I Participation, creativity in new ideas, sharing in your successes and failures, etc. (5%)

I HW weekly to do longer and more complex things (35%)

I Mid-term exam (25%)

I Final project in groups of 2-3, will be fun! (25%)

(39)

Prerequisites:

I Assuming you know basic probability and statistics, linear algebra, R programming (see syllabus for topics list)

Textbooks:

I Course textbook Introduction to Statistical Learning by James, Witten, Hastie, and Tibshirani. Get it online at http://www-bcf.usc.edu/~gareth/ISL.

I Bayesian Essentials with R, Marin and Robert, Please order this one (we won’t need it for about two weeks).

I More advanced textbook: Elements of Statistical Learning by Hastie, Tibshirani, and Friedman. Also available online at http://www-stat.stanford.edu/ElemStatLearn

(40)

Markdown, RStudio, and LaTex

You must type all assignments and take home exams in Markdown (we will talk about submissions in class).

All code must be written in RStudio. https:

//guides.github.com/features/mastering-markdown/ https://rstudio-pubs-static.s3.amazonaws.com/18858_

0c289c260a574ea08c0f10b944abc883.html

(41)

Turning in Your Own Work

I You may work together on homework. In fact, you should. You’ll learn a great deal.

I But.... All code, write ups, etc must be your own work and not shared.

I All write ups must be your own work and not shared or copied in any manner.

I All take home exams or projects that are not collaborative are to be your own work. You may not work together.

I If I find out that any assignment is not your own, you will receive a 0 on the assignment and you will be reported to as per the university’s policy on cheating and plagiarism.

I You will submit all work online, which Abbas will explain.

(42)

Setting up for success

1. R or RStudio

2. Intro to RStudio and Markdown: first lab.

3. git and bitbucket

(43)

Quick intro to git

Download git and bitbucket.

1. git init

2. git add file.txt

3. git log

4. git status

5. git commit -a -m ”here are my changes.”

6. git push

You will understand more complicated git commands in your lab. (Branching, Merging, Uploading a file, etc.)

(44)

Who am I

I Assistant prof and affiliated faculty at SSRI and iiD.

I Specialize in record linkage and dimension reduction methods and algorithms for applications in human rights conflicts, official statistics, social networks, medical databases, and many others.

I Methods I work on focus on Bayesian methods, machine learning, and scalable algorithms (intensive computing).

I PhD in 2012 from University of Florida and finished Visiting Assistant Professorship at CMU in 2015.

I First semester at Duke and second time teaching the course, but changing many things! Very excited to be here.

(45)

Next time: RStudio, Markdown, and git.

References

Related documents

Consequently, we have delineated ways in which a perspective of intimate relationships including individual factors and dyadic development might guide the enhancement of

bodies) homozygous for a pex2 mutation and second, a The suo mutations fall in six loci and are not allele- search for mutations restoring growth of the pex2 mu- specific

For instance, while the semantically anomalous training group performed better on semantically anomalous sentences than the other two groups (Figure 2), these participants still

ABS, Association of Breast Surgery; BAPRAS, British Association of Plastic, Reconstructive and Aesthetic Surgeons; BR, breast reconstruction; HES, Hospital Episode Statistics;

Payments may be made by the Ohio Payment Card, an Auditor of State warrant or by electronic funds transfer (EFT). For all transactions, Vendor must have a valid W-9 form on file

The cost for cosmetology transfer students is $11 .30 per hour and $10 .00 per hour for barbering students to attended at PAUL MITCHELL THE SCHOOL Fort Myers; this does not include

Each of the five core books cover one stage in the service lifecycle (Figure 1) (Adams, et al., 2008), from the initial definition and analysis of business requirements in