| Title: | MLBA - Machine Learning for Business Analytics Concepts, Techniques, and Applications in R |
|---|---|
| Description: | Source code and datasets for "Machine Learning for Business Analytics Concepts, Techniques, and Applications in R" by Galit Shmueli, Peter C. Bruce, Peter Gedeck, Inbal Yahav, Nitin R. Patel. Publisher: Wiley; 2nd edition (February, 2023) ISBN: 978-1-118-83517-2 |
| Authors: | Peter Gedeck |
| Maintainer: | Peter Gedeck <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.0.0 |
| Built: | 2026-09-18 17:45:04 UTC |
| Source: | https://github.com/gedeck/mlba-r |
Cleaned up and reduced version of the AccidentsFull dataset
to facilitate model building.
AccidentsAccidents
A data frame with 600 observations and 11 variables:
1 = rush hour, 0 = not (rush = 6-9 am, 4-7 pm)
1 = yes, 0 = no
1 = weekday, 0 = weekend
Interstate? 1 = yes, 0 = no
Light conditions - 1 = day, 0 = other
1 = level, 0 = other
Speed limit, miles per hour
Surface conditions (1 = dry, 0 = other)
1 = two-way traffic, 0 = other
0 = no adverse conditions, 1 = adverse condition
one of: "no-injury", "non-fatal", "fatal"
Data
AccidentsFull for the original dataset
AccidentsAccidents
Cleaned up and reduced version of the AccidentsFull dataset
to facilitate model building.
Accidents1000Accidents1000
A data frame with 1000 observations and 11 variables:
1 = rush hour, 0 = not (rush = 6-9 am, 4-7 pm)
1 = yes, 0 = no
1 = weekday, 0 = weekend
Interstate? 1 = yes, 0 = no
Light conditions - 1 = day, 0 = other
1 = level, 0 = other
Speed limit, miles per hour
Surface conditions (1 = dry, 0 = other)
1 = two-way traffic, 0 = other
0 = no adverse conditions, 1 = adverse condition
one of: "no-injury", "non-fatal", "fatal"
Data
AccidentsFull for the original dataset
Accidents1000Accidents1000
These data, from the U.S. Bureau of Transportation Statistics, can be used to predict whether an accident will results in injuries or fatalities, based on predictors such as alcohol involvement, time of day, road condition, etc. Such a prediction system could be used to prioritize responder resources at the time of the report.
AccidentsFullAccidentsFull
A data frame with 42183 observations and 24 variables:
1 = rush hour, 0 = not (rush = 6-9 am, 4-7 pm)
1 = Alcohol involved, 2 = not involved
1 = straight, 2 = curve
1 = NASS Crashes Involving At Least One Passenger Vehicle, i.e., A Passenger Car, Sport Utility Vehicle, Pickup Truck Or Van) Towed Due To Damage From The Crash Scene And No Medium Or Heavy Trucks Are Involved. 0 = not
1 = yes, 0 = no
1 = weekday, 0 = weekend
Interstate? 1 = yes, 0 = no
Light conditions - 1 = day, 2 = dark (including dawn/dusk), 3 = dark, but lighted, 4 = dawn or dusk
0 = no collision, 1 = head-on, 2 = other form of collision
1 = pedestrian/cyclist involved, 0 = not
1 = accident at intersection/interchange, 0 = not at intersection
1 = accident on roadway, 0 = not on roadway
1 = level, 0 = other
Speed limit, miles per hour
Surface conditions (1 = dry, 2 = wet, 3 = snow/slush, 4 = ice, 5 = sand/dirt/oil, 8 = other, 9 = unknown)
Traffic control device: 0 = none, 1 = signal, 2 = other (sign, officer …)
1 = two-way traffic, 2 = divided hwy, 3 = one-way road
Number of vehicles involved
1 = no adverse conditions, 2 = rain, snow or other adverse condition
1 = yes, 0 = no
Number of injuries
1 = property damage, 2 = no property damage
1 = yes, 0 = no
0 = no injury, 1 = non-fatal inj., 2 = fatal inj.
Data are for the year 2001.
US Dept. of Transportation, Bureau of Transportation Statistics, "TranStats," (www.transtats.bts.gov – select "databases" then "General Estimate System (GES)) http://www.transtats.bts.gov/Fields.asp?Table_ID=1158&SYS_Table_Name=T_GES_ACCIDENT&User_Table_Name=Accident&Year_Info=1&First_Year=1999&Last_Year=2001&Rate_Info=1&Frequency=Annual&Data_Frequency=Annual,Monthly&Map_Info=&Is_Survey=1&Univ_Filter=&Latest_Available_Data=2001
Note: TranStats reports both variables with missing data, and their derived counterparts with imputed values filled in, denoted by an "I" at the end. Only one variant (the original or the derived) is included here. An "R" at the end of the variable name indicates that the Transtats variable has been collapsed into fewer categories for analysis purposes.
AccidentsFullAccidentsFull
Subset of the 'Accidents' dataset
AccidentsNNAccidentsNN
A data frame with 999 observations and 5 variables:
1 = Alcohol involved, 2 = not involved
1 = level, 0 = other
Surface conditions (1 = dry, 2 = wet, 3 = snow/slush, 4 = ice, 5 = sand/dirt/oil, 8 = other, 9 = unknown)
Number of vehicles involved
0 = no injury, 1 = non-fatal inj., 2 = fatal inj.
Data
AccidentsFull for the full dataset
head(AccidentsNN)head(AccidentsNN)
Airfares
AirfaresAirfares
A data frame with 638 observations and 18 variables:
starting airport's code
starting city
ending airport's code
ending city
average number of coupons (a one-coupon flight is a non-stop flight, a two-coupon flight is a one stop flight, etc.) for that route
number of new carriers entering that route between Q3-96 and Q2-97
whether a vacation route (Yes) or not (No); Florida and Las Vegas routes are generally considered vacation routes
whether Southwest Airlines serves that route (Yes) or not (No)
Herfindel Index – measure of market concentration (refer to BMGT 681)
starting city's average personal income
ending city's average personal income
starting city's population
ending city's population
whether either endpoint airport is slot controlled or not; this is a measure of airport congestion
whether either endpoint airport has gate constraints or not; this is another measure of airport congestion
distance between two endpoint airports in miles
number of passengers on that route during period of data collection
average fare on that route
Copyright 2016 Galit Shmueli and Peter Bruce
head(Airfares)head(Airfares)
Data
AmtrakAmtrak
A data frame with 159 observations and 2 variables:
Amtrak Ridership Number of Passengers (in thousands)
AmtrakAmtrak
The series of quarterly shipments (in millions of dollars) of US household appliances between 1985 and 1989.
ApplianceShipmentsApplianceShipments
A data frame with 20 observations and 2 variables:
Data courtesy Ken Black
head(ApplianceShipments)head(ApplianceShipments)
Monthly Australian sales of wine Jan 1980 - Jul 1995
AustralianWinesAustralianWines
A data frame with 180 observations and 7 variables:
Data
Website
AustralianWinesAustralianWines
Filename of data set for a classification task—to classify Internet discussion posts as either auto-related or electronics-related.
The data set contains two sets of messages; one with 1000 auto-related posts and one with 1000 electronics-related posts.
AutosElectronicsAutosElectronics
An object of class character of length 1.
the filename of the dataset that is installed with the mlba package
The posts are taken from Internet groups devoted to autos and electronics
## Not run: corpus <- Corpus(ZipSource(AutosElectronics, recursive=True))## Not run: corpus <- Corpus(ZipSource(AutosElectronics, recursive=True))
Data
BankBiasDataBankBiasData
A data frame with 1878 observations and 17 variables:
type of job (categorical: 'admin.','blue-collar','entrepreneur','housemaid','management','retired','self-employed','services','student','technician','unemployed','unknown')
marital status (categorical: 'divorced','married','single','unknown'; note: 'divorced' means divorced or widowed)
(categorical: 'basic.4y','basic.6y','basic.9y','high.school','illiterate','professional.course','university.degree','unknown')
has credit in default? (categorical: 'no','yes','unknown')
account balance
has housing loan? (categorical: 'no','yes','unknown')
has personal loan? (categorical: 'no','yes','unknown')
related with the last contact of the current campaign: contact communication type (categorical: 'cellular','telephone')
related with the last contact of the current campaign: last contact day of the week (categorical: 'mon','tue','wed','thu','fri')
related with the last contact of the current campaign: last contact month of year (categorical: 'jan', 'feb', 'mar', ..., 'nov', 'dec')
related with the last contact of the current campaign: last contact duration, in seconds (numeric). Important note: this attribute highly affects the output target (e.g., if duration=0 then y='no'). Yet, the duration is not known before a call is performed. Also, after the end of the call y is obviously known. Thus, this input should only be included for benchmark purposes and should be discarded if the intention is to have a realistic predictive model.
number of contacts performed during this campaign and for this client (numeric, includes last contact)
number of days that passed by after the client was last contacted from a previous campaign (numeric; 999 means client was not previously contacted)
number of contacts performed before this campaign and for this client (numeric)
outcome of the previous marketing campaign (categorical: 'failure','nonexistent','success')
has the client subscribed a term deposit? (binary: 'yes','no')
https://archive.ics.uci.edu/ml/datasets/bank+marketing
head(BankBiasData)head(BankBiasData)
Data
BanksBanks
A data frame with 20 observations and 5 variables:
1 = financially weak; 0 = financially strong
BanksBanks
Data
BareggTunnelBareggTunnel
A data frame with 747 observations and 2 variables:
BareggTunnelBareggTunnel
Data
BathSoapHouseholdBathSoapHousehold
A data frame with 600 observations and 46 variables:
Unique identifier for each household
Socioeconomic class (1 = high, 5 = low)
Eating habits(1 = vegetarian, 2 = vegetarian but eat eggs, 3 = nonvegetarian, 0 = not specified)
Native language (20 different languages)
Gender of homemaker (1 = male, 2 = female)
Age of homemaker
Education of homemaker (1 = minimum, 9 = maximum)
Number of members in household
Presence of children in household (4 categories)
Television availability (1 = available, 2 = unavailable)
Weighted value of durables possessed
Number of brands purchased
Number of instances of consecutive purchase of brands
Sum of volume
Number of purchase transactions (multiple brands purchased in a month are counted as separate transactions)
Sum of value
Average transactions per brand run
Average volume per transaction
Average price of purchase
Percent of volume purchased under no promotion
Percent of volume purchased under promotion code 6
Percent of volume purchased under other promotions
Percent of volume purchased of the brand
Percent of volume purchased under the price category
Percent of volume purchased under the product proposition category
Copyright 2019, Cytel, Inc. and Datastats, LLC
head(BathSoapHousehold)head(BathSoapHousehold)
Data from a 2008 business intelligence competition, which focused on forecasting demand for public transportation.
Data
Bicup2006Bicup2006
A data frame with 1512 observations and 3 variables:
The file contains the historic information with known demand for a 3-week period, separated into 15-minute intervals, and dates and times for a future 3-day period (DEMAND = NaN), for which forecasts should be generated.
date information
time information
demand information; NA if missing
Ken Black (used by permission)
Bicup2006Bicup2006
This dataset contains information collected by the US Census Service concerning housing in the area of Boston Massachusetts. It was obtained from the StatLib archive (http://lib.stat.cmu.edu/datasets/boston).
BostonHousingBostonHousing
A data frame with 506 observations and 14 variables:
per capita crime rate by town
proportion of residential land zoned for lots over 25,000 sq.ft.
proportion of non-retail business acres per town.
Charles River dummy variable (1 if tract bounds river; 0 otherwise)
nitric oxides concentration (parts per 10 million)
average number of rooms per dwelling
proportion of owner-occupied units built prior to 1940
weighted distances to five Boston employment centres
index of accessibility to radial highways
full-value property-tax rate per $10,000
pupil-teacher ratio by town
% lower status of the population
Median value of owner-occupied homes in $1000
The data was originally published by Harrison, D. and Rubinfeld, D.L. 'Hedonic prices and the demand for clean air', J. Environ. Economics & Management, vol.5, 81-102, 1978.
BostonHousingBostonHousing
Data
CanadianWorkHoursCanadianWorkHours
A data frame with 35 observations and 2 variables:
average annual number of weekly hours spent by Canadian manufacturing workers
Ken Black (used by permission)
CanadianWorkHoursCanadianWorkHours
CatalogCrossSell
CatalogCrossSellCatalogCrossSell
A data frame with 4998 observations and 10 variables:
Customer IDs. For each customer, the following columns describe if the customer made a purchase in the division
The data for this case have been adapted from the data in a set of cases provided for educational purposes by the Direct Marketing Education Foundation (“DMEF Academic Data Set Two, Multi Division Catalog Company, Code: 02DMEF”); used with permission.
head(CatalogCrossSell)head(CatalogCrossSell)
Cereals
CerealsCereals
A data frame with 77 observations and 16 variables:
Name of cereal
Manufacturer of cereal where A = American Home Food Products; G = General Mills; K =Kelloggs; N = Nabisco; P = Post; Q = Quaker Oats; R = Ralston Purina
cold or hot
calories per serving
grams of protein
grams of fat
milligrams of sodium
grams of dietary fiber
grams of complex carbohydrates
grams of sugars
milligrams of potassium
vitamins and minerals - 0, 25, or 100, indicating the typical percentage of FDA recommended
display shelf (1, 2, or 3, counting from the floor)
weight in ounces of one serving
number of cups in one serving
a rating of the cereals calculated by Consumer Reports
Data analysis for student learning (DASL)
head(Cereals)head(Cereals)
Data
CharlesBookClubCharlesBookClub
A data frame with 4000 observations and 24 variables:
Sequence number in the sample
ID# in the full dataset
0=male, 1=female
Monetary - total money spent on books
Recency - Months since last purchase
Frequency - Total number of purchases
Months since first purchase
this and following - book categories
Number of related books purchased
Recoding of M - see case description in DMBA and MLBA
Recoding of R - see case description in DMBA and MLBA
Recoding of F - see case description in DMBA and MLBA
Adapted with permission from The Bookbinders Club, prepared by Nissan Levin and Jacob Zahavi.
head(CharlesBookClub)head(CharlesBookClub)
Dataset derived from the ProPublica story "Machine Bias." See https://github.com/propublica/compas-analysis for details
COMPAS_cleanCOMPAS_clean
A data frame with 5304 observations and 7 variables
categories: Less than 25, 25 - 45, Greater than 45
Data
https://github.com/propublica/compas-analysis/blob/master/compas-scores-two-years.csv
head(COMPAS_clean)head(COMPAS_clean)
A drug store chain wants to learn more about cosmetics buyers purchase patterns. Specifically, they want to know what items are purchased in conjunction with each other, for purposes of display, point of sale special offers, and to eventually implement a real time recommender system to cross-sell items at time of purchase.
CosmeticsCosmetics
A data frame with 1000 observations and 15 variables:
Transaction #
The data (synthetic) are in the form of a matrix in which each column represents a product group, and each row a customer transaction.
Data
statistics.com; Copyright 2016 Galit Shmueli and Peter Bruce
head(Cosmetics)head(Cosmetics)
Student ratings of online statistics courses at Statistics.com
CourseRatingCourseRating
A data frame with 15 observations and 10 variables:
Copyright 2016 statistics.com
head(CourseRating)head(CourseRating)
Course topics at statistics.com (each row is a customer, column heads are topics taken [1] or not taken [0] by that customer)
CourseTopicsCourseTopics
A data frame with 365 observations and 8 variables:
Copyright 2016 Galit Shmueli and Peter Bruce
head(CourseTopics)head(CourseTopics)
Data on the quarterly sales for a department store over a 6-year period.
DepartmentStoreSalesDepartmentStoreSales
A data frame with 24 observations and 2 variables:
quarterly sales for the department store
DepartmentStoreSalesDepartmentStoreSales
Data
DrugDrug
A data frame with 60 observations and 7 variables:
DrugDrug
East-West Airlines is trying to learn more about its customers. Key issues are their flying patterns, earning and use of frequent flyer rewards, and use of the airline credit card. The task is to identify customer segments via clustering.
EastWestAirlinesClusterEastWestAirlinesCluster
A data frame with 3999 observations and 12 variables:
Unique ID
Number of miles eligible for award travel
Number of miles counted as qualifying for Topflight status
Number of miles earned with freq. flyer credit card in the past 12 months: 1 = under 5,000; 2 = 5,000 - 10,000; 3 = 10,001 - 25,000; 4 = 25,001 - 50,000; 5 = over 50,000
Number of miles earned with Rewards credit card in the past 12 months (see cc1_miles)
Number of miles earned with Small Business credit card in the past 12 months (see cc1_miles)
Number of miles earned from non-flight bonus transactions in the past 12 months
Number of non-flight bonus transactions in the past 12 months
Number of flight miles in the past 12 months
Number of flight transactions in the past 12 months
Number of days since Enroll_date
Dummy variable for Last_award (1=not null, 0=null)
Based upon real business data; company names have been changed. Copyright 2016 Galit Shmueli and Peter Bruce
head(EastWestAirlinesCluster)head(EastWestAirlinesCluster)
East-West Airlines has entered into a partnership with the wireless phone company Telcom to sell the latter's service via direct mail. These are a sample of data, provided so that the analyst can develop a model to classify East-West customers as to whether they purchase a wireless phone service contract (target variable 'Phone_sale').
EastWestAirlinesNNEastWestAirlinesNN
A data frame with 4987 observations and 16 variables:
Unique ID
Number of miles eligible for award travel
Number of miles counted as qualifying for Topflight status
Number of miles earned with freq. flyer credit card in the past 12 months: 1 = under 5,000; 2 = 5,000 - 10,000; 3 = 10,001 - 25,000; 4 = 25,001 - 50,000; 5 = over 50,000
Number of miles earned with Rewards credit card in the past 12 months (see cc1_miles)
Number of miles earned with Small Business credit card in the past 12 months (see cc1_miles)
Number of miles earned from non-flight bonus transactions in the past 12 months
Number of non-flight bonus transactions in the past 12 months
Number of flight miles in the past 12 months
Number of flight transactions in the past 12 months
E-mail address on file. 1= yes, 0 =no?
Member of the airline's club (paid membership), 1=yes, 0=no
Dummy variable indicating whether member added miles on any creditcard type within the past 12 months (1='Y', 0='N')
Dummy variable indicating whether member purchased Telcom service as a result of the direct mail campaign (1=sale, 0=no sale)
Based upon real business data; company names have been changed. Copyright 2016 Galit Shmueli and Peter Bruce
head(EastWestAirlinesNN)head(EastWestAirlinesNN)
Data
eBayAuctionseBayAuctions
A data frame with 1972 observations and 8 variables:
Category of the auctioned item.
a rating by eBay, as a function of the number of "good" and "bad" transactions the seller had on eBay.
Number of days the auction lasted (set by seller at auction start)
Day of week that the auction closed
Price item sold at (converted into USD)
Initial price set by the seller (converted into USD)
whether the auction had a single bid (0) or more (1)
Copyright 2016 Galit Shmueli and Peter Bruce
eBayAuctionseBayAuctions
Data
eBayNetworkeBayNetwork
A data frame with 200 observations and 5 variables:
eBayNetworkeBayNetwork
Data
eBayTreemapeBayTreemap
A data frame with 10078 observations and 5 variables:
head(eBayTreemap)head(eBayTreemap)
Data
EmailABtestEmailABtest
A data frame with 426 observations and 3 variables:
head(EmailABtest)head(EmailABtest)
Synthetic Data on Purchases of Phone Faceplates.
FaceplateFaceplate
A data frame with 10 observations and 7 variables:
Copyright 2016 Galit Shmueli and Peter Bruce
FaceplateFaceplate
Data on advertisements posted at a website that caters to the needs of a specific farming community. Each ad is in a row, and each ad labeled as either -1 (not relevant) or 1 (relevant). The goal is to develop a predictive model that can classify ads automatically.
FarmAdsFarmAds
A data frame with 4143 observations and 2 variables:
1: ad is relevant; -1 ad is not relevant
text of ad pre-processed into a list of words. The location of the word in the ad is in some cases indicated by a prefix.
Data
FarmAdsFarmAds
All flights in January 2004 out of 3 DC airports (WAS) into 3 NYC airports. Flights not cancelled
FlightDelaysFlightDelays
A data frame with 2201 observations and 13 variables:
scheduled departure time
The airline. AA=American Airlines, Inc.; CO=Continental Air Lines, Inc.; DH=Atlantic Coast Airlines; DL=Delta Air Lines, Inc.; EV=Atlantic Southeast Airlines; FL=Airtran Airways Corporation; MQ=American Eagle Airlines,inc; OH=Comair, Inc.; RU=Continental Express Airline; UA=United Air Lines, Inc.; US=US Airways, Inc.
Actual departure time
Destination airport in NY: Kennedy (JFK), LaGuardia (LGA), Newark (EWR)
Flight distance in miles
Flight date
Flight number
Departure airport in Washingon DC: National (DCA), Baltimore-Washington (BWI), Dulles (IAD)
Whether the weather was inclement (1) or not (0)
Day of week. 1=Mon, 2=Tues...
This number is airplane specific
Whether the flight was delayed or on time (defined as arriving within 15 min of scheduled time)
Bureau of Transportation Statistics
head(FlightDelays)head(FlightDelays)
Data
FundraisingFundraising
A data frame with 3120 observations and 24 variables:
Zipcode group (zipcodes were grouped into 5 groups; only 4 are needed for analysis since if a potential donor falls into none of the four he or she must be in the other group. Inclusion of all five variables would be redundant and cause some modeling techniques to fail. A "1" indicates the potential donor belongs to this zip group.) 00000-19999 => 1 (omitted for above reason); 20000-39999 => zipconvert_2; 40000-59999 => zipconvert_3; 60000-79999 => zipconvert_4; 80000-99999 => zipconvert_5
1 = homeowner, 0 = not a homeowner
Number of children
Household income
Gender: 0 = Male 1 = Female
Wealth Rating (Wealth rating uses median family income and population statistics from each area to index relative wealth within each state. The segments are denoted 0-9, with 9 being the highest wealth group and zero being the lowest. Each rating has a different meaning within each state.)
Average Home Value in potential donor's neighborhood in $ hundreds
Median Family Income in potential donor's neighborhood in $ hundreds
Average Family Income in potential donor's neighborhood in hundreds
Percent earning less than 15K in potential donor's neighborhood
Lifetime number of promotions received to date
Dollar amount of lifetime gifts to date
Dollar amount of lifetime gifts to date
Dollar amount of most recent gift
Number of months from last donation to July 1998 (the last time the case was updated)
Number of months between first and second gift
Average dollar amount of gifts to date
1 = Donor; 0 = Non-donor
Target Variable: Donation Amount (in $). We will NOT use it.
head(Fundraising)head(Fundraising)
Data
FutureFundraisingFutureFundraising
A data frame with 2000 observations and 24 variables:
See Fundraising for a description of the dataset
head(FutureFundraising)head(FutureFundraising)
Data
GDPGDP
A data frame with 264 observations and 5 variables:
Gross domestic product of the countries.
Data from Veenhoven's world database of happiness. http://data.worldbank.org/indicator/NY.GDP.MKTP.CD. World Development Indicators.
head(GDP)head(GDP)
Data
GermanCreditGermanCredit
A data frame with 1000 observations and 32 variables:
Observation No.
Checking account status. 0: < 0 DM; 1: 0 <...< 200 DM; 2: => 200 DM; 3: no checking account
Duration of credit in months
Credit history. 0: no credits taken; 1: all credits at this bank paid back duly; 2: existing credits paid back duly till now; 3: delay in paying off in the past; 4: critical account
Purpose of credit. car (new) 0: No, 1: Yes
Purpose of credit. car (used) 0: No, 1: Yes
Purpose of credit. furniture/equipment 0: No, 1: Yes
Purpose of credit. radio/television 0: No, 1: Yes
Purpose of credit. education 0: No, 1: Yes
Purpose of credit. retraining 0: No, 1: Yes
Credit amount
Average balance in savings account. 0 : < 100 DM; 1 : 100 <=...< 500 DM; 2 : 500 <=...< 1000 DM; 3 : =>1000 DM; 4 : unknown/ no savings account
Present employment since. 0 : unemployed; 1 : < 1 year; 2 : 1 <= ... < 4 years 3 : 4 <=... < 7 years 4 : >= 7 years
Installment rate as % of disposable income
Applicant is male and divorced. 0: No, 1: Yes
Applicant is male and single. 0: No, 1: Yes
Applicant is male and married or a widower. 0: No, 1: Yes
Application has a co-applicant. 0: No, 1: Yes
Applicant has a guarantor. 0: No, 1: Yes
Present resident since-years. 0: <= 1 year; 1: <…<= 2 years; 2: <…<= 3 years; 3: >4years
Applicant owns real estate. 0: No, 1: Yes
Applicant owns no property (or unknown). 0: No, 1: Yes
Age in years
Applicant has other installment plan credit. 0: No, 1: Yes
Applicant rents. 0: No, 1: Yes
Applicant owns residence. 0: No, 1: Yes
Number of existing credits at this bank
Nature of job. 0: unemployed/ unskilled - non-resident; 1: unskilled - resident; 2: skilled employee / official; 3: management/ self-employed/highly qualified employee/ officer
Number of people for whom liable to provide maintenance
Applicant has phone in his or her name. 0: No, 1: Yes
Foreign worker. 0: No, 1: Yes
Credit rating is good. 0: No, 1: Yes
head(GermanCredit)head(GermanCredit)
Fictional data representing an uplift study. A promotion for a hair color product was sent out to a sample of potential customers.
Promotional literature about a hair care product was sent to members of a buyers club. The goal is to determine which groups are most likely to make increased purchases as a result of receiving the promotion.
HairCareProductHairCareProduct
A data frame with 10000 observations and 8 variables:
1: purchased; 0: not purchased
age of customer
one of 'Black', 'Red', 'Blond', or 'Brown'
one of 'Southwest', 'Northwest', 'Northeast', or 'Southeast'
0: training set; 1: validation set
1: customer received a promotion; 0: did'n receive promotional material
1: male; 0: female
1: urban; 0: rural
SAS Institute, used by permission; sample of 10,000 observations from full 126,184 dataset
head(HairCareProduct)head(HairCareProduct)
Collection of movie reviews from the Internet Movie Database (IMDB)
The dataset contains 5,000 positive and 5,000 negative movie reviews collected from the Internet Movie Database (IMDB) (Maas et al. 2011). The original large movie dataset 25K positive and 25K negative movie reviews. This dataset is a stratified sample of 10K records from this dataset.
Data
IMDBdataset10KIMDBdataset10K
A data frame with 10,000 observations and 2 variables:
Movie review
Sentiment of the movie review categorized as "positive" or "negative"
Original large movie dataset is published at http://ai.stanford.edu/~amaas/data/sentiment/
head(IMDBdataset10K)head(IMDBdataset10K)
The laptop sales data were part of the ENBIS 2009 Challenge in Industrial Statistics.
This is the full Laptop sales dataset. It includes only the Jan 2008 sales (the complete dataset includes the entire 2008 sales).
Data
LaptopSalesLaptopSales
A data frame with 297,572 observations and 16 variables:
purchase date
A numerical code representing a combination of screen size, battery life, RAM, etc. Each code corresponds to a particular combination.
postcode in London of the customer
postcode in London of the store
price of laptop in GBP
screen size of laptop (Inches)
battery life of laptop (Hours)
RAM size of laptop(GB)
processor speed of laptop (GHz)
whether the laptop has integrated wireless or not
HD size of laptop (GB)
whether the laptop comes with bundled applications or not
X geo coordinates for customer location.
Y geo coordinates for customer location.
X geo coordinates for store location
Y geo coordinates for store location
The laptop sales data were part of the ENBIS 2009 Challenge in Industrial Statistics
head(LaptopSales)head(LaptopSales)
The laptop sales data were part of the ENBIS 2009 Challenge in Industrial Statistics.
This is a subset of the Laptop sales dataset. It includes only the Jan 2008 sales (the complete dataset includes the entire 2008 sales).
Data
LaptopSalesJanuary2008LaptopSalesJanuary2008
A data frame with 7956 observations and 17 variables:
purchase date
A numerical code representing a combination of screen size, battery life, RAM, etc. Each code corresponds to a particular combination.
postcode in London of the customer
postcode in London of the store
price of laptop in GBP
screen size of laptop (Inches)
battery life of laptop (Hours)
RAM size of laptop(GB)
processor speed of laptop (GHz)
whether the laptop has integrated wireless or not
HD size of laptop (GB)
whether the laptop comes with bundled applications or not
X geo coordinates for customer location.
Y geo coordinates for customer location.
X geo coordinates for store location
Y geo coordinates for store location
The laptop sales data were part of the ENBIS 2009 Challenge in Industrial Statistics
LaptopSales for the full dataset
head(LaptopSalesJanuary2008)head(LaptopSalesJanuary2008)
Synthetic dataset to demonstrate lift
LiftExampleLiftExample
A data frame with 24 observations and 2 variables:
head(LiftExample)head(LiftExample)
Movies from the Movielens 10k dataset
MovieLensMoviesMovieLensMovies
A data frame with 9,742 observations and 3 variables:
Same as ratings data
Movie titles, including the year of release in parentheses
Pipe-separated list of genres for corresponding movie title
The Movielens dataset is downloaded from https://grouplens.org/datasets/movielens/. Dataset creation date: September 26, 2018). See https://files.grouplens.org/datasets/movielens/ml-latest-small-README.html for the usage license.
F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4: 19:1–19:19. https://doi.org/10.1145/2827872
head(MovieLensMovies)head(MovieLensMovies)
Ratings from the Movielens 10k dataset
MovieLensRatingsMovieLensRatings
A data frame with 100,836 observations and 4 variables:
Anonymized MovieLens user ID. Each user has rated at least 20 movies.
Movie ID consistent with that used on the MovieLens website (e.g., information for movie id 1 is available at https://movielens.org/movies/1).
Movie rating provided by user on a 5-star scale, with half-star increments (0.5 star - 5 stars)
Timestamp when rating was recorded. Time is in seconds since midnight Coordinated Universal Time (UTC) of January 1, 1970
The Movielens dataset is downloaded from https://grouplens.org/datasets/movielens/. Dataset creation date: September 26, 2018). See https://files.grouplens.org/datasets/movielens/ml-latest-small-README.html for the usage license.
F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4: 19:1–19:19. https://doi.org/10.1145/2827872
head(MovieLensRatings)head(MovieLensRatings)
Data
NaturalGasSalesNaturalGasSales
A data frame with 16 observations and 2 variables:
NaturalGasSalesNaturalGasSales
The Motor Vehicle Collisions crash table contains details on the crash event. Each row represents a crash event. The Motor Vehicle Collisions data tables contain information from all police reported motor vehicle collisions in NYC. This dataset is a random subset of 1000 entries of the NYPD motor vehicle collisions dataset
NYPDMotorVehicleCollisionsNYPDMotorVehicleCollisions
A data frame with 1000 observations and 29 variables:
Occurrence date of collision
Occurrence time of collision
Borough where collision occurred
Postal code of incident occurrence
Latitude coordinate for Global Coordinate System, WGS 1984, decimal degrees (EPSG 4326)
Longitude coordinate for Global Coordinate System, WGS 1984, decimal degrees (EPSG 4326)
Latitude , Longitude pair
Street on which the collision occurred
Nearest cross street to the collision
Street address if known
Number of persons injured
Number of persons killed
Number of pedestrians injured
Number of pedestrians killed
Number of cyclists injured
Number of cyclists killed
Number of vehicle occupants injured
Number of vehicle occupants killed
Factors contributing to the collision for designated vehicle
Factors contributing to the collision for designated vehicle
Factors contributing to the collision for designated vehicle
Factors contributing to the collision for designated vehicle
Factors contributing to the collision for designated vehicle
Unique record code generated by system. Primary Key for Crash table.
Type of vehicle based on the selected vehicle category (ATV, bicycle, car/suv, ebike, escooter, truck/bus, motorcycle, other)
Type of vehicle based on the selected vehicle category (ATV, bicycle, car/suv, ebike, escooter, truck/bus, motorcycle, other)
Type of vehicle based on the selected vehicle category (ATV, bicycle, car/suv, ebike, escooter, truck/bus, motorcycle, other)
Type of vehicle based on the selected vehicle category (ATV, bicycle, car/suv, ebike, escooter, truck/bus, motorcycle, other)
Type of vehicle based on the selected vehicle category (ATV, bicycle, car/suv, ebike, escooter, truck/bus, motorcycle, other)
Random sample of the NYPD Motor Vehicle Collisions Dataset. (https://data.cityofnewyork.us/Public-Safety/NYPD-Motor-Vehicle-Collisions/h9gi-nx95)
head(NYPDMotorVehicleCollisions)head(NYPDMotorVehicleCollisions)
Data
OwnerExampleOwnerExample
A data frame with 24 observations and 2 variables:
head(OwnerExample)head(OwnerExample)
Data
PharmaceuticalsPharmaceuticals
A data frame with 21 observations and 14 variables:
Compiled from various web sources. Copyright 2016 Galit Shmueli and Peter Bruce
head(Pharmaceuticals)head(Pharmaceuticals)
Convenience function to calculate a variety of regression metrics
regressionSummary(predicted, actual)regressionSummary(predicted, actual)
predicted |
predicted values |
actual |
actual values |
list containing the regression metrics ME, RMSE and MAE
lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings) regressionSummary(predict(lm.SR, LifeCycleSavings), LifeCycleSavings$sr)lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings) regressionSummary(predict(lm.SR, LifeCycleSavings), LifeCycleSavings$sr)
Data
RidingMowersRidingMowers
A data frame with 24 observations and 3 variables:
Annual income in $000
In thousands of sq. feet
Whether the resident owns a riding mower or not
Data courtesy of Dean Wichern
head(RidingMowers)head(RidingMowers)
Data
SCstudentsSCstudents
A data frame with 1696 observations and 2 variables:
head(SCstudents)head(SCstudents)
Estimated Impacts of September 11th on US Travel
Sept11TravelSept11Travel
A data frame with 172 observations and 4 variables:
Air revenue passenger miles (1 RMP is one revenue passenger carried for one mile)
Rail passenger miles
Vehicle miles traveled
Bureau of Transportation Statistics: https://www.bts.gov/archive/publications/estimated_impacts_of_9_11_on_us_travel/index
Sept11TravelSept11Travel
Data on the monthly sales of a certain shampoo over a 3-year period.
ShampooSalesShampooSales
A data frame with 36 observations and 2 variables:
Time Series Data Library, https://pkg.yangzhuoranyang.com/tsdl/
ShampooSalesShampooSales
Monthly sales for a souvenir shop at a beach resort town in Queensland, Australia, between 1995–2001.
SouvenirSalesSouvenirSales
A data frame with 84 observations and 2 variables:
Time Series Data Library, https://pkg.yangzhuoranyang.com/tsdl/
SouvenirSalesSouvenirSales
Monthly closing prices of S&P500
SP500SP500
A data frame with 100 observations and 2 variables:
Monthly closing prices of S&P500
head(SP500)head(SP500)
Each of the words below are columns in the data and the values represent % of words in the e-mail that match that particular word. For example, make represent % of words in the e-mail that match "make".
SpambaseSpambase
A data frame with 4601 observations and 58 variables:
C;
C(
C[
C!
C$
C#
average length of uninterrupted sequences of capital letters
length of longest uninterrupted sequence of capital letters
total number of capital letters in the e-mail
1 = spam, 0 = not spam
head(Spambase)head(Spambase)
Data
SystemAdministratorsSystemAdministrators
A data frame with 75 observations and 3 variables:
measures months of full-time system administrator experience
measures the number of relevant training credits
either Yes or No, according to whether or not the administrator completed the tasks
Samprit Chatterjee
head(SystemAdministrators)head(SystemAdministrators)
The data are a randomly selected subset of the original data, with 10,000 rows, one row for each booking of a taxi. There are 17 input variables, including user (customer) ID, vehicle model, whether the booking was made online or via a mobile app, type of travel, type of booking package, geographic information, and the date and time of the scheduled trip. The target variable of interest is the binary indicator of whether a ride was canceled.
TaxiCancellationCaseTaxiCancellationCase
A data frame with 10000 observations and 19 variables:
the ID of the customer (based on mobile number)
vehicle model type.
type of package (1=4hrs & 40kms, 2=8hrs & 80kms, 3=6hrs & 60kms, 4= 10hrs & 100kms, 5=5hrs & 50kms, 6=3hrs & 30kms, 7=12hrs & 120kms)
type of travel (1=long distance, 2= point to point, 3= hourly rental).
unique identifier of area. Applicable only for point-to-point travel and packages
unique identifier of area. Applicable only for point-to-point travel
unique identifier of city
unique identifier of city (only for intercity)
time stamp of requested trip start
time stamp of trip end
if booking was done on desktop website
if booking was done on mobile website
time stamp of booking
latitude of from area
longitude of from area
latitude of to area
longitude of to area
1=trip cancelled; 0=trip not cancelled
Copyright 2016 statistics.com
head(TaxiCancellationCase)head(TaxiCancellationCase)
Data
TaykoTayko
A data frame with 2000 observations and 25 variables:
Unique identifier
Is it a US address? 1=yes; 0=no
Source catalog for the record. 1=yes; 0=no
(15 identified sources plus one "other source" category; 15 dummies created with "other" as the reference, hence omitted.)
Number of transactions in last year at source catalog
How many days ago was last update to customer record
How many days ago was 1st update to customer record
Customer placed at least 1 order via web. 1=yes; 0=no
Customer is male. 1=yes; 0=no
Address is a residence. 1=yes; 0=no
Person made purchase in test mailing. 1=yes; 0=no
Amount spent by customer intest mailing ($)
Copyright 2016 statistics.com
head(Tayko)head(Tayko)
Data includes information on a tasting score for a certain processed cheese. The two predictors are scores for fat and salt, indicating the relative presence of fat and salt in the particular cheese sample (where 0 is the minimum amount possible in the manufacturing process, and 1 the maximum). The outcome variable is the cheese sample’s consumer taste preference, where like or dislike indicate whether the consumer likes the cheese or not. Data
TinyDataTinyData
A data frame with 6 observations and 4 variables:
unique identifier
relative presence of fat in cheese. (where 0 is the minimum amount possible in the manufacturing process, and 1 the maximum)
relative presence of salt in cheese. (where 0 is the minimum amount possible in the manufacturing process, and 1 the maximum)
Consumer taste preference; one of 'like' or 'dislike'
head(TinyData)head(TinyData)
Data
ToyotaCorollaToyotaCorolla
A data frame with 1436 observations and 39 variables:
Record_ID; unique identifier
Model Description
Offer Price in EUROs
Age in months as in August 2004
Manufacturing month (1-12)
Manufacturing year
Accumulated Kilometers on odometer
Fuel Type. one of 'Petrol', 'Diesel', or 'CNG'
Horse Power
Metallic Color? (Yes=1, No=0)
Color (Blue, Red, Grey, Silver, Black, etc.)
Automatic (Yes=1, No=0)
Cylinder Volume in cubic centimeters
Number of doors
Number of cylinders
Number of gear positions
Quarterly road tax in EUROs
Weight in Kilograms
Within Manufacturer's Guarantee period (Yes=1, No=0)
BOVAG (Dutch dealer network) Guarantee (Yes=1, No=0)
Guarantee period in months
Anti-Lock Brake System (Yes=1, No=0)
Driver_Airbag (Yes=1, No=0)
Passenger Airbag (Yes=1, No=0)
Airconditioning (Yes=1, No=0)
Automatic Airconditioning (Yes=1, No=0)
Boardcomputer (Yes=1, No=0)
CD Player (Yes=1, No=0)
Central Lock (Yes=1, No=0)
Powered Windows (Yes=1, No=0)
Power Steering (Yes=1, No=0)
Radio (Yes=1, No=0)
Mistlamps (Yes=1, No=0)
Sport Model (Yes=1, No=0)
Backseat Divider (Yes=1, No=0)
Metallic Rim (Yes=1, No=0)
Radio Cassette (Yes=1, No=0)
Parking assistance system (Yes=1, No=0)
Tow Bar (Yes=1, No=0)
Copyright 2016 Nitin Patel, Galit Shmueli and Peter Bruce
head(ToyotaCorolla)head(ToyotaCorolla)
The quarterly revenues of Toys “R” Us between 1992 and 1995
ToysRUsRevenuesToysRUsRevenues
A data frame with 16 observations and 4 variables:
Chris Albright
ToysRUsRevenuesToysRUsRevenues
Synthetic dataset courtesy of statistics.com
UniversalBankUniversalBank
A data frame with 500 observations and 14 variables:
Customer ID
Customer's age in completed years
#years of professional experience
Annual income of the customer ($000)
Home Address ZIP code
Family size of the customer
Avg. spending on credit cards per month ($000)
Education Level. 1: Undergrad; 2: Graduate; 3: Advanced/Professional
Value of house mortgage if any. ($000)
Did this customer accept the personal loan offered in the last campaign?
Does the customer have a securities account with the bank?
Does the customer have a certificate of deposit (CD) account with the bank?
Does the customer use internet banking facilities?
Does the customer use a credit card issued by UniversalBank?
Copyright Cytel, Inc. 2005
UniversalBankUniversalBank
A bank of small to moderate size is thinking of automating its loan approval process to compete with internet-based financial service companies. A consultant has been engaged to develop a predictive model, based on historical human-reviewed loans and their approval rates. The model would be used to approve or reject loans automatically.
UniversalBankCaseUniversalBankCase
A data frame with 5000 observations and 17 variables:
Customer ID
Customer's age in completed years
#years of professional experience
Annual income of the customer ($000)
Home Address ZIP code
Family size of the customer
Avg. spending on credit cards per month ($000)
Education Level. 1: Undergrad; 2: Graduate; 3: Advanced/Professional
Value of house mortgage if any. ($000)
Did this customer accept the personal loan offered in the last campaign?
Does the customer have a securities account with the bank?
Does the customer have a certificate of deposit (CD) account with the bank?
Does the customer use internet banking facilities?
Does the customer use a credit card issued by UniversalBank?
0 = White/other (non-hisp), 1 = Black, 2 = Hispanic
0 = Male, 1 = Female
1 = Urban, 0 = Other
Synthetic dataset courtesy of statistics.com. Copyright Cytel, Inc. 2005, modifications Copyright Peter Bruce, 2022
UniversalBankCaseUniversalBankCase
The dataset on American college and university rankings contains information on 1302 American colleges and universities offering an undergraduate program. For each university, there are 17 measurements that include continuous measurements (such as tuition and graduation rate) and categorical measurements (such as location by state and whether it is a private or a public school).
UniversitiesUniversities
A data frame with 1302 observations and 20 variables:
Copyright 2016 Galit Shmueli and Peter Bruce. Compiled from US News and World Report rankings on 1302American Colleges and Universities
head(Universities)head(Universities)
Data
UtilitiesUtilities
A data frame with 22 observations and 9 variables:
Company name
Fixed-charge coverage ratio (income/debt)
Percent rate of return on capital
Cost per KW capacity in place
Annual load factor
Percent demand growth
Sales (KWH use per year)
Percent nuclear
Total fuel costs (cents per KWH)
UtilitiesUtilities
Data measuring happiness of countries. according to a 2006 Gallup survey.
VeerhovenVeerhoven
A data frame with 159 observations and 5 variables:
VeerhovenVeerhoven
Data
VoterPersuasionVoterPersuasion
A data frame with 10000 observations and 79 variables:
Unique ID for each voter
Set number, assigned at random. Can be used to divide development and test sets. Build models using only sets 1 & 2. Validate on the hold-out sample of set_no=3 voters
% of people with the same first name who have a different gender (Derived)
Age (Voterfile)
Number of Democrats in this household (Derived)
Number of Republicans in this household (Derived)
Number of independents in this household (Derived)
Census Block Group median age (Census)
% Non-Hispanic Caucasian (Census)
% Non-Hispanic African-American (Census)
% Non-Hispanic Asian (Census)
% Non-Hispanic multi-race (Census)
% Hispanic (Census)
% of workers who commute less than 10 minutes each way (Census)
% of workers who commute 60+ minutes each way (Census)
Median household income (Census)
% of workers who commute by themselves by car (Census)
% of workers who carpool (Census)
% of workers who take public transportation (Census)
% of workers who walk to work (Census)
% of families with children under 18 (Census)
% of adult men who are married (Census)
% of adult females who are married (Census)
% of adult population with at least 4 years of college (Census)
Flag - is female (Voterfile)
Flag - is male (Voterfile)
Flag - household all-female different last names, 3+ members (Derived)
Flag - household single female (Derived)
Flag - Single male (Derived)
Flag - household male & female, different last names, 3+ members (Derived)
Flag - Democrat (Voterfile)
Flag - Independent (Voterfile)
Flag - Republican (Voterfile)
Flag - vote history - voted presidential primary 2008 (Derived)
Flag - vote history - voted presidential primary 2012 (Derived)
Flag - vote history - voted primary 2008 (Derived)
Flag - vote history - voted primary 2010 (Derived)
Flag - vote history - voted primary 2012 (Derived)
Flag - vote history - voted general election 2004 (Derived)
Flag - vote history - voted general election 2006 (Derived)
Flag - vote history - voted general election 2008 (Derived)
Flag - vote history - voted general election 2010 (Derived)
Flag - vote history - voted general election 2012 (Derived)
Voted in % of presidential primaries in which they were eligible (Derived)
Voted in % of non-presidential primaries in which they were eligible (Derived)
Voted in % of any kind of primary in which they were eligible (Derived)
Voted in % of general elections in which they were eligible (Derived)
Voted in % of any kind of election in which they were eligible (Derived)
# of the last 5 elections in which the voter voted (Derived)
# of last 3 primaries in which the voter voted (Derived)
# of last 5 primaries of any kind in which the voter voted (Derived)
# of last 2 presidential primaries in which the voter voted (Derived)
Days since the voter registered to vote at their current address (Derived)
Upscale Buyer In Home (Commercial Data)
Upscale Male Buyer In Home (Commercial Data)
Upscale Female Buyer In Home (Commercial Data)
Book Buyer In Home (Commercial Data)
Family Magazine In Home (Commercial Data)
Female Oriented Magazine In Home (Commercial Data)
Religious Magazine In Home (Commercial Data)
Gardening Magazine In Home (Commercial Data)
Culinary Interest Magazine In Home (Commercial Data)
Health Fitness Magazine In Home (Commercial Data)
Do It Yourselfer Magazine In Home (Commercial Data)
Financial Magazine In Home (Commercial Data)
Religious Contributor In Home (Commercial Data)
Political Contributer In Home (Commercial Data)
Median Education Years (Commercial Data)
Wave 1 candidate ID with strenght of support. SD=Strong Democrat, LD=Lean Democrat, U=Undecided, LR=Lean Republican, SR=Strong Republican (Synthetic)
Wave 2 candidate ID with strenght of support (Synthetic)
Flag indicating if the voter received message A (Synthetic)
Flag indicating if the voter received message B (Synthetic)
Independent 3-way. Y if voter is an independent or minor party member. N if Democrat or Republican
Undecided in wave 1 IDs
Undecided in wave 2 IDs
Moved to be more supportive of the Democratic candidate. Stronger support for the Democrat or weaker support for the Republican in wave 2 than in wave 1.
0/1 encoding of 'MOVED_AD'
reverse of 'MOVED_AD'
'V'=validation, 'T'= test set
Copyright 2016 Ken Strasma and statistics.com; Ken Strasma and HaystaqDNA
VoterPersuasionVoterPersuasion
The series of Walmart daily closing prices between February 2001 and February 2002. Data
WalMartStockWalMartStock
A data frame with 248 observations and 2 variables:
publicly available, for example, at https://finance.yahoo.com. These data are also used in "Data Analysis for Managers" by Albright, Winston & Zappe.
WalMartStockWalMartStock
Data
WestRoxburyWestRoxbury
A data frame with 5802 observations and 14 variables:
Total assessed value for property, in thousands of USD
Tax bill amount based on total assessed value multiplied by the tax rate
Total lot size of parcel in square feet
Year property was built
Gross floor area
Total living area for residential properties (in square feet)
Number of floors
Total number of rooms
Total number of bedrooms
Total number of full baths
Total number of half baths
Total number of kitchens
Total number of fireplaces
When house was remodeled (Recent/Old/None)
WestRoxburyWestRoxbury
Wine dataset contains properties of wine captured from three different wineries in the same region. There are 13 variables describing various properties of wine and 3 classes. This dataset can be used for classification with Type as a output variable OR can be used to perform clustering to without using Type variable to see the accuracy of prediction.
Data
WineWine
A data frame with 178 observations and 14 variables:
Type of wine; one of 'A', 'B', or 'C'
Alcalinity of ash
OD280/OD315 of diluted wines
This data set can be found in the UCI Machine Learning Repository (https://archive.ics.uci.edu/ml/datasets/wine)
WineWine