SlideShare a Scribd company logo
BASICS OF
COMPUTATIONAND
MODELING
LECTURE 2, 2.9.2015
INTRODUCTION TO COMPUTATIONAL SOCIAL SCIENCE (CSS01)
LAURI ELORANTA
• LECTURE 1: Introduction to Computational Social Science [DONE]
• Tuesday 01.09. 16:00 – 18:00, U35, Seminar room114
• LECTURE 2: Basics of Computation and Modeling [TODAY]
• Wednesday 02.09. 16:00 – 18:00, U35, Seminar room 113
• LECTURE 3: Big Data and Information Extraction
• Monday 07.09. 16:00 – 18:00, U35, Seminar room 114
• LECTURE 4: Network Analysis
• Monday 14.09. 16:00 – 18:00, U35, Seminar room 114
• LECTURE 5: Complex Systems
• Tuesday 15.09. 16:00 – 18:00, U35, Seminar room 114
• LECTURE 6: Simulation in Social Science
• Wednesday 16.09. 16:00 – 18:00, U35, Seminar room 113
• LECTURE 7: Ethical and Legal issues in CSS
• Monday 21.09. 16:00 – 18:00, U35, Seminar room 114
• LECTURE 8: Summary
• Tuesday 22.09. 17:00 – 19:00, U35, Seminar room 114
LECTURESSCHEDULE
• PART 1: COMPUTATION
• Role of Computation
• How Computers Work
• What is Programming
• PART 2: MODELING
• What is Modeling
• Unified Modeling Language (UML)
LECTURE 2OVERVIEW
• Understanding computers as information processing systems help us
understand complex systems as information processing systems as well
• Knowing how computers, programs and programming languages work
and what you are able to do with them helps us grasp how to approach a
research problem on a practical level (e.g. which tools to choose)
• There are practical consequences on the selection of computers,
programs and programming languages in relation to the research
problem we are trying to solve (e.g. selection of tools affect the answers
we are able to get)
MOTIVATION
WHYUNDERSTANDINGCOMPUTERSMATTERS
(Cioffi-Revilla 2014.)
• Computation is used in CSS as a language to formalize (1) theory and
(2) empirical research to research social complexity.
• Computation is in most cases applied computation: computation itself
is rarely researched (as is done in computer science).
• Information processing paradigm
1. Computing as a fundamental part of complex social systems
2. Computing as tools for research
ROLE OF COMPUTATION IN
CSS
(Cioffi-Revilla 2014.)
HOWCOMPUTERS
WORK
• Computers are formed of hardware and software
• Hardware: the physical parts of the computer that enable computing
• Micro-processor, physical memory (= electronic physical machines)
• Hardware provides the physical means for information processing
• Software: the (textual) instructions for that tell the hardware what to do
• The non-physical parts: e.g. MS. Word is a software program
• Example: your physical iPhone is hardware, the apps you run on it are
software.
HARDWARE & SOFTWARE
(Hennessy & Patterson 2013.)
COMPUTER
ARCHITECTURE
CPU
MAIN
MEMORY
(RAM)
SECONDARY
MEMORY
(e.g. Hard Disk)
INPUT
DEVICE
OUTPUT
DEVICE
(Cioffi-Revilla 2014.)
• CPU = Central Processing Unit, Does all the computing work
• Processes the instuctions on an program
• Controller, Registers, Arithmetic & Logic Unit
• Main Memory (RAM, Random Access Memory)
• Fastest memory, close to CPU (so that CPU-Memory-can work well
together)
• Instructions for computing are loaded to Main memory and executed
from there by the CPU
• Secondary memory (Hard Disk)
• Slower memory with big volume
• Able to store big amounts of data, but the access is much slower
• Programs fetched first to Main memory from secondary memory, before
they are run by the CPU
• Input and Output, I/O devices
• Screen, mouse, keyboard, network connections, …
COMPUTER
ARCHITECTURE
(Hennessy & Patterson 2013.)
• Computers run programs according the instruction cycle, also called as
fetch-execute-cycle (or fetch-decode-execute cycle)
• Basically it is about cycling two steps
• 1. Fetch the next instruction of the program from main memory to CPU
• 2. Execute that instruction in CPU
• Repeat steps 1 & 2
INSTRUCTION CYCLE
(Hennessy & Patterson 2013.)
• In relation to the information processing paradigm, computers can be
seen quite similar to complex adaptive social systems
• Computers are formed of information processing system (CPU,
Memory) and its environment (via I/O devices)
• Can a social system be seen as an information processing
“computer”?
ANANALOGYBETWEENCOMPUTERS
ANDCOMPLEXSYSTEMS
(Hennessy & Patterson 2013.)
WHATIS
PROGRAMMING
• Programming is the act of writing the instructions for the Computer/CPU
to execute
• A Program is a set of those instructions
• An iPhone app is a program
• The textual form of those instructions is called CODE and it is separated
from the DATA, which is to information the CODE is computing via CPU
• Programs are written in special languages called programing languages
PROGRAMMING
(Hennessy & Patterson 2013.)
• Central Processing Unit (CPU) can only understand instructions that are
written in its “native” language
• This CPU language is called Machine Code, and it varies from CPU to
CPU, based on make and model
• For example ARM <-> Intel X86 machine codes
• Machine language is not (or is hardly) human readable. The closest
correspondent is low-level Assembly Language
• Machine code or machine language is a set of instructions executed directly by a computer's central
processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU
operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is
made up of a series of such instructions. (Wikipedia 2015, Machine code)
CPU HAS ITS OWN
LANGUAGE
(Hennessy & Patterson 2013.)
• People write code in “human readable programming languages” (or
semi-human-readable, as assembly)
• One is able to see what the program does from the code
• CPU does not understand human readable languages & code, as it only
understands Machine Code
• Human readable programming languages needs to be translated to
machine code so that CPU is able to execute the code
• There are two ways to do this:
1. Compiling
2. Interpreting
PROGRAMMINGISDONEIN
HUMANREADABLELANGUAGES
(Hennessy & Patterson 2013.)
• Compiling code: The human readable code is transformed (=compiled)
once to machine code. After this the machine code program can be run
many times.
• -> This is equivalent in translating a book to a foreign language
(machine code), After the translation, book can be read many times.
• Interpreting code: The human readable code is interpreted to Machine
code at the same time it is executed by the CPU. This means, that the
interpretation/translation is happening at the same time the instructions
are executed.
• ->This is equivalent of having a real life conversation via a human
interpreter.
• Whether a language is compiled or intepreted has practical effects
• Speed, how variables are resolved, etc.
HELPINGMACHINESREADCODE:
COMPILINGANDINTERPETING
(Hennessy & Patterson 2013.)
• The abstraction level of a programming language depends on how “far” it
is from Machine Code & dealing with hardware related specifics (such as
memory management)
• Languages can be compiled/interpreted to other languages
ABSTRACTION LEVELOF
THE LANGUAGE
Low level language High level language
Machine Code Assembly C Java R
Visual
Programming
C++ Scala
• There are hundreds of programming languages
• http://en.wikipedia.org/wiki/List_of_programming_languages
• Languages differ in
• Syntax = how they are written, rules of writing instructions
• Semantics = what different words and concepts mean
• Pragmatics = what the language is used for
• Languages also differ in that are they compiled or interpreted to
machine code
PROGRAMMING
LANGUAGES
IN C LANGUAGE:
#include<stdio.h>
main()
{
printf("Hello World");
}
SYNTAX & SEMANTICS
HELLOWORLD-EXAMPLE
IN JAVA LANGUAGE:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
IN SCHEME -LANGUAGE:
(define hello-world
(lambda ()
(begin
(write ‘Hello-World)
(newline)
(hello-world))))
IN PYTHON LANGUAGE:
print "Hello, World!"
• Data types:
• Most basic type of information in the language
• integer, real, boolean…
• Data structures:
• More complex structures of data.
• list, stack, array, tree
• Variables: places to store functions and data
• Assignments: a way to tie a certain value to certain variable
• X = 5 + 2;
• Functions:
• A command that performs certain functionality
• Takes arguments and retunrs a value
• Print(“Hello World”)  “Hello World”
• Control Structures:
• Control the flow of the program
• Loop, skip, iterate, do something while certain conditions hold
PROGRAMMING
LANGUAGES INCLUDE
(Cioffi-Revilla 2014.)
• There are many different paradigms in the ways people do programs;
below are the three most common:
• Procedural / Imperative Programming
• Line-by-line telling what the program should do:
• 1 Do This
• 2 Do that
• 3 Do those things
• Object-Oriented Programming (OOP)
• Based on objects that contain functions and data
• Objects preserve state
• Functional Programming (FP)
• Functions as first class citizens
PARADIGMS OF
PROGRAMMING
• An algorithm is a self-contained set of step-by-step operations to
achieve a desired result.
• There are different algorithms for different purposes
• Search algorithms
• Sort algorithms
• Image processing algorithms
• Etc..
• A real life algorithm might be: how people get study credits
• Sign up for a course
• Participate lectures
• Do lecture assignments and final work
• Return lecture assignments and final work
• If your work passes the grading, you get study credits
ALGORITHMS
(Cioffi-Revilla 2014.)
• The way one writes code matters, because you or someone else needs
to be able to easily understand & modify the code
• This may happen after long periods of time (after one has forgotten
how the program works)
• Good coding style produces code that is simple, readable,
understandable, concise and well structured
• Code is also a way to communicate how the program works
• Documenting your code is a crucial part of programming!
• General principles according Cioffi-Revilla 2014
• Readability
• Commenting
• Modularity
• Defensive coding
CODING STYLE
• A good summary on how to write, refactor and manage code and data:
• Gentzkow, Matthew and Jesse M. Shapiro. 2014. Code and Data for the
Social Sciences: A Practitioner’s Guide. University of Chicago mimeo,
http://web.stanford.edu/~gentzkow/research/CodeAndData.pdf
• Handles matters such as:
• Automation
• Version Control
• Directories
• Data Keys
• Abstractation
• Documentation
• Management
MANAGINGANDREFACTORING
CODE&DATA
• You learn programming by doing!
• Start with something small
• University of Helsinki: Many Computer Science Courses
• CSS02 – Introduction to Programming in Social Sciences (II period, 2015).
• MOOC Courses Online:
• Coursera
• Data Science Specialization (Highly
recommended)https://www.coursera.org/specialization/jhudatascience/1?utm_medi
um=catalog
• CodeAcademy
• http://www.codecademy.com/learn
• MIT Open Course WARE
• http://ocw.mit.edu/courses/intro-programming/
• Udemy
• https://www.udemy.com/courses/Development/
WHERETO LEARN
PROGRAMMING
WHATISMODELING
• Model is a formal and purposeful representation and abstraction of
reality
• Scientific Modeling is a scientific activity, the aim of which is to make a particular
part or feature of the world easier to understand, define, quantify, visualize, or
simulate by referencing it to existing and usually commonly accepted knowledge.
It requires selecting and identifying relevant aspects of a situation in the real
world and then using different types of models for different aims, such as
conceptual models to better understand, operational models to operationalize,
mathematical models to quantify, and graphical models to visualize the subject.
(Wikipedia 2015, Scientific Modeling)
• Reality  Abstraction  Model of the Phenomena
MODEL
1. Models of Phenomena: model based on real world phenomena (e.g.
how ants collect food)
2. Models of Data: modeling based on raw data (e.g. plotting)
3. Models of Theory: model is the structural and formal presentation of
a textual theory
• Different Modeling Perspectives (Ontological)
• Physical models (e.g. miniature buildings)
• Fictional models (e.g. Bohr model of atom)
• Mathematical models: set-theory models, equations..
• Descriptions
• Mixed models
• A good summary on scientific modeling:
• http://plato.stanford.edu/entries/models-science/
MODELSAS
REPRESENTATIONS
(Stanford Encyclopedia 2015.)
• Ontology is the philosophical study of the nature of being,
becoming, existence, or reality, as well as the basic categories of
being and their relations. Traditionally listed as a part of the major
branch of philosophy known as metaphysics, ontology deals with
questions concerning what entities exist or can be said to exist, and how
such entities can be grouped, related within a hierarchy, and subdivided
according to similarities and differences. (Wikipedia 2015, Ontology)
• In computer science and information science, an ontology is a
formal naming and definition of the types, properties, and
interrelationships of the entities that really or fundamentally exist
for a particular domain of discourse. It is thus a practical application
of philosophical ontology, with a taxonomy. (Wikipedia 2015, Ontology
information science)
ONTOLOGY
• Entire social world consists of social systems and their environments
• These systems form of
• Classes
• Objects (of a certain class, called instances)
• Associations between classes and objects (e.g relationships between
entities)
• Real World (Referent Social System)   Model (abstracted Social
System)
ONTOLOGY& SOCIAL
SYSTEMS
(Cioffi-Revilla 2014.)
CAN YOU FIND CLASSES, OBJECTSAND
ASSOCIATIONS?
FAMILY, PARENT, CHILD, GENDER/SEX, PARENT-
CHILD-RELATIONSHIP, HETERONORMATIVITY, PHOTO
STUDIO…
• Deep epistemological and philosophy of science related questions,
which are not unproblematic
• What is the true relationship between the model and reality?
• What can be actually researched with models?
• What questions the models are actually able to answer?
• Modeling takes also a certain stance on the philosophy of science,
leaning towards empiricism & positivism, or at least critical realism.
MODELING IS
PROBLEMATIC
• A really good primer on model thinking is the course given by Scott E.
Page at the University of Michigan. One is able to participate the course
for free in Coursera: https://www.coursera.org/course/modelthinking
• Why Model?
• To be an intelligent citizen of the world
• To be a clearer thinker
• To understand and use data
• To better decide, strategize, and design
• Course videos also freely available in YouTube:
• https://www.youtube.com/watch?v=K-
gxhxGwJ38&index=2&list=PLGqc26s6O0E2P2BnK73JWXk4YYTgl3dm
b
MODELTHINKING
MODELINGWITH
UNIFIEDMODELING
LANGUAGE(UML)
• The Unified Modeling Language (UML) is a general-purpose modeling
language in the field of software engineering, which is designed to
provide a standard way to visualize the design of a system. (Wikipedia
2015, UML)
• UML is a standardized notational system for graphically representing
complex systems consisting of classes, objects, associations among
them, dynamic interactions and other scientifically important features.
(Cioffi-Revilla 2014)
• Developed during the 1990s
• Is part of the ISO standard
• Static Modeling: Models the static structure of the system
• Dynamic Modeling: Models the dynamic behavior of the system
UNIFIED MODELIN
LANGUAGE (UML)
• Use Case Diagrams
• Class Diagrams
• Sequence Diagrams
• State Diagrams
• Component Diagrams
• Deployment Diagrams
• Most useful for Social Science modeling might be the Class, State,
Sequence diagrams
MAINTYPES OF UML
MODELS
(Bell 2004.)
• Class diagram represents the static structure of a complex system
• Class diagram forms of
• Rectangles representing classes and objects (name on top)
• Classes and objects can have
• Attributes (e.g age, sex)
• Methods = a certain function the class or object is able to perform
(e.g.getMarried())
• Links between rectangles representing associations between classes
and objects
CLASS DIAGRAM
(Cioffi-Revilla 2014.)
CLASSES
nameOfClass
Attributes (optional)
Methods (optional)
Family
-age
-weight
-height
Person
• Four types of associations represented by different arrowhead-links:
• Inheritance/generalization
(empty arrowhead)
• Aggregation
(empty diamond)
• Composition
(black diamond)
• Generic association
(plain link / directional arrow symbol)
CLASS DIAGRAM &
ASSOCIATIONS
(Cioffi-Revilla 2014.)
(Image from:
http://www.javacodegeeks.com
/2013/01/quick-summary-
object-associations.html)
ASSOCITATIONS
Family
-age
-weight
-height
Person
belongs to
• Multiples represent the quantities in relation of association
• E.g. How many children a parent has in the particular model
• There are many different range options
• 0..1 = between 0 and 1
• 1 = exactly 1
• 0..* or * = between 0 and unspecified many
• 1..* = between 1 and unspecified many
• 0..N or N = between 0 and unspecified many
• 1..N = between 1 and unspecified many
CLASS DIAGRAM &
MULTIPLES
(Cioffi-Revilla 2014.)
MULTIPLES
Family
-age
-weight
-height
Person
belongs to
1..*
0..1
HOWTO MODELTHIS IN UMLCLASS DIAGRAM?
• Sketch a UML Class Diagram model that represents elections
• What are the main classes, objects and relationships between the
classes?
• Do you find the model useful?
ASSIGNMENT
• Gentzkow, M.; Shapiro, J, M. 2014. Code and Data for the Social Sciences: A Practitioner’s Guide. University of
Chicago mimeo, http://faculty.chicagobooth.edu/matthew.gentzkow/research/CodeAndData.pdf
• Granger, C. 2015. Coding is not the new literacy. http://www.chris-granger.com/2015/01/26/coding-is-not-the-
new-literacy/
• Epstein, J. M. 2008. Why Model?. Keynote address to the Second World Congress on Social Simulation. In
Why Model?: Keynote address to the Second World Congress on Social Simulation. George Mason University.
• Page, S. E. 2012. The Model Thinker: Prologue, Introduction and Chapter 1. Link provided by University of
Michigan & Coursera:
• http://vserver1.cscs.lsa.umich.edu/~spage/ONLINECOURSE/R1Page.pdf
• Stanford Encyclopedia of Philosophy, 2012. Models in Science.
• http://plato.stanford.edu/entries/models-science/
• Bell, D. 2003. UML basics: An introduction to the Unified Modeling Language. The Rational Edge.
https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep03/f_umlbasics_db.pdf
LECTURE 2 READING
• Cioffi-Revilla, C. 2014. Introduction to Computational Social Science. Springer-Verlag, London
• Gentzkow, M.; Shapiro, J, M. 2014. Code and Data for the Social Sciences: A Practitioner’s Guide. University of
Chicago mimeo, http://faculty.chicagobooth.edu/matthew.gentzkow/research/CodeAndData.pdf
• Hennessy, J. L.; Patterson, D. A. 2013. Computer Organization and Design. Elsevier, Waltham.
• Stanford Encyclopedia of Philosophy, 2012. Models in Science.
• http://plato.stanford.edu/entries/models-science/
• Bell, D. 2003. UML basics: An introduction to the Unified Modeling Language. The Rational Edge.
https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep03/f_umlbasics_db.pdf
• Wikipedia 2015, Scientific Modeling. http://en.wikipedia.org/wiki/Scientific_modelling
• Wikipedia 2015, Ontology. http://en.wikipedia.org/wiki/Ontology
• Wikipedia 2015, Ontology (information science) http://en.wikipedia.org/wiki/Ontology_(information_science)
REFERENCES
Thank You!
Questions and comments?
twitter: @laurieloranta

