SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
grizzly
statistical analysis with
multidimensional dataļ¬‚ows in python
Adrian Heilbut
Boston University and Broad Institute
http://www.empiricist.ca
(graphs for reproducible
interactive visualization and analysis)
PyData Boston 2013
1. Motivation 
 Biological discovery from complex, multidimensional data;

 common features of complex biological data and analyses
2. Problems and Goals
 Reproducible, efļ¬cient, elegant, collaborative,interactive analysis

 Data + analysis evolving over time
3. Toy Dataset	 	 A simple dataset with hierarchical and temporal structure
4. Strategies
 Separate concerns; Represent types and structure explicitly;

 Abstract away data management; Formalize
5. Inspirations 
 OLAP and data cube models;

 Declarative visualization grammars;

 Scientiļ¬c workļ¬‚ow systems
6. Core Ideas
 Dataļ¬‚ows + Temporal Graphs +

 Multidimensional Types + Syntactic syrup
7. Toy Demos 	
8. Implementation
9. Biology application 
 Mechanisms of drug side effects in Parkinsonā€™s Disease
10. Summary and Conclusions
Motivation
ā€¢ Common and unique features of scientiļ¬c data
ā€¢ Examples of complex datasets and analyses in
computational biology
ā€¢ Data analysis desiderata
Motivation Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application
Biological data is increasingly complex;
Many datasets and analyses share
common structural features
ā€¢ High-dimensional measurements
ā€¢ Longitudinal / time-course measurements
ā€¢ Hierarchical structure of dimensions
ā€¢ Multiple modalities
(expression, protein concentration, phosphorylation)
ā€¢ Complex experimental designs
ā€¢ Complex analysis designs
ā€¢ Complex pre-processing pipelines
ā€¢ Many parameter choices
ā€¢ Many cell types
ā€¢ Many treatments
ā€¢ Many organisms
ā€¢ Many patients
ā€¢ Many replicates
Ex 1. Cancer Proļ¬ling and Signatures
Cancer Cell Line Encylopedia (CCLE)
Broad / Novartis, Barretina 2012
1000 cell lines
expressionfor
20,000genesmutationstatusdrugresponse
P0 P07 P12 P18 P21 P56
proliferationproliferation differentiationdifferentiation migration & patterningmigration & patterning
P0 P07 P15 P21
E0 E11 E15 E18
3 reps, 40k
probes
Saline
Acute (9)
Low Dose
Levodopa
Chronic (12)
Saline
Chronic (11)
6-OHDA
Ascorbate
Day 1
Expression + AIM
CP73
Day 8
Expression + AIM
High Dose
Levodopa
Acute (10)
High Dose
Levodopa
Chronic (11)
Saline
Chronic (10)
Low Levodopa
Chronic (8)
Saline
Chronic (7)
6-OHDA
Ascorbate
CP101
Day 8
Expression + AIM
High Levodopa
Chronic (8)
Saline
Chronic (10)
Change in Expression between treatment groups
Expression vs. AIM (correlation) within treatment groups / cell types
Statistics (per gene)
Expression vs. AIM (correlation) within combined treatment groups
~ 23,000 x 200 matrix
of stats for different contrasts between groups
Unique characteristics of scientiļ¬c data
ā€¢ Relatively short half-life of data and projects
ā€¢ Uncertain and complex analysis methods
ā€¢ Constantly changing data
ā€¢ Lots of internal and external structure over dimensions
ā€¢ Teams with diverse backgrounds and skills over multiple institutions
and locations
ā€¢ Communication of data is a primary goal
ā€¢ High risk and high value outcomes
project selection / experimental followup
clinical decisions
Distinctive characteristics, uses, and problems with scientiļ¬c
data analysis motivates need for tailored abstractions and tools
Desiderata for Data Analysis
ā€¢ Correctness
ā€¢ Thoroughness (scientiļ¬c hypothesis space + analysis space)
ā€¢ Reproducibility
ā€¢ Veriļ¬ability (analysis and underlying data, others and oneself)
ā€¢ Clarity
ā€¢ Provenance (of the data, and of the analysis)
ā€¢ Interactivity (Exploration, Drill-down)
ā€¢ Computational Efļ¬ciency
ā€¢ Scientist Efļ¬ciency
Vision
Every ļ¬gure, every table, and every quantitative claim in a scientiļ¬c
analysis or publication should be veriļ¬able and explorable
it should link to an understandable, executable,
modiļ¬able representation of the data analysis pipeline by
which it was generated
one should be able to trace back all the way to the primary
experimental data
it should be easy and fun to play with
Problems and Goals
Errors have serious consequences
Practical problems in day-to-day analysis
Unmet need for better tools
Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application Conclusions
Mistakes even happen in Cambridge...
Reinhart / RogoffHerndon, Ash, Pollin
OriginalCorrect
itā€™s even worse than it appears...
Kimball, 2013
ability to easily
drill down to view
and assess the
underlying data is
critical
Elements of statistical analysis
statistical
algorithms
output
data
Input data
visualizations
summary
tables
Version 2.
output
data
Input dataInput dataInput dataInput dataInput dataInput dataInput dataInput dataInput data
statistical
algorithm
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
statistical
algorithm
statistical
algorithm
Version 247...
(ah_2013_09_13_v247_
3-17am)
statistical
algorithm
output
data
Input
data
Input
data
Input
data
Input
data
Input
data
Input
data
Input
data
statistical
algorithm
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
statistical
algorithm
statistical
algorithm
statistical
algorithm
statistical
algorithm
v247_ļ¬gs.
pdf
75mb
(450
pages)
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
v247_tabl
e_1.tab
Toy Dataset
Multidimensional proļ¬ling of fermentation
metabolites of S. cerevisiae
Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application
Beer ratings
BeerAdvocate.com & RateBeer.com,
via Stanford SNAP & a very kind blogger
Multidimensional: Appearance, Aroma,
Palate, Taste, Overall
Hierarchies:
Location -> Brewery -> Beer
Beer style -> Beer
Temporal
Toy Dataset
Multidimensional proļ¬ling of fermentation
metabolites of S. cerevisiae
Strategies
ā€¢ Separate concerns
ā€¢ Abstract away data management problems
ā€¢ Formalize
ā€¢ Optimize representations
(logical and physical)
Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application Conclusions
Separation of Concerns
ā€¢ Each of these components evolves over time
ā€¢ Each may be modifed independently by diļ¬€erent
people with diļ¬€erent goals
statistical
algorithms
output
data
Input data
visualizations
summary
tables
Abstract and automate data
management
Deciding and remembering how to name columns and ļ¬les and
track changes over time is not what Iā€™d like to spend time on
Especially since Iā€™ll probably do it inconsistently with what I
decided to do last week
If the system is responsible for persisting data, caching and
memoization can be done automatically.
Logical and physical
representations matter
ā€¢ Choice of representation and notation has a major effect
on ease and efļ¬ciency with which concepts can be
manipulated, by either a person or a computer
ā€¢ Given our goals for an analysis system, and engineering
instinct to separate independent concerns, what are
optimal representations for
ā€¢ data?
ā€¢ analysis programs?
ā€¢ visualizations and summary tables?
statistical
algorithm
output
data
Input
data
Input
data
Input
data
Input
data
Input
data
Input
data
Input
data
statistical
algorithm
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
output
data
statistical
algorithm
statistical
algorithm
statistical
algorithm
statistical
algorithm
How do scientists actually think about
analyses?
Inspirations (and their deļ¬ciencies..)
1. OLAP (On-Line Analytical Processing) and MDX
(Multidimensional Expressions)
2. Tableau / Polaris
3. Scientiļ¬c workļ¬‚ow systems
VisTrails, KNIME
Galaxy, Genepattern
1: OLAP
(on-line analytical processing)
2. Declarative Visualization Grammars
(Polaris/Tableau; Stolte 2003)
ā€¢ key idea: declarative speciļ¬cation of visualizations is possible and works well
ā€¢ recent focus has been on busines analytics, rather than statistical graphics;
ā€¢ assumes a static, structured database (ie. OLAP star schema) Stolte 2000
3. Scientiļ¬c Workļ¬‚ow Systems
VisTrails
Hypothesis
Careful design and selection of representations for data,
programs, and visualizations will make it possible to
satistfy our data analysis objectives:
ā€¢ multidimensional cubes with static, semantic types
for conceptual representation of data
ā€¢ directed acyclic graphs of functions with static,
multidimensional input and output type signatures
for our statistical programs
ā€¢ declarative queries
to generate summary tables
ā€¢ declarative visualization grammar
to generate graphics
(this is not how most researchers represent their analyses today)
Correctness
Thoroughness
Reproducibility
Veriļ¬ability
Clarity
Provenance
Interactivity
Computational Efļ¬ciency
Scientist Efļ¬ciency
Multidimensional Cubes
and OLAP
Semantic Types
Dataļ¬‚ow Programming
Core Ideas
Data consists of facts about the world.
1 5.5 3 3 4 5
2 6 2 3 2 2
3 8 5 5 4 4.5
ceci nā€™est pas data
Data consists of facts about the world.
1
2
3
5.5 3 3 4 5
6 2 3 2 2
8 5 5 4 4.5
ABV Smell Color Taste OverallBeerID
Facts lie in speciļ¬c domains deļ¬ned by the
structure of the real world or experimental design
1
2
3
5.5 3 3 4 5
6 2 3 2 2
8 5 5 4 4.5
ABV
ļ¬‚oat
(%EtOh)
Smell
ordinal
(1-5)
5 is best
Color
ordinal
(1-5)
5 is best
Taste
ordinal
(1-5)
5 is best
Overall
ordinal
(1-5)
5 is best
BeerID
Integer
(BeerAdvocate
BeerID)
There are a number of possible representations;
logically but not practically equivalent
1
2
3
5.5 3 3 4 5
6 2 3 2 2
8 5 5 4 4.5
ABV
ļ¬‚oat
(%EtOh)
Smell
ordinal (1-5)
5 is best
Color
ordinal
(1-5)
5 is best
Taste
ordinal
(1-5)
5 is best
Overall
ordinal
(1-5)
5 is best
BeerID
Integer
(BeerAdvocate)
BeerID
BeerID Measure Value
1 ABV 5.5
1 Smell 3
1 Color 3
1 Taste 4
1 Overall 5
2 ABV 6
2 Smell 2
2 Color 3
2 Taste 2
2 Overall 2
3 ABV 8
3 Smell 5
3 Color 5
3 Taste 4
3 Overall 4.5
cf. pandas reshape, plyr melt/cast
ā‰ˆ
Data Representations
ā€¢ Scientiļ¬c / statistical data is usally in matrix format, and it must
be for efļ¬cient storage and computation
ā€¢ Relational model is good for precisely encoding logical
structure of data, but
ā€¢ moving between relations and matrices is cumbersome
ā€¢ deļ¬ning a relational schema for all intermediate data would
be a lot of work, especially as with change over time
ā€¢ on its own, the relational model does explicitly represent
semantics and units
Conceptual Model:
OLAP Data Cubes
Cartesian product of a set of
dimensions (ļ¬nite discrete sets)
deļ¬nes an N-dimensional grid
A multidimensional dataset is a
function mapping locations in that
grid to typed values called
measures (identities of the
measures can also be considered as
just a special kind of dimension)
Beer ID
UserID
Time
Gene
Brain
Region
Stage of
Development3 3 2 7.8 3 2
3 2 2.3 2.1 3 2
3 2.3 7.4 12 3 2
3 3.14 15 9 3 2
3 2 2 6.5 2 2
measure:
log2 gene expression
measure:
overall beer rating
Conceptual Model:
Data Cubes as functions mapping dimensions
to measures
def BeerRatingsByUser(UserID, BeerID):
return (Taste, Smell, Color,
Texture, Overall)
def BeerRatingsByBeer(BeerID):
return (mean Taste, mean Smell,
mean Color, mean Texture, mean
Overall)
def ExpressionBySample(Gene, Region, SampleID):
return (log2 expression)
def ExpressionByRegionTime(Gene, Region,
Timepoint):
return (median expression, mean
expression, std deviation, median abs
deviation, # replicates)
Hierarchies
Dimensions are related to each
other in structures that reļ¬‚ect:
ā€¢ the nature of the world
ā€¢ experimental methods
and designs
ā€¢ analysis processes and
decisions
These hierarchical relationships are critical to understanding and
performing analyses, and need to be represented explicitly.
Multidimensional Semantic Types
1970s / 80s: Semantic Database formalisms
Specify different kinds of relationships and interactions between objects
(eg. containment, is-a, relations / cross-products)
Overshadowed by ER model and later, UML..
1990s: OLAP
Dataļ¬‚ow
Lots of domains model computation as ā€˜declarativeā€™ dataļ¬‚ows
circuit design
audio / video processing
Grizzly Computation Model
Directed Acyclic Graph of processing nodes
Inputs and outputs of every node are typed cubes
Function nodes add type information to describe their output dimensions
ā€˜Applyā€™ nodes propagate any types of their input dimensions that they
arenā€™t modiļ¬ed to the outputs
Computation is declarative / intensional, not imperative; nodes
automatically process whatever is on their inputs, like an electrical circuit
(ReviewID, BeerID) -->
(Appearance,
Aroma, Palate,
Taste, Overall)
CalcMedian
Ratings
(BeerID) -->
(Appearance,
Aroma, Palate, Taste, Overall)
(ReviewID, BeerID,
SourceID)
-->
(Appearance,
Aroma,
Palate,
Taste,
Overall)
(SourceID, BeerID)
-->
(MedianAppearance,
MedianAroma,
MedianPalate,
MedianTaste,
MedianOverall)
Apply
Advantages of DAG representation
ā€¢ Static type speciļ¬cations allow precise and clear modeling /
design of an analysis pipeline before having to write all the
code needed to implement it
ā€¢ Model can be turned into an actual working program, instead
of just being a schematic diagram
ā€¢ Provenance tracking without extra instrumentation
ā€¢ Memoization of intermediate results is easy because data
dependencies are already explicit
ā€¢ Easier to understand, reason about, and explain to others
ā€¢ Easier to track modiļ¬cation history as graph edits
Syntactic Syrup: CubeApply
Takes cross-product of a set of input cubes /
vectors and applies function to all results
(BeerID) -->
(Appearance,
Aroma, Palate,
Taste, Overall)
BeerRank
(BeerID) -->
(RankScore)
(BeerID)
-->
(Appearance,
Aroma,
Palate,
Taste,
Overall)
(BeerID,
RankModelID)
-->
(RankScore)
(AppWeight, AromaWt, PalWt,
TasteWt, OverallWt)
(RankModelD)
-->
(AppWt, AromaWt,
PalWt, TasteWt,
OverallWt)
Slicing, Dicing
Since semantic type data is always propagated, in principle we
can deļ¬ne the schema for any intermediate data (including
hierarchy structure) and make use of existing OLAP tools to run
declarative queries
Implementation
ā€¢ Type system
ā€¢ DAGs
ā€¢ Execution
ā€¢ Data Management
ā€¢ Visualizations
ā€¢ ...queries?
Requirements for a practical system
ā€¢ Programmable and extensible, without requiring discontinuous
changes to existing habits
ā€¢ OLAP systems not general enough; energy barrier to setting up
a ā€˜data warehouseā€™ for a particular scientiļ¬c analysis is too
high; arbitrary, complex statistics not supported
ā€¢ System must be deployable over the web, so analyses and
results can be easily shared with geographically dispersed
collaborators and the scientiļ¬c community
ā€¢ Free and open source
Current Support for Hierarchies in
Pandas
ā€¢ Hierarchical dataframes only support ā€˜uniformā€™ hierarchies
ā€¢ lots of real analysis requires comparisons across many
different types
ā€¢ Metadata is unstructured
ā€¢ canā€™t compute effectively on column names
ā€¢ Manual management
ā€¢ consistency of column naming and interpretation depends
entirely on programmer discipline
Simple Semantic Types over Pandas
['[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]],
["ct", "cp73"],
["mc", "bh"],
["st", "pval"],
["tt", "welch ttest"]]',
'[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]],
["ct", "cp73"],
["mc", "nominal"],
["st", "pval"],
["tt", "student ttest"]]',
'[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]],
["ct", "cp73"],
["mc", "bonf"],
["st", "pval"],
["tt", "student ttest"]]',
'[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]],
["ct", "cp73"],
["mc", "bh"],
["st", "pval"],
["tt", "student ttest"]]',
'[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]],
["ct", "cp73"],
["st", "pval"],
["tt", "levene"]]
ct
CP73 CP101
tt
student
ttest
welch
ttest
st
pval t-stat
bonf bh nom
mc
X
ct tt mccmp st
Temporal Graph Database
ā€¢ Canonical
representation for
types, ā€˜programsā€™,
and pointers to data
are all as typed
property graphs
(DAGs) that can
hold JSON
payloads
ā€¢ All edit history to the
graph is recorded,
so user can rewind /
replay and branch
Generic Visualization Components
to compose visualizations & reports
Architecture Overview
GZDB
Graph
Editor
Grizzly Webapp
SQLAlchemy
Postgres
IPython
Pandas
HTML Viz
Widgets
GZData
GZFlow
CherryPy
D3, Slickgrid, FlotjsPlumb
Filesystem
Biological Applications
Bio Example 1: Striatal Gene
Expression w. L-DOPA
Summary tables
Drilldown and provenance from summary tables to primary data
Drilldown from summary to statistical
tables
Drilldown from statistical tables to plots
of primary data
Bio Example 2: Complex,
interactive visualizations:
BOMBASTIC
Subspace clustering of time-series data
A. Deļ¬ne blocks and an ordering
B. Cluster each block
independently
C. Represent resulting clusters in a
tree and explore/ļ¬lter interactively
Each (predeļ¬ned) subspace
has unique information; we
want to understand patterns
both within and between
blocks
Summary
Increasing complexity of biological data presents critical
requirements for better systems for collaborative analysis of high-
dimensional, multi-factor, dynamic data
A dataļ¬‚ow computation model with semantic, multidimensional
types offers signiļ¬cant advantages for meeting these requirements
Grizzly deļ¬nes a simple, formal model for multidimensional data and
DAGs of operations on that data, adapting and combining ideas
from OLAP, declarative visualization, and dataļ¬‚ow programming.
Proof-of-concept implementation in python establishes feasibility
Applications to analysis of real biological experiments (PD, Neuro,
Cancer) will evaluate practical utility and beneļ¬ts
Correctness
Thoroughness
Reproducibility
Veriļ¬ability
Clarity
Provenance
Interactivity
Computational Efļ¬ciency
Scientist Efļ¬ciency
Acknowledgements: Software
ā€¢ IPython
ā€¢ NumPy
ā€¢ Pandas
ā€¢ Statsmodels
ā€¢ Patsy
ā€¢ CherryPy
ā€¢ SQLAlchemy
ā€¢ postgres
ā€¢ NetworkX
ā€¢ igraph
ā€¢ backbone
ā€¢ underscore
ā€¢ jsPlumb
ā€¢ ļ¬‚ot
ā€¢ D3.js
Acknowledgements
@adrian_h
http://www.grizzly.io

