Categories for Planning and Scheduling

Total Page:16

File Type:pdf, Size:1020Kb

Categories for Planning and Scheduling Categories for Planning and Scheduling Reactor Hold/Hold/ Hold/ Hold/ Hold/ Hold/ Blender Equipment Centrifuge Tote Hold Hold Hold Hold Hold Hold h 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 h 10 20 30 40 50 60 70 80 Spencer Breiner, Peter Denno, and Eswaran Subrahmanian 1. Introduction easier to digest. The presentation is not self-contained— Applied category theory is an ongoing effort to use the ab- we won’t review standard definitions of functors and nat- stract machinery of category theory (CT) to organize math- ural transformations—but we have tried to minimize our ematical knowledge across a wide range of science and reliance on prior knowledge. We recommend [Spi14] for engineering [BPS20]. Mostly this requires a change of fo- a more careful development. cus; the same tools designed to handle cohomology and Our primary goal is to demonstrate the capabilities of quantum groups fit surprisingly well with more down-to- category theory as a formal modeling language. It provides earth subjects like process planning and error diagnosis an extremely precise and expressive set of constructions [BJS19, BMRPS20]. both internally (within the model) and externally (in the This paper gives an introduction and case study in the meta-theory). The general principles are relevant for both use of CT for data modeling and transformation. The formal modeling languages like OWL, SysML or Modelica subject of the case study is a standard problem in oper- as well as generic modeling contexts like programming, ations research called open-shop scheduling. We make no database design and user interface. As we will show, CT claim to the originality of our methods, which ultimately supports a unique bottom-up methodology, with many derive from the well-developed field of categorical logic small models linked together in a web of functorial rela- [AR94]. Nonetheless, we hope that grounding this ma- tions. The rest of the paper is organized to highlight differ- chinery in a more pedestrian context will make the ideas ent features of the approach. Section 2 introduces functorial semantics, the principle Spencer Breiner is a mathematician in the Information Technology Laboratory that nearly any model (in an informal sense) can be repre- at the US National Institute of Standards and Technology. His email address sented as a structure-preserving mapping is [email protected]. Peter O. Denno is a computer scientist in the Engineering Laboratory at the US 퐦퐨퐝퐞퐥 ∶ 퐒퐲퐧퐭퐚퐱 ⟶ 퐒퐞퐦퐚퐧퐭퐢퐜퐬. National Institute of Standards and Technology. His email address is peter [email protected]. Syntax specifies the parts of the model and their relation- Eswaran Subrahmanian is a research professor in the Engineering Research Ac- ships; the semantics determines how these relationships celerator and the Department of Engineering and Public Policy at Carnegie interact. This approach is quite general, ranging from clas- Mellon University. His email address is [email protected]. sical logic to quantum computation, and plays an impor- Communicated by Notices Associate Editor Emilie Purvine. tant role in the theory of programming languages. We con- For permission to reprint this article, please contact: sider a more pedestrian example, constructing a simple [email protected]. category 풫 to represent open-shop scheduling, a standard DOI: https://doi.org/10.1090/noti2186 problem in operations research. 1666 NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY VOLUME 67, NUMBER 11 Jobs 푗1 푗2 푗3 푗4 1 2 3 4 5 6 7 8 9 10 횜횊횠 2 hr 2 hr 2 hr 2 hr 횜횊횠 푗1 푗3 푗2 푗4 획횛횒횕횕 2 hr 3 hr 0 3 hr 획횛횒횕횕 푗2 푗4 푗1 횕횊횝횑횎 2 hr 3 hr 3 hr 0 횕횊횝횑횎 푗3 푗2 푗1 Machines 횖횒횕횕 2 hr 2 hr 2 hr 3 hr 횖횒횕횕 푗4 푗1 푗3 푗2 Figure 1. An open-shop scheduling problem and solution involving four jobs and four machines. The most novel feature of categorical modeling is its In an open-shop problem, tasks can be ordered however extensive use of functorial (composition-preserving) rela- we like, subject to two no-overlap constraints. Thus a valid tionships between data models. We illustrate this in Sec- schedule is defined by an assignment of start and stop times tion 3 by defining an open-shop solution category 풮 along 푠푗푚 ≤ 푡푗푚, with 휏푗푚 = 푡푗푚 − 푠푗푚 and with a functor 퐹 ∶ 풫 → 풮. Together with functorial seman- ′ tics, 퐹 induces canonical change-of-base transformations (a) ∀푗 ≠ 푗 ∀푚 (푡푗푚 ≤ 푠푗′푚) ∨ (푡푗′푚 ≤ 푠푗푚), (1) (Δ퐹 , Σ퐹 ) that can be used to move data from one context ′ ∀푗 ∀푚 ≠ 푚 푡 ≤ 푠 ′ ∨ 푡 ′ ≤ 푠 . to another. (b) ( 푗푚 푗푚 ) ( 푗푚 푗푚) Starting from an extremely limited vocabulary (objects, The first condition says that a machine cannot work ontwo arrows, composition), CT achieves remarkable expressivity jobs at once; the second that each job is processed on one through an extensive collection of design patterns used to machine at a time. When presented as a scheduling chart model commonly recurring phenomena. In Section 4 we (Figure 1) the no-overlap conditions are easy to verify by introduce just one of these—a design pattern for indexed looking at rows and block labels, respectively. families called the slice construction—and show how it can be used to generalize the traditional open-shop problem 2.1. Schemas & instances. These definitions can be sum- in two different ways. marized as a pair of structured categories, called schemas, 퐹 ∶ 풫 → 풮 In Section 5 we extract a scheduling problem on-the-fly together with a (structure-preserving) functor . 풫 from independent but overlapping data sets, demonstrat- In this section we discuss the problem schema , which is ing a very general approach to data integration. We rely easy to specify, but requires some unpacking: on CT’s self-referential meta-theory: schemas and functors 휏 / 풫 ≔ ⟨ 홹 × 홼 횁 ⟩. (2) form a category, so categorical constructions can be used to specify modeling operations. Section 3 will cover the solution schema 풮 and the rela- Section 6 introduces a discussion of optimization and tionship 퐹. objective functions, which are ignored up until that point. Like any category, 풫 contains objects and arrows. Some These raise some subtle points regarding the definability of these are shown explicitly in the declaration, while oth- of aggregates like 푛-ary sums and maxima. Here we give ers can be inferred from context. Here there are four ob- a small novel contribution, formally defining an aggrega- jects (횁, 홹, 홼, 홹 × 홼) and seven arrows (휏, two product pro- tion strategy based on labeled bundles. jections, four identities). Finally, Section 7 puts these pieces together to construct We can think of the objects and arrows in 풫 as variables a heuristic solution for 풫. We’ll see that an algorithmic so- ranging over sets and functions. An instance of a schema lution to the problem (almost!) defines a second functor is an assignment of concrete sets and functions to these 퐴∶풮 →풫, mapping counter to the problem formulation 퐹. variables; the set of instances on 풫 is denoted 풫ˆ. For ex- 2. Open Shop Problems ample, the specific open-shop problem shown in Figure 1 corresponds to an instance 푃 ∈ 풫ˆ with In a typical scheduling problem the goal is to arrange the processing of 홹 jobs across 홼 machines, given that job 푗 must 푃(홹) ={푗1, 푗2, 푗3, 푗4}, be processed on machine 푚 for time (duration) 휏 ≥ 0. 푗푚 푃(홼) ={횜횊횠, 획횛횒횕횕, 횕횊횝횑횎, 횖횒횕횕}. This is usually represented as a 홹×홼 matrix of non-negative numbers, as in Figure 1. When 휏 = 0, this indicates “no 푗푚 We refer to {푗1, 푗2, 푗3, 푗4} as the interpretation of 홹 in 푃. processing,” and we refer to a pair 푗푚 with 휏푗푚 > 0 as a Similarly, 푃(휏) is interpreted by the 4×4 matrix shown in task. There are many variants, corresponding to different Figure 1. In categorical terms, all this data can be encoded underlying models of the factory floor. In this section we as a functor 푃 ∶ 풫 → 퐒퐞퐭, our first example of functorial introduce the simplest, open-shop scheduling, and use it to semantics. Moreover, as we will see in the rest of the section, motivate the main ideas of the categorical data model. 푃 is structure-preserving in two different ways. DECEMBER 2020 NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY 1667 2.2. Types. Some schema elements, which we call types, covered here can be formalized in terms of limit/colimit do not act like variables. In the open-shop problem, dura- sketches [AR94].1 tion is always a positive number, so 횁 should behave like Generally speaking, we will assume that any construc- a constant: 푃(횁) ≡ ℝ+. To formalize this we introduce a tions used in a schema are preserved, as they specify the single subcategory 퐓퐲퐩퐞 shared by all schemas, and with intended interpretation. In an instance, a schema’s con- the same interpretation in all instances. This represents structions can be explicitly computed and checked in 퐒퐞퐭. a “standard library” of common mathematical structures. For a functor into another schema, preservation of struc- In practice, 퐓퐲퐩퐞 may refer to a fragment of the underly- ture encodes a family of proofs demonstrating that the ax- ing programming language (e.g., Java in [SSVW17]), and ioms in the domain (e.g., monicity) are satisfied by their we refer to its arrows as computations. interpretations in the target. The latter will be important Here we were careful to distinguish the type 횁 from its in Sections 4 and 7.
Recommended publications
  • The ACT Pipeline from Abstraction to Application
    Addressing hypercomplexity: The ACT pipeline from abstraction to application David I. Spivak (Joint with Brendan Fong, Paolo Perrone, Evan Patterson) Department of Mathematics Massachusetts Institute of Technology 0 / 25 Introduction Outline 1 Introduction Why? How? What? Plan of the talk 2 Some new applications 3 Catlab.jl 4 Conclusion 0 / 25 Introduction Why? What's wrong? As problem complexity increases, good organization becomes crucial. (Courtesy of Spencer Breiner, NIST) 1 / 25 Introduction Why? The problem is hypercomplexity The world is becoming more complex. We need to deal with more and more diverse sorts of interaction. Rather than closed dynamical systems, everything is open. The state of one system affects those of systems in its environment. Examples are everywhere. Designing anything requires input from more diverse stakeholders. Software is developed by larger teams, touching a common codebase. Scientists need to use experimental data obtained by their peers. (But the data structure and assumptions don't simply line up.) We need to handle this new complexity; traditional methods are faltering. 2 / 25 Introduction How? How might we deal with hypercomplexity? Organize the problem spaces effectively, as objects in their own right. Find commonalities in the various problems we work on. Consider the ways we build complex problems out of simple ones. Think of problem spaces and solutions as mathematical entities. With that in hand, how do you solve a hypercomplex problem? Migrating subproblems to groups who can solve them. Take the returned solutions and fit them together. Ensure in advance that these solutions will compose. Do this according the mathematical problem-space structure.
    [Show full text]
  • Diagrammatics in Categorification and Compositionality
    Diagrammatics in Categorification and Compositionality by Dmitry Vagner Department of Mathematics Duke University Date: Approved: Ezra Miller, Supervisor Lenhard Ng Sayan Mukherjee Paul Bendich Dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Mathematics in the Graduate School of Duke University 2019 ABSTRACT Diagrammatics in Categorification and Compositionality by Dmitry Vagner Department of Mathematics Duke University Date: Approved: Ezra Miller, Supervisor Lenhard Ng Sayan Mukherjee Paul Bendich An abstract of a dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in the Department of Mathematics in the Graduate School of Duke University 2019 Copyright c 2019 by Dmitry Vagner All rights reserved Abstract In the present work, I explore the theme of diagrammatics and their capacity to shed insight on two trends|categorification and compositionality|in and around contemporary category theory. The work begins with an introduction of these meta- phenomena in the context of elementary sets and maps. Towards generalizing their study to more complicated domains, we provide a self-contained treatment|from a pedagogically novel perspective that introduces almost all concepts via diagrammatic language|of the categorical machinery with which we may express the broader no- tions found in the sequel. The work then branches into two seemingly unrelated disciplines: dynamical systems and knot theory. In particular, the former research defines what it means to compose dynamical systems in a manner analogous to how one composes simple maps. The latter work concerns the categorification of the slN link invariant. In particular, we use a virtual filtration to give a more diagrammatic reconstruction of Khovanov-Rozansky homology via a smooth TQFT.
    [Show full text]
  • Category Theory Cheat Sheet
    Musa Al-hassy https://github.com/alhassy/CatsCheatSheet July 5, 2019 Even when morphisms are functions, the objects need not be sets: Sometimes the objects . are operations —with an appropriate definition of typing for the functions. The categories Reference Sheet for Elementary Category Theory of F -algebras are an example of this. “Gluing” Morphisms Together Categories Traditional function application is replaced by the more generic concept of functional A category C consists of a collection of “objects” Obj C, a collection of “(homo)morphisms” composition suggested by morphism-arrow chaining: HomC(a; b) for any a; b : Obj C —also denoted “a !C b”—, an operation Id associating Whenever we have two morphisms such that the target type of one of them, say g : B A a morphism Ida : Hom(a; a) to each object a, and a dependently-typed “composition” is the same as the source type of the other, say f : C B then “f after g”, their composite operation _ ◦ _ : 8fABC : Objg ! Hom(B; C) ! Hom(A; B) ! Hom(A; C) that is morphism, f ◦ g : C A can be defined. It “glues” f and g together, “sequentially”: required to be associative with Id as identity. It is convenient to define a pair of operations src; tgt from morphisms to objects as follows: f g f◦g C − B − A ) C − A composition-Type f : X !C Y ≡ src f = X ^ tgt f = Y src; tgt-Definition Composition is the basis for gluing morphisms together to build more complex morphisms. Instead of HomC we can instead assume primitive a ternary relation _ : _ !C _ and However, not every two morphisms can be glued together by composition.
    [Show full text]
  • SHEAVES, TOPOSES, LANGUAGES Acceleration Based on A
    Chapter 7 Logic of behavior: Sheaves, toposes, and internal languages 7.1 How can we prove our machine is safe? Imagine you are trying to design a system of interacting components. You wouldn’t be doing this if you didn’t have a goal in mind: you want the system to do something, to behave in a certain way. In other words, you want to restrict its possibilities to a smaller set: you want the car to remain on the road, you want the temperature to remain in a particular range, you want the bridge to be safe for trucks to pass. Out of all the possibilities, your system should only permit some. Since your system is made of components that interact in specified ways, the possible behavior of the whole—in any environment—is determined by the possible behaviors of each of its components in their local environments, together with the precise way in which they interact.1 In this chapter, we will discuss a logic wherein one can describe general types of behavior that occur over time, and prove properties of a larger-scale system from the properties and interaction patterns of its components. For example, suppose we want an autonomous vehicle to maintain a distance of some safe R from other objects. To do so, several components must interact: a 2 sensor that approximates the real distance by an internal variable S0, a controller that uses S0 to decide what action A to take, and a motor that moves the vehicle with an 1 The well-known concept of emergence is not about possibilities, it is about prediction.
    [Show full text]
  • UNIVERSITY of CALIFORNIA RIVERSIDE the Grothendieck
    UNIVERSITY OF CALIFORNIA RIVERSIDE The Grothendieck Construction in Categorical Network Theory A Dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Mathematics by Joseph Patrick Moeller December 2020 Dissertation Committee: Dr. John C. Baez, Chairperson Dr. Wee Liang Gan Dr. Carl Mautner Copyright by Joseph Patrick Moeller 2020 The Dissertation of Joseph Patrick Moeller is approved: Committee Chairperson University of California, Riverside Acknowledgments First of all, I owe all of my achievements to my wife, Paola. I couldn't have gotten here without my parents: Daniel, Andrea, Tonie, Maria, and Luis, or my siblings: Danielle, Anthony, Samantha, David, and Luis. I would like to thank my advisor, John Baez, for his support, dedication, and his unique and brilliant style of advising. I could not have become the researcher I am under another's instruction. I would also like to thank Christina Vasilakopoulou, whose kindness, energy, and expertise cultivated a deeper appreciation of category theory in me. My expe- rience was also greatly enriched by my academic siblings: Daniel Cicala, Kenny Courser, Brandon Coya, Jason Erbele, Jade Master, Franciscus Rebro, and Christian Williams, and by my cohort: Justin Davis, Ethan Kowalenko, Derek Lowenberg, Michel Manrique, and Michael Pierce. I would like to thank the UCR math department. Professors from whom I learned a ton of algebra, topology, and category theory include Julie Bergner, Vyjayanthi Chari, Wee-Liang Gan, Jos´eGonzalez, Jacob Greenstein, Carl Mautner, Reinhard Schultz, and Steffano Vidussi. Special thanks goes to the department chair Yat-Sun Poon, as well as Margarita Roman, Randy Morgan, and James Marberry, and many others who keep the whole thing together.
    [Show full text]
  • Mathematics and the Brain: a Category Theoretical Approach to Go Beyond the Neural Correlates of Consciousness
    entropy Review Mathematics and the Brain: A Category Theoretical Approach to Go Beyond the Neural Correlates of Consciousness 1,2,3, , 4,5,6,7, 8, Georg Northoff * y, Naotsugu Tsuchiya y and Hayato Saigo y 1 Mental Health Centre, Zhejiang University School of Medicine, Hangzhou 310058, China 2 Institute of Mental Health Research, University of Ottawa, Ottawa, ON K1Z 7K4 Canada 3 Centre for Cognition and Brain Disorders, Hangzhou Normal University, Hangzhou 310036, China 4 School of Psychological Sciences, Faculty of Medicine, Nursing and Health Sciences, Monash University, Melbourne, Victoria 3800, Australia; [email protected] 5 Turner Institute for Brain and Mental Health, Monash University, Melbourne, Victoria 3800, Australia 6 Advanced Telecommunication Research, Soraku-gun, Kyoto 619-0288, Japan 7 Center for Information and Neural Networks (CiNet), National Institute of Information and Communications Technology (NICT), Suita, Osaka 565-0871, Japan 8 Nagahama Institute of Bio-Science and Technology, Nagahama 526-0829, Japan; [email protected] * Correspondence: georg.northoff@theroyal.ca All authors contributed equally to the paper as it was a conjoint and equally distributed work between all y three authors. Received: 18 July 2019; Accepted: 9 October 2019; Published: 17 December 2019 Abstract: Consciousness is a central issue in neuroscience, however, we still lack a formal framework that can address the nature of the relationship between consciousness and its physical substrates. In this review, we provide a novel mathematical framework of category theory (CT), in which we can define and study the sameness between different domains of phenomena such as consciousness and its neural substrates. CT was designed and developed to deal with the relationships between various domains of phenomena.
    [Show full text]
  • Categorification of the Müller-Wichards System Performance Estimation Model: Model Symmetries, Invariants, and Closed Forms
    Article Categorification of the Müller-Wichards System Performance Estimation Model: Model Symmetries, Invariants, and Closed Forms Allen D. Parks 1,* and David J. Marchette 2 1 Electromagnetic and Sensor Systems Department, Naval Surface Warfare Center Dahlgren Division, Dahlgren, VA 22448, USA 2 Strategic and Computing Systems Department, Naval Surface Warfare Center Dahlgren Division, Dahlgren, VA 22448, USA; [email protected] * Correspondence: [email protected] Received: 25 October 2018; Accepted: 11 December 2018; Published: 24 January 2019 Abstract: The Müller-Wichards model (MW) is an algebraic method that quantitatively estimates the performance of sequential and/or parallel computer applications. Because of category theory’s expressive power and mathematical precision, a category theoretic reformulation of MW, i.e., CMW, is presented in this paper. The CMW is effectively numerically equivalent to MW and can be used to estimate the performance of any system that can be represented as numerical sequences of arithmetic, data movement, and delay processes. The CMW fundamental symmetry group is introduced and CMW’s category theoretic formalism is used to facilitate the identification of associated model invariants. The formalism also yields a natural approach to dividing systems into subsystems in a manner that preserves performance. Closed form models are developed and studied statistically, and special case closed form models are used to abstractly quantify the effect of parallelization upon processing time vs. loading, as well as to establish a system performance stationary action principle. Keywords: system performance modelling; categorification; performance functor; symmetries; invariants; effect of parallelization; system performance stationary action principle 1. Introduction In the late 1980s, D.
    [Show full text]
  • Seven Sketches in Compositionality an Invitation to Applied Category Theory
    Seven Sketches in Compositionality An Invitation to Applied Category Theory IAP 2019 – 18.S097 Summary: Category theory is a relatively new branch of mathematics that has ​ transformed much of pure math research. The technical advance is that category theory provides a framework in which to organize formal systems and translate between them, allowing one to transfer knowledge from one field to another. But the same organizational framework also has many compelling examples outside of pure math. In this course, we will give seven sketches about real-world applications of category theory. We’ll teach from our recent book on the subject, which is available online (https://arxiv.org/abs/1803.05316). Dates: January 14 – February 1, 2019 Time: 2:00 – 3:00 pm, MTWRF Location: Room 2-142 ​ Instructors: David Spivak and Brendan Fong Credit/audit: For credit (3 units), sign up for 18.S097. You are also invited to audit. URL: http://brendanfong.com/7sketches.html Seven Sketches in Compositionality An Invitation to Applied Category Theory IAP 2019 – 18.S097 Applications Category theoretic notions Cascade effects Posets and adjunctions Resource theory Monoidal posets and categorification Data transformation Categories, functors, and universal constructions Collaborative design Enriched categories and profunctors Signal flow graphs Props and graphical proof systems Electrical circuits Wiring diagrams, operads, and functorial semantics A logic of behavior Sheaves, toposes, and internal languages Dates: January 14 – February 1, 2019 Time: 2:00 – 3:00 pm, MTWRF Location: Room 2-142 ​ Instructors: David Spivak and Brendan Fong Credit/audit: For credit (3 units), sign up for 18.S097. You are also invited to audit.
    [Show full text]
  • Constructing Symmetric Monoidal Bicategories Functorially
    Constructing symmetric monoidal bicategories. functorially Constructing symmetric monoidal bicategories functorially Michael Shulman Linde Wester Hansen AMS Sectional Meeting UC Riverside Applied Category Theory Special Session November 9, 2019 Constructing symmetric monoidal bicategories. functorially Outline 1 Constructing symmetric monoidal bicategories. 2 . functorially Constructing symmetric monoidal bicategories. functorially Symmetric monoidal bicategories Symmetric monoidal bicategories are everywhere! 1 Rings and bimodules 2 Sets and spans 3 Sets and relations 4 Categories and profunctors 5 Manifolds and cobordisms 6 Topological spaces and parametrized spectra 7 Sets and (decorated/structured) cospans 8 Sets and open Markov processes 9 Vector spaces and linear relations Constructing symmetric monoidal bicategories. functorially What is a symmetric monoidal bicategory? A symmetric monoidal bicategory is a bicategory B with 1 A functor ⊗: B × B ! B 2 A pseudonatural equivalence (A ⊗ B) ⊗ C ' A ⊗ (B ⊗ C) 3 An invertible modification ((AB)C)D (A(BC))D A((BC)D) π + (AB)(CD) A(B(CD)) 4 = 5 more data and axioms for units, braiding, syllepsis. Constructing symmetric monoidal bicategories. functorially Surely it can't be that bad In all the examples I listed before, the monoidal structures 1 tensor product of rings 2 cartesian product of sets 3 cartesian product of spaces 4 disjoint union of sets 5 ... are actually associative up to isomorphism, with strictly commuting pentagons, etc. But a bicategory doesn't know how to talk about isomorphisms, only equivalences! We need to add extra data: ring homomorphisms, functions, linear maps, etc. Constructing symmetric monoidal bicategories. functorially Double categories A double category is an internal category in Cat. It has: 1 objects A; B; C;::: 2 loose morphisms A −7−! B that compose weakly 3 tight morphisms A ! B that compose strictly 4 2-cells shaped like squares: A j / B : + C j / D No one can agree on which morphisms to draw horizontally or vertically.
    [Show full text]
  • Applied Category Theory in Data Science Evan Patterson Statistics Department, Stanford University
    Applied category theory in data science Evan Patterson Statistics Department, Stanford University Ioana Baldini, Aleksandra Mojsilovic, Kush R. Varshney IBM Research AI Applied Category Theory: Bridging Theory & Practice March 15-16, 2018, NIST, Gaithersburg, MD Problem: Program understanding for data science A classic, hard problem in AI: How can we teach machines to understand code, as opposed to merely executing it? We try to solve an incarnation of this problem in data science: How about understanding data analysis (in the form of computer code)? Our goals Technical. Form semantic representations of data analyses capturing: generic concepts of computing (functions, programs, etc.) domain-specic concepts of data science (data, models, prediction, etc.) Applications. Create an AI assistant for data scientists: Summarize data analyses in natural language text Discover related data sets or data analyses Automate meta-analysis and meta-learning Two examples Example 1: k-means clustering using NumPy and SciPy In [1]: import numpy as np from scipy.cluster.vq import kmeans2 iris = np.genfromtxt('iris.csv', dtype='f8', delimiter=',', skip_header=1) iris = np.delete(iris, 4, axis=1) centroids, clusters = kmeans2(iris, 3) Example 2: k-means clustering using pandas and scikit-learn In [2]: import pandas as pd from sklearn.cluster import KMeans iris = pd.read_csv('iris.csv') iris = iris.drop('Species', 1) kmeans = KMeans(n_clusters=3) kmeans.fit(iris.values) centroids = kmeans.cluster_centers_ clusters = kmeans.labels_ Demo: Semantic ow graphs Example 1: k-means clustering using SciPy Example 2: k-means clustering using scikit-learn The two examples have the same semantic representation. Methodology Derive semantic representation from computer program in two steps: 1.
    [Show full text]
  • Applied Category Theory
    Applied Category Theory John Baez We need a good mathematical theory of these. In many areas of science and engineering, people use diagrams of networks, with boxes connected by wires: In many areas of science and engineering, people use diagrams of networks, with boxes connected by wires: We need a good mathematical theory of these. Categories must be part of the solution. This became clear in the 1980s, at the interface of knot theory and quantum physics: Categories are great for describing processes of all kinds. A process with input x and output y is called a morphism F : x ! y, and we draw it like this: x F y The input and output are called objects. We can do one process after another if the output of the first equals the input of the second: x F y G z Here we are composing morphisms F : x ! y and G : y ! z to get a morphism GF : x ! z. In a monoidal category, we can also do processes `in parallel': x x0 F G y y 0 Here we are tensoring F : x ! y and G : x0 ! y 0 to get a morphism F ⊗ G : x ⊗ x0 ! y ⊗ y 0. In a braided monoidal category, we have a process of switching: x y y x This is called the braiding Bx;y : x ⊗ y ! y ⊗ x. It has an inverse: y x x y In a symmetric monoidal category it doesn't matter which wire goes over which: x y x y = y x y x All these kinds of categories obey some axioms, which are easy to find.
    [Show full text]
  • Diagrammatic Sets and Rewriting in Weak Higher Categories
    Diagrammatic sets and rewriting in weak higher categories Amar Hadzihasanovic IRIF, Universit´ede Paris GeoCat 2020 5 July 2020 arXiv:1909.07639 There is a draft, but I am rewriting it from scratch. Some definitions have changed. Some results I will mention do not hold with the old definitions. The new version should be out before the end of the month. There is a familiar world of spaces/1-groupoids/homotopy types in the background. Everything must be weak. n-categories in this world are (1; n)-categories. Do we really need to work in a specific model? If we do, it should feel familiar. Segal spaces, complicial sets... pick your favourite. Higher categories for all In homotopy theory, algebraic geometry, ...: Everything must be weak. n-categories in this world are (1; n)-categories. Do we really need to work in a specific model? If we do, it should feel familiar. Segal spaces, complicial sets... pick your favourite. Higher categories for all In homotopy theory, algebraic geometry, ...: There is a familiar world of spaces/1-groupoids/homotopy types in the background. Do we really need to work in a specific model? If we do, it should feel familiar. Segal spaces, complicial sets... pick your favourite. Higher categories for all In homotopy theory, algebraic geometry, ...: There is a familiar world of spaces/1-groupoids/homotopy types in the background. Everything must be weak. n-categories in this world are (1; n)-categories. If we do, it should feel familiar. Segal spaces, complicial sets... pick your favourite. Higher categories for all In homotopy theory, algebraic geometry, ...: There is a familiar world of spaces/1-groupoids/homotopy types in the background.
    [Show full text]