More Related Content

What's hot

Control structures in Java
Control structures in JavaControl structures in Java
Control structures in Java
Ravi_Kant_Sahu
 
Computational thinking
Computational thinkingComputational thinking
Computational thinking
r123457
 
Human computer interaction
Human computer interactionHuman computer interaction
Human computer interaction
sai anjaneya
 
Computational Thinking
Computational ThinkingComputational Thinking
Computational Thinking
showslidedump
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
Vaibhav Bajaj
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 

What's hot (20)

Control structures in Java
Control structures in JavaControl structures in Java
Control structures in Java
 
Computational thinking
Computational thinkingComputational thinking
Computational thinking
 
Human computer interaction
Human computer interactionHuman computer interaction
Human computer interaction
 
BASICS OF DATA STRUCTURE
BASICS OF DATA STRUCTUREBASICS OF DATA STRUCTURE
BASICS OF DATA STRUCTURE
 
Computational Thinking
Computational ThinkingComputational Thinking
Computational Thinking
 
Rule based system
Rule based systemRule based system
Rule based system
 
Lecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its PropertiesLecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its Properties
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
Software Quality Metrics
Software Quality MetricsSoftware Quality Metrics
Software Quality Metrics
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
The benefits of software reuse
The benefits of software reuseThe benefits of software reuse
The benefits of software reuse
 