Weitere Ƥhnliche Inhalte

Was ist angesagt?

NPS_TDA_forPDF_JPrendki
NPS_TDA_forPDF_JPrendkiNPS_TDA_forPDF_JPrendki
NPS_TDA_forPDF_JPrendki
Jennifer Prendki
Ā 
10 Algorithms in data mining
10 Algorithms in data mining10 Algorithms in data mining
10 Algorithms in data mining
George Ang
Ā 

Was ist angesagt? (20)

Kenett On Information NYU-Poly 2013
Kenett On Information NYU-Poly 2013Kenett On Information NYU-Poly 2013
Kenett On Information NYU-Poly 2013
Ā 
Artificial Intelligence in Data Curation
Artificial Intelligence in Data CurationArtificial Intelligence in Data Curation
Artificial Intelligence in Data Curation
Ā 
Data Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black TreesData Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black Trees
Ā 
J48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance DataJ48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance Data
Ā 
Credible workshop
Credible workshopCredible workshop
Credible workshop
Ā 
Data Structures and Algorithm - Week 3 - Stacks and Queues
Data Structures and Algorithm - Week 3 - Stacks and QueuesData Structures and Algorithm - Week 3 - Stacks and Queues
Data Structures and Algorithm - Week 3 - Stacks and Queues
Ā 
Open interoperability standards, tools and services at EMBL-EBI
Open interoperability standards, tools and services at EMBL-EBIOpen interoperability standards, tools and services at EMBL-EBI
Open interoperability standards, tools and services at EMBL-EBI
Ā 
Data Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL TreesData Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL Trees
Ā 
The Genopolis Microarray database
The Genopolis Microarray databaseThe Genopolis Microarray database
The Genopolis Microarray database
Ā 
USUGM 2014 - Dana Vanderwall (Bristol-Myers Squibb): Instant JChem
USUGM 2014 - Dana Vanderwall (Bristol-Myers Squibb): Instant JChem USUGM 2014 - Dana Vanderwall (Bristol-Myers Squibb): Instant JChem
USUGM 2014 - Dana Vanderwall (Bristol-Myers Squibb): Instant JChem
Ā 
IRJET- Disease Prediction System
IRJET- Disease Prediction SystemIRJET- Disease Prediction System
IRJET- Disease Prediction System
Ā 
Introduction to NTCIR 2016 MedNLPDoc
Introduction to NTCIR 2016 MedNLPDocIntroduction to NTCIR 2016 MedNLPDoc
Introduction to NTCIR 2016 MedNLPDoc
Ā 
Fairification experience clarifying the semantics of data matrices
Fairification experience clarifying the semantics of data matricesFairification experience clarifying the semantics of data matrices
Fairification experience clarifying the semantics of data matrices
Ā 
NPS_TDA_forPDF_JPrendki
NPS_TDA_forPDF_JPrendkiNPS_TDA_forPDF_JPrendki
NPS_TDA_forPDF_JPrendki
Ā 
IRJET- A Review of Data Cleaning and its Current Approaches
IRJET- A Review of Data Cleaning and its Current ApproachesIRJET- A Review of Data Cleaning and its Current Approaches
IRJET- A Review of Data Cleaning and its Current Approaches
Ā 
10 Algorithms in data mining
10 Algorithms in data mining10 Algorithms in data mining
10 Algorithms in data mining
Ā 
Data Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC SystemsData Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Data Patterns - A Native Open Source Data Profiling Tool for HPCC Systems
Ā 
Combining Explicit and Latent Web Semantics for Maintaining Knowledge Graphs
Combining Explicit and Latent Web Semantics for Maintaining Knowledge GraphsCombining Explicit and Latent Web Semantics for Maintaining Knowledge Graphs
Combining Explicit and Latent Web Semantics for Maintaining Knowledge Graphs
Ā 
Managing machine learning
Managing machine learningManaging machine learning
Managing machine learning
Ā 
Recsys2021_slides_sato
Recsys2021_slides_satoRecsys2021_slides_sato
Recsys2021_slides_sato
Ā 

