Machine Media
Week 2
Week 2 - Class Overview
Themes & Timeline:
Week 1: Introductions, Chance & Protocol
Week 2: Chatbots and Generative text
Week 3: �Data Labor
Week 4:
Classification, Taxonomies, Computer Vision
Week 5:
Generative Adversarial Networks, Handmade Datasets
Week 6:
GAN review,�Photo tutorial
Week 7:
Facial Recognition,
Identity, Surveillance
Week 8:
Deepfakes
Week 9: The Digital is Physical: Environmental impact
Week 10:
Handmade Dataset mid-way presentations
Week 11:
Data augmentation�Workshop (python)
Week 12:
Writing Images: Text-to
-image
models
Week 13:
Data Augmentation workshop part 2
Week 14:
Training Demo�In-class work day
Week 15: Final Presentations
Thanksgiving Break
Handmade Dataset Project
Week 2 - Agenda
Homework review: �Making Kin With Machines
Discussion Questions:
What were your initial thoughts on the reading?
What connections, if any can you make between the reading and the assignment?
How does metaphor serve as a framework for interacting with technology? How does metaphor serve as a framework for creating technology?
�
Homework review: �Making Kin With Machines
“A problematic aspect of the current AI debate is the assumption that AIs would be homogeneous when in fact every AI would be profoundly different, from a military AI designed to operate autonomous killing machines to an AI built to oversee the United States’ electrical grid. �Less obvious influences beyond mission parameters would be the programming language(s) used in development, the coding style of the team, and less visibly, but perhaps more importantly, the cultural values and assumptions of the developers.”
TLDR:
Homework review: �Making Kin With Machines
“I am not worried about rogue hyper-intelligences going Skynet to destroy humanity. I am worried about anonymous hyper-intelligences working for governments and corporations, implementing far-reaching social, economic, and military strategies based on the same values that have fostered genocide against Indigenous people worldwide and brought us all to the brink of environmental collapse. In short, I fear the rise of a new class of extremely powerful beings that will make the same mistakes as their creators but with greater consequences and even less public accountability.”
TLDR:
Homework review: �Make a Meme
How do the words/images/metaphors we use to describe Machine Learning affect our relationship with technology?
Chatbots fka Chatterbots and generative text
a computer program designed to simulate conversation with human users, especially over the internet - Oxford Languages
Week 2 - Lecture
ELIZA - Joseph Weizenbaum
Created in 1964. ELIZA is designed to offer stock responses based on certain keywords from the responses of users.
Week 2 - Lecture
Smarterchild
Same idea but on AOL instant messenger…
Week 2 - Lecture
From Princeton, Reads all of your facebook status and uses markov chains to generate new ones
Week 2 - Lecture
Uses Generative Adversarial Networks. More advanced ML technique than markov chains. Chat GPT is based on billions of texts from the internet.
Week 2 - Lecture
Markov Chains
Falls under the umbrella of machine learning. But some do not consider it to be a Machine Learning algorithm. I think of it as a proto-ML algorithm…
It is a statistical model that aims to predict the probability of a certain state following a previous state. In the case of generative text, it may be the probability of a word following another word or a couplet of words following another couplet of words.
Week 2 - Chatbots and Generative Text
For every node, there is an X% chance that you will go to one node or a Y%
Markov Chains
A statistical model that aims to predict the probability of a certain state following a previous state. In the case of generative text, it may be the probability of a word following another word or a couplet of words following another couplet of words.
How
are
is
she?
he?
they?
you?
50%
50%
50%
50%
20%
80%
N-grams
N-grams are collections of sequential items (for our purposes let’s stick with text) in a text document where N is the number of individual items in the chain. So the example on the right is about tri-grams because it looks at patterns of sequential words working with groups of three at a time.
Google’s N-Gram Viewer
Shows the frequency of certain
N-grams over time in books.
Week 2 - Chatbots and Generative Text
Next Semester - Allison Parrish
Uses markov chains to generate course descriptions based on courses listed at NYU
Week 2 - Chatbots and Generative Text
Sandy Speaks - American Artist, 2016
"American Artist's online chatbot Sandy Speaks is inspired by the legacy of Sandra Bland, a 28-year-old African American woman who was found dead in a jail cell in Waller, Texas, on July 13, 2015—three days after being pulled over and arrested for a minor traffic violation. While her death was ruled a suicide, a grassroots movement coalesced to cast doubt on the official account. Those involved demanded to know: What happened to Sandra Bland? Users can ask the bot a limited range of questions related to Bland's death and American policing. The work's title is taken from a series of videos Bland posted online in the months preceding her death, which touch on politicized issues such as police brutality and mass incarceration."
Using markov chains, you will develop a browser-based text generator.
Coding Demo: Setup
Language(s):
HTML, CSS, Javascript
*You will only need
to edit the Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
HTML
body {
background: blue;
color: black;
Margin:0;
padding:0;
}
CSS
console.log('hello world')
JS
The Skeleton
(the content)
The Style (fonts, colors etc)
The Behavior (interaction)
Coding Demo: Setup
Javascript Libraries:
P5.js & RiTa.js
Javascript libraries are essentially javascript files we can "add" to our
project to extend the functionality of
our javascript in certain ways.
P5.js gives us a bunch of creative coding features.
RiTa.js gives us a bunch of Natural Language Processing features.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
HTML
body {
background: blue;
color: black;
Margin:0;
padding:0;
}
CSS
console.log('hello world')
JS
console.log('hello world')
JS
console.log('hello world')
JS
p5.js
RiTa.js
Week 2- Activity
A basic p5.js sketch (code) involves two parts called setup() and draw()
The code inside of the {} brackets of setup runs once at the start of the sketch.
The code inside of the {} brackets of draw runs once every frame of the sketch over and over again. Kind of like a stop motion animation.
Coding Demo: Setup
Environment: online p5.js web editor
The creators of the p5.js library also created an online tool that allows you to quickly prototype websites using HTML, CSS, Javascript and p5.js.
We will use this tool as a coding environment.
Coding Demo: Test the editor
Coding Demo: Test the editor continued
Coding Demo: Open the markov example
Coding Demo: Code
Coding Demo: Code Breakdown
Coding Demo: Variables
let x = 40; (this line sets the variable called x equal to the number 40).
Coding Demo: Source.txt
The main thing you will be doing today is editing the source.txt file.
This is the source text that the markov chain is using. You can copy/paste the text you want to use in here. I recommend at least 1000 words for "good" results.
(the default text in this file is from this article written by Allison Parrish)
Downloading files from the p5 editor
File > Download
Unzip your file and upload the source.txt to discord.
Week 2 - Homework
Fortune Teller Made with random() instead of markov chains: https://editor.p5js.org/AaratiAkkapeddi/sketches/0QsnzOQo4