SE chapter 5
SE chapter 5SE chapter 5
SE chapter 5
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
The principles of simulation system design.pptx
The principles of simulation system design.pptxThe principles of simulation system design.pptx
The principles of simulation system design.pptx
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinking
 
Software Engineering Fundamentals
Software Engineering FundamentalsSoftware Engineering Fundamentals
Software Engineering Fundamentals
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Cognitive models unit 3
Cognitive models unit 3Cognitive models unit 3
Cognitive models unit 3
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 

Viewers also liked

أدوات البحث في شبكات التواصل الاجتماعي
أدوات البحث في شبكات التواصل الاجتماعيأدوات البحث في شبكات التواصل الاجتماعي
أدوات البحث في شبكات التواصل الاجتماعي
khojahay
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
Daniel Katz
 

Viewers also liked (20)

Simulation in Social Sciences - Lecture 6 in Introduction to Computational S...
Simulation in Social Sciences -  Lecture 6 in Introduction to Computational S...Simulation in Social Sciences -  Lecture 6 in Introduction to Computational S...
Simulation in Social Sciences - Lecture 6 in Introduction to Computational S...
 
Ethical and Legal Issues in Computational Social Science - Lecture 7 in Intro...
Ethical and Legal Issues in Computational Social Science - Lecture 7 in Intro...Ethical and Legal Issues in Computational Social Science - Lecture 7 in Intro...
Ethical and Legal Issues in Computational Social Science - Lecture 7 in Intro...
 