Andere mochten auch

Constitutional law of corrections t crim372 first amendment
Constitutional law of corrections  t crim372 first amendmentConstitutional law of corrections  t crim372 first amendment
Constitutional law of corrections t crim372 first amendment
Acklin1921
Ā 
LegislaciĆ³n sobre los derechos de los animales en
LegislaciĆ³n sobre los derechos de los animales enLegislaciĆ³n sobre los derechos de los animales en
LegislaciĆ³n sobre los derechos de los animales en
26111996
Ā 
Unidad 4 quimica
Unidad 4 quimicaUnidad 4 quimica
Unidad 4 quimica
Abraham Rayon
Ā 
Building a greenhostel
Building a greenhostelBuilding a greenhostel
Building a greenhostel
GoMio.com
Ā 

Andere mochten auch (6)

Constitutional law of corrections t crim372 first amendment
Constitutional law of corrections  t crim372 first amendmentConstitutional law of corrections  t crim372 first amendment
Constitutional law of corrections t crim372 first amendment
Ā 
LegislaciĆ³n sobre los derechos de los animales en
LegislaciĆ³n sobre los derechos de los animales enLegislaciĆ³n sobre los derechos de los animales en
LegislaciĆ³n sobre los derechos de los animales en
Ā 
Competing with Giants - How to Win With Drupal vs. Proprietary Alternatives
Competing  with Giants - How to Win With Drupal vs. Proprietary AlternativesCompeting  with Giants - How to Win With Drupal vs. Proprietary Alternatives
Competing with Giants - How to Win With Drupal vs. Proprietary Alternatives
Ā 
Birds animals are our friends
Birds animals are our friendsBirds animals are our friends
Birds animals are our friends
Ā 
Unidad 4 quimica
Unidad 4 quimicaUnidad 4 quimica
Unidad 4 quimica
Ā 
Building a greenhostel
Building a greenhostelBuilding a greenhostel
Building a greenhostel
Ā 