Big Data and Data Mining - Lecture 3 in Introduction to Computational Social ...
Big Data and Data Mining - Lecture 3 in Introduction to Computational Social ...Big Data and Data Mining - Lecture 3 in Introduction to Computational Social ...
Big Data and Data Mining - Lecture 3 in Introduction to Computational Social ...
 
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
Social Network Analysis - Lecture 4 in Introduction to Computational Social S...
 
Complex Social Systems - Lecture 5 in Introduction to Computational Social Sc...
Complex Social Systems - Lecture 5 in Introduction to Computational Social Sc...Complex Social Systems - Lecture 5 in Introduction to Computational Social Sc...
Complex Social Systems - Lecture 5 in Introduction to Computational Social Sc...
 
A Summary of Computational Social Science - Lecture 8 in Introduction to Comp...
A Summary of Computational Social Science - Lecture 8 in Introduction to Comp...A Summary of Computational Social Science - Lecture 8 in Introduction to Comp...
A Summary of Computational Social Science - Lecture 8 in Introduction to Comp...
 
Introduction to Computational Social Science - Lecture 1
Introduction to Computational Social Science - Lecture 1Introduction to Computational Social Science - Lecture 1
Introduction to Computational Social Science - Lecture 1
 
The Basics of Social Network Analysis
The Basics of Social Network AnalysisThe Basics of Social Network Analysis
The Basics of Social Network Analysis
 
Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011Social network analysis course 2010 - 2011
Social network analysis course 2010 - 2011
 
I Social Network
I Social NetworkI Social Network
I Social Network
 
Social network analysis
Social network analysisSocial network analysis
Social network analysis
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
Social Network Analysis & an Introduction to Tools
Social Network Analysis & an Introduction to ToolsSocial Network Analysis & an Introduction to Tools
Social Network Analysis & an Introduction to Tools
 
Psychology and Social Media
Psychology and Social MediaPsychology and Social Media
Psychology and Social Media
 
Socialmedia from a psychological perspective
Socialmedia from a psychological perspectiveSocialmedia from a psychological perspective
Socialmedia from a psychological perspective
 
تحليل الشبكات الاجتماعية
تحليل الشبكات الاجتماعيةتحليل الشبكات الاجتماعية
تحليل الشبكات الاجتماعية
 
أدوات البحث في شبكات التواصل الاجتماعي
أدوات البحث في شبكات التواصل الاجتماعيأدوات البحث في شبكات التواصل الاجتماعي
أدوات البحث في شبكات التواصل الاجتماعي
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 2 - Professor...
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 1 - Professor...
 
Tin10_Chuong01_Bai_8
Tin10_Chuong01_Bai_8Tin10_Chuong01_Bai_8
Tin10_Chuong01_Bai_8
 

Similar to Basics of Computation and Modeling - Lecture 2 in Introduction to Computational Social Science

Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
crAmth
 

Similar to Basics of Computation and Modeling - Lecture 2 in Introduction to Computational Social Science (20)

INTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWAREINTRODUCTION TO COMPUTER SOFTWARE
INTRODUCTION TO COMPUTER SOFTWARE
 
Chapter 1 - Prog101.ppt
Chapter 1 - Prog101.pptChapter 1 - Prog101.ppt
Chapter 1 - Prog101.ppt
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages ConceptsProgramming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
 
Csc240 lecture 1
Csc240   lecture 1Csc240   lecture 1
Csc240 lecture 1
 
fdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.pptfdocuments.in_unit-2-foc.ppt
fdocuments.in_unit-2-foc.ppt
 
Introduction to Hardware and Software
Introduction to Hardware and SoftwareIntroduction to Hardware and Software
Introduction to Hardware and Software
 
Problem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdfProblem Solving and Program Design in C_1.pdf
Problem Solving and Program Design in C_1.pdf
 
System softare
System softareSystem softare
System softare
 
Python-unit -I.pptx
Python-unit -I.pptxPython-unit -I.pptx
Python-unit -I.pptx
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Chapter no 1
Chapter no 1Chapter no 1
Chapter no 1
 
C LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdfC LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdf
 
Unit 2 computer software
Unit 2 computer softwareUnit 2 computer software
Unit 2 computer software
 
UNIT-111.pptx
UNIT-111.pptxUNIT-111.pptx
UNIT-111.pptx
 
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiComputer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
 
Introduction to programming - class 1
Introduction to programming - class 1Introduction to programming - class 1
Introduction to programming - class 1
 
Week 01.pdf
Week 01.pdfWeek 01.pdf
Week 01.pdf
 
Operating systems 101
Operating systems 101Operating systems 101
Operating systems 101
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 

Recently uploaded

一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
Introduction-to-Cybersecurit57hhfcbbcxxx
Introduction-to-Cybersecurit57hhfcbbcxxxIntroduction-to-Cybersecurit57hhfcbbcxxx
Introduction-to-Cybersecurit57hhfcbbcxxx
zahraomer517
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 

Recently uploaded (20)

一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Introduction-to-Cybersecurit57hhfcbbcxxx
Introduction-to-Cybersecurit57hhfcbbcxxxIntroduction-to-Cybersecurit57hhfcbbcxxx
Introduction-to-Cybersecurit57hhfcbbcxxx
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPsWebinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
Webinar One View, Multiple Systems No-Code Integration of Salesforce and ERPs
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?How can I successfully sell my pi coins in Philippines?
How can I successfully sell my pi coins in Philippines?
 
tapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive datatapal brand analysis PPT slide for comptetive data
tapal brand analysis PPT slide for comptetive data
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 