Ƅhnlich wie grizzly - informal overview - pydata boston 2013

Revolutionizing Laboratory Instrument Data for the Pharmaceutical Industry:...
Revolutionizing Laboratory  Instrument Data for the  Pharmaceutical Industry:...Revolutionizing Laboratory  Instrument Data for the  Pharmaceutical Industry:...
Revolutionizing Laboratory Instrument Data for the Pharmaceutical Industry:...
OSTHUS
Ā 
A New Paradigm on Analytic-Driven Information and Automation V2.pdf
A New Paradigm on Analytic-Driven Information and Automation V2.pdfA New Paradigm on Analytic-Driven Information and Automation V2.pdf
A New Paradigm on Analytic-Driven Information and Automation V2.pdf
ArmyTrilidiaDevegaSK
Ā 
Making an impact with data science
Making an impact  with data scienceMaking an impact  with data science
Making an impact with data science
Jordan Engbers
Ā 

Ƅhnlich wie grizzly - informal overview - pydata boston 2013 (20)

Data Processing DOH Workshop.pptx
Data Processing DOH Workshop.pptxData Processing DOH Workshop.pptx
Data Processing DOH Workshop.pptx
Ā 
Revolutionizing Laboratory Instrument Data for the Pharmaceutical Industry:...
Revolutionizing Laboratory  Instrument Data for the  Pharmaceutical Industry:...Revolutionizing Laboratory  Instrument Data for the  Pharmaceutical Industry:...
Revolutionizing Laboratory Instrument Data for the Pharmaceutical Industry:...
Ā 
Metabolomic Data Analysis Workshop and Tutorials (2014)
Metabolomic Data Analysis Workshop and Tutorials (2014)Metabolomic Data Analysis Workshop and Tutorials (2014)
Metabolomic Data Analysis Workshop and Tutorials (2014)
Ā 
Data analytcis-first-steps
Data analytcis-first-stepsData analytcis-first-steps
Data analytcis-first-steps
Ā 
Multivarite and network tools for biological data analysis
Multivarite and network tools for biological data analysisMultivarite and network tools for biological data analysis
Multivarite and network tools for biological data analysis
Ā 
Introduction to Computational Statistics
Introduction to Computational StatisticsIntroduction to Computational Statistics
Introduction to Computational Statistics
Ā 
A New Paradigm on Analytic-Driven Information and Automation V2.pdf
A New Paradigm on Analytic-Driven Information and Automation V2.pdfA New Paradigm on Analytic-Driven Information and Automation V2.pdf
A New Paradigm on Analytic-Driven Information and Automation V2.pdf
Ā 
Neo4j for Healthcare & Life Sciences
Neo4j for Healthcare & Life SciencesNeo4j for Healthcare & Life Sciences
Neo4j for Healthcare & Life Sciences
Ā 
Practical Applications of Machine Learning in Cybersecurity
Practical Applications of Machine Learning in CybersecurityPractical Applications of Machine Learning in Cybersecurity
Practical Applications of Machine Learning in Cybersecurity
Ā 
Data analytics in computer networking
Data analytics in computer networkingData analytics in computer networking
Data analytics in computer networking
Ā 
Big Data Analytics: From SQL to Machine Learning and Graph Analysis
Big Data Analytics: From SQL to Machine Learning and Graph AnalysisBig Data Analytics: From SQL to Machine Learning and Graph Analysis
Big Data Analytics: From SQL to Machine Learning and Graph Analysis
Ā 
Data Science and Analysis.pptx
Data Science and Analysis.pptxData Science and Analysis.pptx
Data Science and Analysis.pptx
Ā 
Towards automated phenotypic cell profiling with high-content imaging
Towards automated phenotypic cell profiling with high-content imagingTowards automated phenotypic cell profiling with high-content imaging
Towards automated phenotypic cell profiling with high-content imaging
Ā 
The challenges of Analytical Data Management in R&D
The challenges of Analytical Data Management in R&DThe challenges of Analytical Data Management in R&D
The challenges of Analytical Data Management in R&D
Ā 
Data science training in hyderabad
Data science training in hyderabadData science training in hyderabad
Data science training in hyderabad
Ā 
Introduction of data science
Introduction of data scienceIntroduction of data science
Introduction of data science
Ā 
Agile development of data science projects | Part 1
Agile development of data science projects | Part 1 Agile development of data science projects | Part 1
Agile development of data science projects | Part 1
Ā 
Towards Automated AI-guided Drug Discovery Labs
Towards Automated AI-guided Drug Discovery LabsTowards Automated AI-guided Drug Discovery Labs
Towards Automated AI-guided Drug Discovery Labs
Ā 
Making an impact with data science
Making an impact  with data scienceMaking an impact  with data science
Making an impact with data science
Ā 
The Science of Data Science
The Science of Data Science The Science of Data Science
The Science of Data Science
Ā 