Basics of Computation and Modeling - Lecture 2 in Introduction to Computational Social Science

  • 1. BASICS OF COMPUTATIONAND MODELING LECTURE 2, 2.9.2015 INTRODUCTION TO COMPUTATIONAL SOCIAL SCIENCE (CSS01) LAURI ELORANTA
  • 2. • LECTURE 1: Introduction to Computational Social Science [DONE] • Tuesday 01.09. 16:00 – 18:00, U35, Seminar room114 • LECTURE 2: Basics of Computation and Modeling [TODAY] • Wednesday 02.09. 16:00 – 18:00, U35, Seminar room 113 • LECTURE 3: Big Data and Information Extraction • Monday 07.09. 16:00 – 18:00, U35, Seminar room 114 • LECTURE 4: Network Analysis • Monday 14.09. 16:00 – 18:00, U35, Seminar room 114 • LECTURE 5: Complex Systems • Tuesday 15.09. 16:00 – 18:00, U35, Seminar room 114 • LECTURE 6: Simulation in Social Science • Wednesday 16.09. 16:00 – 18:00, U35, Seminar room 113 • LECTURE 7: Ethical and Legal issues in CSS • Monday 21.09. 16:00 – 18:00, U35, Seminar room 114 • LECTURE 8: Summary • Tuesday 22.09. 17:00 – 19:00, U35, Seminar room 114 LECTURESSCHEDULE
  • 3. • PART 1: COMPUTATION • Role of Computation • How Computers Work • What is Programming • PART 2: MODELING • What is Modeling • Unified Modeling Language (UML) LECTURE 2OVERVIEW
  • 4. • Understanding computers as information processing systems help us understand complex systems as information processing systems as well • Knowing how computers, programs and programming languages work and what you are able to do with them helps us grasp how to approach a research problem on a practical level (e.g. which tools to choose) • There are practical consequences on the selection of computers, programs and programming languages in relation to the research problem we are trying to solve (e.g. selection of tools affect the answers we are able to get) MOTIVATION WHYUNDERSTANDINGCOMPUTERSMATTERS (Cioffi-Revilla 2014.)
  • 5. • Computation is used in CSS as a language to formalize (1) theory and (2) empirical research to research social complexity. • Computation is in most cases applied computation: computation itself is rarely researched (as is done in computer science). • Information processing paradigm 1. Computing as a fundamental part of complex social systems 2. Computing as tools for research ROLE OF COMPUTATION IN CSS (Cioffi-Revilla 2014.)
  • 7. • Computers are formed of hardware and software • Hardware: the physical parts of the computer that enable computing • Micro-processor, physical memory (= electronic physical machines) • Hardware provides the physical means for information processing • Software: the (textual) instructions for that tell the hardware what to do • The non-physical parts: e.g. MS. Word is a software program • Example: your physical iPhone is hardware, the apps you run on it are software. HARDWARE & SOFTWARE (Hennessy & Patterson 2013.)
  • 9. • CPU = Central Processing Unit, Does all the computing work • Processes the instuctions on an program • Controller, Registers, Arithmetic & Logic Unit • Main Memory (RAM, Random Access Memory) • Fastest memory, close to CPU (so that CPU-Memory-can work well together) • Instructions for computing are loaded to Main memory and executed from there by the CPU • Secondary memory (Hard Disk) • Slower memory with big volume • Able to store big amounts of data, but the access is much slower • Programs fetched first to Main memory from secondary memory, before they are run by the CPU • Input and Output, I/O devices • Screen, mouse, keyboard, network connections, … COMPUTER ARCHITECTURE (Hennessy & Patterson 2013.)
  • 10. • Computers run programs according the instruction cycle, also called as fetch-execute-cycle (or fetch-decode-execute cycle) • Basically it is about cycling two steps • 1. Fetch the next instruction of the program from main memory to CPU • 2. Execute that instruction in CPU • Repeat steps 1 & 2 INSTRUCTION CYCLE (Hennessy & Patterson 2013.)
  • 11. • In relation to the information processing paradigm, computers can be seen quite similar to complex adaptive social systems • Computers are formed of information processing system (CPU, Memory) and its environment (via I/O devices) • Can a social system be seen as an information processing “computer”? ANANALOGYBETWEENCOMPUTERS ANDCOMPLEXSYSTEMS (Hennessy & Patterson 2013.)
  • 13. • Programming is the act of writing the instructions for the Computer/CPU to execute • A Program is a set of those instructions • An iPhone app is a program • The textual form of those instructions is called CODE and it is separated from the DATA, which is to information the CODE is computing via CPU • Programs are written in special languages called programing languages PROGRAMMING (Hennessy & Patterson 2013.)
  • 14. • Central Processing Unit (CPU) can only understand instructions that are written in its “native” language • This CPU language is called Machine Code, and it varies from CPU to CPU, based on make and model • For example ARM <-> Intel X86 machine codes • Machine language is not (or is hardly) human readable. The closest correspondent is low-level Assembly Language • Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions. (Wikipedia 2015, Machine code) CPU HAS ITS OWN LANGUAGE (Hennessy & Patterson 2013.)
  • 15. • People write code in “human readable programming languages” (or semi-human-readable, as assembly) • One is able to see what the program does from the code • CPU does not understand human readable languages & code, as it only understands Machine Code • Human readable programming languages needs to be translated to machine code so that CPU is able to execute the code • There are two ways to do this: 1. Compiling 2. Interpreting PROGRAMMINGISDONEIN HUMANREADABLELANGUAGES (Hennessy & Patterson 2013.)
  • 16. • Compiling code: The human readable code is transformed (=compiled) once to machine code. After this the machine code program can be run many times. • -> This is equivalent in translating a book to a foreign language (machine code), After the translation, book can be read many times. • Interpreting code: The human readable code is interpreted to Machine code at the same time it is executed by the CPU. This means, that the interpretation/translation is happening at the same time the instructions are executed. • ->This is equivalent of having a real life conversation via a human interpreter. • Whether a language is compiled or intepreted has practical effects • Speed, how variables are resolved, etc. HELPINGMACHINESREADCODE: COMPILINGANDINTERPETING (Hennessy & Patterson 2013.)
  • 17. • The abstraction level of a programming language depends on how “far” it is from Machine Code & dealing with hardware related specifics (such as memory management) • Languages can be compiled/interpreted to other languages ABSTRACTION LEVELOF THE LANGUAGE Low level language High level language Machine Code Assembly C Java R Visual Programming C++ Scala
  • 18. • There are hundreds of programming languages • http://en.wikipedia.org/wiki/List_of_programming_languages • Languages differ in • Syntax = how they are written, rules of writing instructions • Semantics = what different words and concepts mean • Pragmatics = what the language is used for • Languages also differ in that are they compiled or interpreted to machine code PROGRAMMING LANGUAGES
  • 19. IN C LANGUAGE: #include<stdio.h> main() { printf("Hello World"); } SYNTAX & SEMANTICS HELLOWORLD-EXAMPLE IN JAVA LANGUAGE: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } } IN SCHEME -LANGUAGE: (define hello-world (lambda () (begin (write ‘Hello-World) (newline) (hello-world)))) IN PYTHON LANGUAGE: print "Hello, World!"
  • 20. • Data types: • Most basic type of information in the language • integer, real, boolean… • Data structures: • More complex structures of data. • list, stack, array, tree • Variables: places to store functions and data • Assignments: a way to tie a certain value to certain variable • X = 5 + 2; • Functions: • A command that performs certain functionality • Takes arguments and retunrs a value • Print(“Hello World”)  “Hello World” • Control Structures: • Control the flow of the program • Loop, skip, iterate, do something while certain conditions hold PROGRAMMING LANGUAGES INCLUDE (Cioffi-Revilla 2014.)
  • 21. • There are many different paradigms in the ways people do programs; below are the three most common: • Procedural / Imperative Programming • Line-by-line telling what the program should do: • 1 Do This • 2 Do that • 3 Do those things • Object-Oriented Programming (OOP) • Based on objects that contain functions and data • Objects preserve state • Functional Programming (FP) • Functions as first class citizens PARADIGMS OF PROGRAMMING
  • 22. • An algorithm is a self-contained set of step-by-step operations to achieve a desired result. • There are different algorithms for different purposes • Search algorithms • Sort algorithms • Image processing algorithms • Etc.. • A real life algorithm might be: how people get study credits • Sign up for a course • Participate lectures • Do lecture assignments and final work • Return lecture assignments and final work • If your work passes the grading, you get study credits ALGORITHMS (Cioffi-Revilla 2014.)
  • 23. • The way one writes code matters, because you or someone else needs to be able to easily understand & modify the code • This may happen after long periods of time (after one has forgotten how the program works) • Good coding style produces code that is simple, readable, understandable, concise and well structured • Code is also a way to communicate how the program works • Documenting your code is a crucial part of programming! • General principles according Cioffi-Revilla 2014 • Readability • Commenting • Modularity • Defensive coding CODING STYLE
  • 24. • A good summary on how to write, refactor and manage code and data: • Gentzkow, Matthew and Jesse M. Shapiro. 2014. Code and Data for the Social Sciences: A Practitioner’s Guide. University of Chicago mimeo, http://web.stanford.edu/~gentzkow/research/CodeAndData.pdf • Handles matters such as: • Automation • Version Control • Directories • Data Keys • Abstractation • Documentation • Management MANAGINGANDREFACTORING CODE&DATA
  • 25. • You learn programming by doing! • Start with something small • University of Helsinki: Many Computer Science Courses • CSS02 – Introduction to Programming in Social Sciences (II period, 2015). • MOOC Courses Online: • Coursera • Data Science Specialization (Highly recommended)https://www.coursera.org/specialization/jhudatascience/1?utm_medi um=catalog • CodeAcademy • http://www.codecademy.com/learn • MIT Open Course WARE • http://ocw.mit.edu/courses/intro-programming/ • Udemy • https://www.udemy.com/courses/Development/ WHERETO LEARN PROGRAMMING
  • 27. • Model is a formal and purposeful representation and abstraction of reality • Scientific Modeling is a scientific activity, the aim of which is to make a particular part or feature of the world easier to understand, define, quantify, visualize, or simulate by referencing it to existing and usually commonly accepted knowledge. It requires selecting and identifying relevant aspects of a situation in the real world and then using different types of models for different aims, such as conceptual models to better understand, operational models to operationalize, mathematical models to quantify, and graphical models to visualize the subject. (Wikipedia 2015, Scientific Modeling) • Reality  Abstraction  Model of the Phenomena MODEL
  • 28. 1. Models of Phenomena: model based on real world phenomena (e.g. how ants collect food) 2. Models of Data: modeling based on raw data (e.g. plotting) 3. Models of Theory: model is the structural and formal presentation of a textual theory • Different Modeling Perspectives (Ontological) • Physical models (e.g. miniature buildings) • Fictional models (e.g. Bohr model of atom) • Mathematical models: set-theory models, equations.. • Descriptions • Mixed models • A good summary on scientific modeling: • http://plato.stanford.edu/entries/models-science/ MODELSAS REPRESENTATIONS (Stanford Encyclopedia 2015.)
  • 29. • Ontology is the philosophical study of the nature of being, becoming, existence, or reality, as well as the basic categories of being and their relations. Traditionally listed as a part of the major branch of philosophy known as metaphysics, ontology deals with questions concerning what entities exist or can be said to exist, and how such entities can be grouped, related within a hierarchy, and subdivided according to similarities and differences. (Wikipedia 2015, Ontology) • In computer science and information science, an ontology is a formal naming and definition of the types, properties, and interrelationships of the entities that really or fundamentally exist for a particular domain of discourse. It is thus a practical application of philosophical ontology, with a taxonomy. (Wikipedia 2015, Ontology information science) ONTOLOGY
  • 30. • Entire social world consists of social systems and their environments • These systems form of • Classes • Objects (of a certain class, called instances) • Associations between classes and objects (e.g relationships between entities) • Real World (Referent Social System)   Model (abstracted Social System) ONTOLOGY& SOCIAL SYSTEMS (Cioffi-Revilla 2014.)
  • 31. CAN YOU FIND CLASSES, OBJECTSAND ASSOCIATIONS?
  • 32. FAMILY, PARENT, CHILD, GENDER/SEX, PARENT- CHILD-RELATIONSHIP, HETERONORMATIVITY, PHOTO STUDIO…
  • 33. • Deep epistemological and philosophy of science related questions, which are not unproblematic • What is the true relationship between the model and reality? • What can be actually researched with models? • What questions the models are actually able to answer? • Modeling takes also a certain stance on the philosophy of science, leaning towards empiricism & positivism, or at least critical realism. MODELING IS PROBLEMATIC
  • 34. • A really good primer on model thinking is the course given by Scott E. Page at the University of Michigan. One is able to participate the course for free in Coursera: https://www.coursera.org/course/modelthinking • Why Model? • To be an intelligent citizen of the world • To be a clearer thinker • To understand and use data • To better decide, strategize, and design • Course videos also freely available in YouTube: • https://www.youtube.com/watch?v=K- gxhxGwJ38&index=2&list=PLGqc26s6O0E2P2BnK73JWXk4YYTgl3dm b MODELTHINKING
  • 36. • The Unified Modeling Language (UML) is a general-purpose modeling language in the field of software engineering, which is designed to provide a standard way to visualize the design of a system. (Wikipedia 2015, UML) • UML is a standardized notational system for graphically representing complex systems consisting of classes, objects, associations among them, dynamic interactions and other scientifically important features. (Cioffi-Revilla 2014) • Developed during the 1990s • Is part of the ISO standard • Static Modeling: Models the static structure of the system • Dynamic Modeling: Models the dynamic behavior of the system UNIFIED MODELIN LANGUAGE (UML)
  • 37. • Use Case Diagrams • Class Diagrams • Sequence Diagrams • State Diagrams • Component Diagrams • Deployment Diagrams • Most useful for Social Science modeling might be the Class, State, Sequence diagrams MAINTYPES OF UML MODELS (Bell 2004.)
  • 38. • Class diagram represents the static structure of a complex system • Class diagram forms of • Rectangles representing classes and objects (name on top) • Classes and objects can have • Attributes (e.g age, sex) • Methods = a certain function the class or object is able to perform (e.g.getMarried()) • Links between rectangles representing associations between classes and objects CLASS DIAGRAM (Cioffi-Revilla 2014.)
  • 40. • Four types of associations represented by different arrowhead-links: • Inheritance/generalization (empty arrowhead) • Aggregation (empty diamond) • Composition (black diamond) • Generic association (plain link / directional arrow symbol) CLASS DIAGRAM & ASSOCIATIONS (Cioffi-Revilla 2014.) (Image from: http://www.javacodegeeks.com /2013/01/quick-summary- object-associations.html)
  • 42. • Multiples represent the quantities in relation of association • E.g. How many children a parent has in the particular model • There are many different range options • 0..1 = between 0 and 1 • 1 = exactly 1 • 0..* or * = between 0 and unspecified many • 1..* = between 1 and unspecified many • 0..N or N = between 0 and unspecified many • 1..N = between 1 and unspecified many CLASS DIAGRAM & MULTIPLES (Cioffi-Revilla 2014.)
  • 44. HOWTO MODELTHIS IN UMLCLASS DIAGRAM?
  • 45. • Sketch a UML Class Diagram model that represents elections • What are the main classes, objects and relationships between the classes? • Do you find the model useful? ASSIGNMENT
  • 46. • Gentzkow, M.; Shapiro, J, M. 2014. Code and Data for the Social Sciences: A Practitioner’s Guide. University of Chicago mimeo, http://faculty.chicagobooth.edu/matthew.gentzkow/research/CodeAndData.pdf • Granger, C. 2015. Coding is not the new literacy. http://www.chris-granger.com/2015/01/26/coding-is-not-the- new-literacy/ • Epstein, J. M. 2008. Why Model?. Keynote address to the Second World Congress on Social Simulation. In Why Model?: Keynote address to the Second World Congress on Social Simulation. George Mason University. • Page, S. E. 2012. The Model Thinker: Prologue, Introduction and Chapter 1. Link provided by University of Michigan & Coursera: • http://vserver1.cscs.lsa.umich.edu/~spage/ONLINECOURSE/R1Page.pdf • Stanford Encyclopedia of Philosophy, 2012. Models in Science. • http://plato.stanford.edu/entries/models-science/ • Bell, D. 2003. UML basics: An introduction to the Unified Modeling Language. The Rational Edge. https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep03/f_umlbasics_db.pdf LECTURE 2 READING
  • 47. • Cioffi-Revilla, C. 2014. Introduction to Computational Social Science. Springer-Verlag, London • Gentzkow, M.; Shapiro, J, M. 2014. Code and Data for the Social Sciences: A Practitioner’s Guide. University of Chicago mimeo, http://faculty.chicagobooth.edu/matthew.gentzkow/research/CodeAndData.pdf • Hennessy, J. L.; Patterson, D. A. 2013. Computer Organization and Design. Elsevier, Waltham. • Stanford Encyclopedia of Philosophy, 2012. Models in Science. • http://plato.stanford.edu/entries/models-science/ • Bell, D. 2003. UML basics: An introduction to the Unified Modeling Language. The Rational Edge. https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep03/f_umlbasics_db.pdf • Wikipedia 2015, Scientific Modeling. http://en.wikipedia.org/wiki/Scientific_modelling • Wikipedia 2015, Ontology. http://en.wikipedia.org/wiki/Ontology • Wikipedia 2015, Ontology (information science) http://en.wikipedia.org/wiki/Ontology_(information_science) REFERENCES
  • 48. Thank You! Questions and comments? twitter: @laurieloranta