KĆ¼rzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Ā 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Ā 

KĆ¼rzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Ā 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Ā 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Ā 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Ā 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Ā 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Ā 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Ā 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Ā 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Ā 
šŸ¬ The future of MySQL is Postgres šŸ˜
šŸ¬  The future of MySQL is Postgres   šŸ˜šŸ¬  The future of MySQL is Postgres   šŸ˜
šŸ¬ The future of MySQL is Postgres šŸ˜
Ā 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Ā 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Ā 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Ā 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Ā 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Ā 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Ā 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Ā 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Ā 

grizzly - informal overview - pydata boston 2013

  • 1. grizzly statistical analysis with multidimensional dataļ¬‚ows in python Adrian Heilbut Boston University and Broad Institute http://www.empiricist.ca (graphs for reproducible interactive visualization and analysis) PyData Boston 2013
  • 2. 1. Motivation Biological discovery from complex, multidimensional data; common features of complex biological data and analyses 2. Problems and Goals Reproducible, efļ¬cient, elegant, collaborative,interactive analysis Data + analysis evolving over time 3. Toy Dataset A simple dataset with hierarchical and temporal structure 4. Strategies Separate concerns; Represent types and structure explicitly; Abstract away data management; Formalize 5. Inspirations OLAP and data cube models; Declarative visualization grammars; Scientiļ¬c workļ¬‚ow systems 6. Core Ideas Dataļ¬‚ows + Temporal Graphs + Multidimensional Types + Syntactic syrup 7. Toy Demos 8. Implementation 9. Biology application Mechanisms of drug side effects in Parkinsonā€™s Disease 10. Summary and Conclusions
  • 3. Motivation ā€¢ Common and unique features of scientiļ¬c data ā€¢ Examples of complex datasets and analyses in computational biology ā€¢ Data analysis desiderata Motivation Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application
  • 4. Biological data is increasingly complex; Many datasets and analyses share common structural features ā€¢ High-dimensional measurements ā€¢ Longitudinal / time-course measurements ā€¢ Hierarchical structure of dimensions ā€¢ Multiple modalities (expression, protein concentration, phosphorylation) ā€¢ Complex experimental designs ā€¢ Complex analysis designs ā€¢ Complex pre-processing pipelines ā€¢ Many parameter choices ā€¢ Many cell types ā€¢ Many treatments ā€¢ Many organisms ā€¢ Many patients ā€¢ Many replicates
  • 5. Ex 1. Cancer Proļ¬ling and Signatures Cancer Cell Line Encylopedia (CCLE) Broad / Novartis, Barretina 2012 1000 cell lines expressionfor 20,000genesmutationstatusdrugresponse
  • 6. P0 P07 P12 P18 P21 P56 proliferationproliferation differentiationdifferentiation migration & patterningmigration & patterning P0 P07 P15 P21 E0 E11 E15 E18 3 reps, 40k probes
  • 7. Saline Acute (9) Low Dose Levodopa Chronic (12) Saline Chronic (11) 6-OHDA Ascorbate Day 1 Expression + AIM CP73 Day 8 Expression + AIM High Dose Levodopa Acute (10) High Dose Levodopa Chronic (11) Saline Chronic (10) Low Levodopa Chronic (8) Saline Chronic (7) 6-OHDA Ascorbate CP101 Day 8 Expression + AIM High Levodopa Chronic (8) Saline Chronic (10) Change in Expression between treatment groups Expression vs. AIM (correlation) within treatment groups / cell types Statistics (per gene) Expression vs. AIM (correlation) within combined treatment groups ~ 23,000 x 200 matrix of stats for different contrasts between groups
  • 8. Unique characteristics of scientiļ¬c data ā€¢ Relatively short half-life of data and projects ā€¢ Uncertain and complex analysis methods ā€¢ Constantly changing data ā€¢ Lots of internal and external structure over dimensions ā€¢ Teams with diverse backgrounds and skills over multiple institutions and locations ā€¢ Communication of data is a primary goal ā€¢ High risk and high value outcomes project selection / experimental followup clinical decisions Distinctive characteristics, uses, and problems with scientiļ¬c data analysis motivates need for tailored abstractions and tools
  • 9. Desiderata for Data Analysis ā€¢ Correctness ā€¢ Thoroughness (scientiļ¬c hypothesis space + analysis space) ā€¢ Reproducibility ā€¢ Veriļ¬ability (analysis and underlying data, others and oneself) ā€¢ Clarity ā€¢ Provenance (of the data, and of the analysis) ā€¢ Interactivity (Exploration, Drill-down) ā€¢ Computational Efļ¬ciency ā€¢ Scientist Efļ¬ciency
  • 10. Vision Every ļ¬gure, every table, and every quantitative claim in a scientiļ¬c analysis or publication should be veriļ¬able and explorable it should link to an understandable, executable, modiļ¬able representation of the data analysis pipeline by which it was generated one should be able to trace back all the way to the primary experimental data it should be easy and fun to play with
  • 11. Problems and Goals Errors have serious consequences Practical problems in day-to-day analysis Unmet need for better tools Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application Conclusions
  • 12.
  • 13. Mistakes even happen in Cambridge... Reinhart / RogoffHerndon, Ash, Pollin OriginalCorrect
  • 14. itā€™s even worse than it appears... Kimball, 2013 ability to easily drill down to view and assess the underlying data is critical
  • 15. Elements of statistical analysis statistical algorithms output data Input data visualizations summary tables
  • 16. Version 2. output data Input dataInput dataInput dataInput dataInput dataInput dataInput dataInput dataInput data statistical algorithm output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data output data statistical algorithm statistical algorithm
  • 19. Toy Dataset Multidimensional proļ¬ling of fermentation metabolites of S. cerevisiae Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application
  • 20. Beer ratings BeerAdvocate.com & RateBeer.com, via Stanford SNAP & a very kind blogger Multidimensional: Appearance, Aroma, Palate, Taste, Overall Hierarchies: Location -> Brewery -> Beer Beer style -> Beer Temporal Toy Dataset Multidimensional proļ¬ling of fermentation metabolites of S. cerevisiae
  • 21. Strategies ā€¢ Separate concerns ā€¢ Abstract away data management problems ā€¢ Formalize ā€¢ Optimize representations (logical and physical) Intro Problem & Goals Toy Dataset Strategies Inspirations Core Ideas Implementation Demo Biological Application Conclusions
  • 22. Separation of Concerns ā€¢ Each of these components evolves over time ā€¢ Each may be modifed independently by diļ¬€erent people with diļ¬€erent goals statistical algorithms output data Input data visualizations summary tables
  • 23. Abstract and automate data management Deciding and remembering how to name columns and ļ¬les and track changes over time is not what Iā€™d like to spend time on Especially since Iā€™ll probably do it inconsistently with what I decided to do last week If the system is responsible for persisting data, caching and memoization can be done automatically.
  • 24. Logical and physical representations matter ā€¢ Choice of representation and notation has a major effect on ease and efļ¬ciency with which concepts can be manipulated, by either a person or a computer ā€¢ Given our goals for an analysis system, and engineering instinct to separate independent concerns, what are optimal representations for ā€¢ data? ā€¢ analysis programs? ā€¢ visualizations and summary tables?
  • 26. Inspirations (and their deļ¬ciencies..) 1. OLAP (On-Line Analytical Processing) and MDX (Multidimensional Expressions) 2. Tableau / Polaris 3. Scientiļ¬c workļ¬‚ow systems VisTrails, KNIME Galaxy, Genepattern
  • 28. 2. Declarative Visualization Grammars (Polaris/Tableau; Stolte 2003) ā€¢ key idea: declarative speciļ¬cation of visualizations is possible and works well ā€¢ recent focus has been on busines analytics, rather than statistical graphics; ā€¢ assumes a static, structured database (ie. OLAP star schema) Stolte 2000
  • 29. 3. Scientiļ¬c Workļ¬‚ow Systems VisTrails
  • 30. Hypothesis Careful design and selection of representations for data, programs, and visualizations will make it possible to satistfy our data analysis objectives: ā€¢ multidimensional cubes with static, semantic types for conceptual representation of data ā€¢ directed acyclic graphs of functions with static, multidimensional input and output type signatures for our statistical programs ā€¢ declarative queries to generate summary tables ā€¢ declarative visualization grammar to generate graphics (this is not how most researchers represent their analyses today) Correctness Thoroughness Reproducibility Veriļ¬ability Clarity Provenance Interactivity Computational Efļ¬ciency Scientist Efļ¬ciency
  • 31. Multidimensional Cubes and OLAP Semantic Types Dataļ¬‚ow Programming Core Ideas
  • 32. Data consists of facts about the world. 1 5.5 3 3 4 5 2 6 2 3 2 2 3 8 5 5 4 4.5 ceci nā€™est pas data
  • 33. Data consists of facts about the world. 1 2 3 5.5 3 3 4 5 6 2 3 2 2 8 5 5 4 4.5 ABV Smell Color Taste OverallBeerID
  • 34. Facts lie in speciļ¬c domains deļ¬ned by the structure of the real world or experimental design 1 2 3 5.5 3 3 4 5 6 2 3 2 2 8 5 5 4 4.5 ABV ļ¬‚oat (%EtOh) Smell ordinal (1-5) 5 is best Color ordinal (1-5) 5 is best Taste ordinal (1-5) 5 is best Overall ordinal (1-5) 5 is best BeerID Integer (BeerAdvocate BeerID)
  • 35. There are a number of possible representations; logically but not practically equivalent 1 2 3 5.5 3 3 4 5 6 2 3 2 2 8 5 5 4 4.5 ABV ļ¬‚oat (%EtOh) Smell ordinal (1-5) 5 is best Color ordinal (1-5) 5 is best Taste ordinal (1-5) 5 is best Overall ordinal (1-5) 5 is best BeerID Integer (BeerAdvocate) BeerID BeerID Measure Value 1 ABV 5.5 1 Smell 3 1 Color 3 1 Taste 4 1 Overall 5 2 ABV 6 2 Smell 2 2 Color 3 2 Taste 2 2 Overall 2 3 ABV 8 3 Smell 5 3 Color 5 3 Taste 4 3 Overall 4.5 cf. pandas reshape, plyr melt/cast ā‰ˆ
  • 36. Data Representations ā€¢ Scientiļ¬c / statistical data is usally in matrix format, and it must be for efļ¬cient storage and computation ā€¢ Relational model is good for precisely encoding logical structure of data, but ā€¢ moving between relations and matrices is cumbersome ā€¢ deļ¬ning a relational schema for all intermediate data would be a lot of work, especially as with change over time ā€¢ on its own, the relational model does explicitly represent semantics and units
  • 37. Conceptual Model: OLAP Data Cubes Cartesian product of a set of dimensions (ļ¬nite discrete sets) deļ¬nes an N-dimensional grid A multidimensional dataset is a function mapping locations in that grid to typed values called measures (identities of the measures can also be considered as just a special kind of dimension) Beer ID UserID Time Gene Brain Region Stage of Development3 3 2 7.8 3 2 3 2 2.3 2.1 3 2 3 2.3 7.4 12 3 2 3 3.14 15 9 3 2 3 2 2 6.5 2 2 measure: log2 gene expression measure: overall beer rating
  • 38. Conceptual Model: Data Cubes as functions mapping dimensions to measures def BeerRatingsByUser(UserID, BeerID): return (Taste, Smell, Color, Texture, Overall) def BeerRatingsByBeer(BeerID): return (mean Taste, mean Smell, mean Color, mean Texture, mean Overall) def ExpressionBySample(Gene, Region, SampleID): return (log2 expression) def ExpressionByRegionTime(Gene, Region, Timepoint): return (median expression, mean expression, std deviation, median abs deviation, # replicates)
  • 39. Hierarchies Dimensions are related to each other in structures that reļ¬‚ect: ā€¢ the nature of the world ā€¢ experimental methods and designs ā€¢ analysis processes and decisions These hierarchical relationships are critical to understanding and performing analyses, and need to be represented explicitly.
  • 40. Multidimensional Semantic Types 1970s / 80s: Semantic Database formalisms Specify different kinds of relationships and interactions between objects (eg. containment, is-a, relations / cross-products) Overshadowed by ER model and later, UML.. 1990s: OLAP
  • 41. Dataļ¬‚ow Lots of domains model computation as ā€˜declarativeā€™ dataļ¬‚ows circuit design audio / video processing
  • 42. Grizzly Computation Model Directed Acyclic Graph of processing nodes Inputs and outputs of every node are typed cubes Function nodes add type information to describe their output dimensions ā€˜Applyā€™ nodes propagate any types of their input dimensions that they arenā€™t modiļ¬ed to the outputs Computation is declarative / intensional, not imperative; nodes automatically process whatever is on their inputs, like an electrical circuit (ReviewID, BeerID) --> (Appearance, Aroma, Palate, Taste, Overall) CalcMedian Ratings (BeerID) --> (Appearance, Aroma, Palate, Taste, Overall) (ReviewID, BeerID, SourceID) --> (Appearance, Aroma, Palate, Taste, Overall) (SourceID, BeerID) --> (MedianAppearance, MedianAroma, MedianPalate, MedianTaste, MedianOverall) Apply
  • 43. Advantages of DAG representation ā€¢ Static type speciļ¬cations allow precise and clear modeling / design of an analysis pipeline before having to write all the code needed to implement it ā€¢ Model can be turned into an actual working program, instead of just being a schematic diagram ā€¢ Provenance tracking without extra instrumentation ā€¢ Memoization of intermediate results is easy because data dependencies are already explicit ā€¢ Easier to understand, reason about, and explain to others ā€¢ Easier to track modiļ¬cation history as graph edits
  • 44. Syntactic Syrup: CubeApply Takes cross-product of a set of input cubes / vectors and applies function to all results (BeerID) --> (Appearance, Aroma, Palate, Taste, Overall) BeerRank (BeerID) --> (RankScore) (BeerID) --> (Appearance, Aroma, Palate, Taste, Overall) (BeerID, RankModelID) --> (RankScore) (AppWeight, AromaWt, PalWt, TasteWt, OverallWt) (RankModelD) --> (AppWt, AromaWt, PalWt, TasteWt, OverallWt)
  • 45. Slicing, Dicing Since semantic type data is always propagated, in principle we can deļ¬ne the schema for any intermediate data (including hierarchy structure) and make use of existing OLAP tools to run declarative queries
  • 46. Implementation ā€¢ Type system ā€¢ DAGs ā€¢ Execution ā€¢ Data Management ā€¢ Visualizations ā€¢ ...queries?
  • 47. Requirements for a practical system ā€¢ Programmable and extensible, without requiring discontinuous changes to existing habits ā€¢ OLAP systems not general enough; energy barrier to setting up a ā€˜data warehouseā€™ for a particular scientiļ¬c analysis is too high; arbitrary, complex statistics not supported ā€¢ System must be deployable over the web, so analyses and results can be easily shared with geographically dispersed collaborators and the scientiļ¬c community ā€¢ Free and open source
  • 48. Current Support for Hierarchies in Pandas ā€¢ Hierarchical dataframes only support ā€˜uniformā€™ hierarchies ā€¢ lots of real analysis requires comparisons across many different types ā€¢ Metadata is unstructured ā€¢ canā€™t compute effectively on column names ā€¢ Manual management ā€¢ consistency of column naming and interpretation depends entirely on programmer discipline
  • 49. Simple Semantic Types over Pandas ['[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]], ["ct", "cp73"], ["mc", "bh"], ["st", "pval"], ["tt", "welch ttest"]]', '[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]], ["ct", "cp73"], ["mc", "nominal"], ["st", "pval"], ["tt", "student ttest"]]', '[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]], ["ct", "cp73"], ["mc", "bonf"], ["st", "pval"], ["tt", "student ttest"]]', '[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]], ["ct", "cp73"], ["mc", "bh"], ["st", "pval"], ["tt", "student ttest"]]', '[["cmp", ["6-OHDA, chronicSaline", "Ascorbate, chronicSaline"]], ["ct", "cp73"], ["st", "pval"], ["tt", "levene"]] ct CP73 CP101 tt student ttest welch ttest st pval t-stat bonf bh nom mc X ct tt mccmp st
  • 50. Temporal Graph Database ā€¢ Canonical representation for types, ā€˜programsā€™, and pointers to data are all as typed property graphs (DAGs) that can hold JSON payloads ā€¢ All edit history to the graph is recorded, so user can rewind / replay and branch
  • 51. Generic Visualization Components to compose visualizations & reports
  • 52. Architecture Overview GZDB Graph Editor Grizzly Webapp SQLAlchemy Postgres IPython Pandas HTML Viz Widgets GZData GZFlow CherryPy D3, Slickgrid, FlotjsPlumb Filesystem
  • 54. Bio Example 1: Striatal Gene Expression w. L-DOPA Summary tables Drilldown and provenance from summary tables to primary data
  • 55. Drilldown from summary to statistical tables
  • 56. Drilldown from statistical tables to plots of primary data
  • 57. Bio Example 2: Complex, interactive visualizations: BOMBASTIC Subspace clustering of time-series data A. Deļ¬ne blocks and an ordering B. Cluster each block independently C. Represent resulting clusters in a tree and explore/ļ¬lter interactively Each (predeļ¬ned) subspace has unique information; we want to understand patterns both within and between blocks
  • 58.
  • 59. Summary Increasing complexity of biological data presents critical requirements for better systems for collaborative analysis of high- dimensional, multi-factor, dynamic data A dataļ¬‚ow computation model with semantic, multidimensional types offers signiļ¬cant advantages for meeting these requirements Grizzly deļ¬nes a simple, formal model for multidimensional data and DAGs of operations on that data, adapting and combining ideas from OLAP, declarative visualization, and dataļ¬‚ow programming. Proof-of-concept implementation in python establishes feasibility Applications to analysis of real biological experiments (PD, Neuro, Cancer) will evaluate practical utility and beneļ¬ts Correctness Thoroughness Reproducibility Veriļ¬ability Clarity Provenance Interactivity Computational Efļ¬ciency Scientist Efļ¬ciency
  • 60. Acknowledgements: Software ā€¢ IPython ā€¢ NumPy ā€¢ Pandas ā€¢ Statsmodels ā€¢ Patsy ā€¢ CherryPy ā€¢ SQLAlchemy ā€¢ postgres ā€¢ NetworkX ā€¢ igraph ā€¢ backbone ā€¢ underscore ā€¢ jsPlumb ā€¢ ļ¬‚ot ā€¢ D3.js