Using Computers to Understand (and control) Insects Eamonn Keogh Computer Science & Engineering...

Post on 24-Dec-2015

217 views 0 download

Tags:

Transcript of Using Computers to Understand (and control) Insects Eamonn Keogh Computer Science & Engineering...

Using Computers to Understand (and control) Insects

Eamonn KeoghComputer Science & Engineering Department

University of California - RiversideRiverside, CA 92521eamonn@cs.ucr.edu

ENGR 101

Outline II want to convince you that..

• There is more to computer science than just programming

• Computer science/engineering is incredibly fun and interesting

• Computer science/engineering can be your passport to work anywhere, do anything

Outline IIRough outline

• The Machine Learning Problem (AI)• Machine Learning applied to Malaria/Mosquitoes

Please interrupt me at any time with questions

I am going to show you some problems that were shown to pigeons!

Let us see if you are as smart as a pigeon!

I am going to show you some problems that were shown to pigeons!

Let us see if you are as smart as a pigeon!

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

Pigeon Problem 1

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

8 1.5

4.5 7

What class is this object?

What class is this object?

What about this one, A or B?

What about this one, A or B?

Pigeon Problem 1

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

8 1.5

This is a B!This is a B!Pigeon Problem 1

Here is the rule.If the left bar is smaller than the right bar, it is an A, otherwise it is a B.

Here is the rule.If the left bar is smaller than the right bar, it is an A, otherwise it is a B.

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

8 1.5

7 7

Even I know this oneEven I know this one

Pigeon Problem 2 Oh! This ones hard!

Oh! This ones hard!

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

7 7

Pigeon Problem 2

So this one is an A.So this one is an A.

The rule is as follows, if the two bars are equal sizes, it is an A. Otherwise it is a B.

The rule is as follows, if the two bars are equal sizes, it is an A. Otherwise it is a B.

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

6 6

Pigeon Problem 3

This one is really hard!What is this, A or B?

This one is really hard!What is this, A or B?

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

6 6

Pigeon Problem 3 It is a B!It is a B!

The rule is as follows, if the square of the sum of the two bars is less than or equal to 100, it is an A. Otherwise it is a B.

The rule is as follows, if the square of the sum of the two bars is less than or equal to 100, it is an A. Otherwise it is a B.

Worst game ever!

Why did we spend so much time with this game?

Worst game ever!

Why did we spend so much time with this game?

This game is an example of a classification problem, one of the most fundamental problems in Artificial Intelligence

This game is an example of a classification problem, one of the most fundamental problems in Artificial Intelligence

Examples of class AJapanese Names

Examples of class BGreek Names

Pigeon Problem XWhat kind of name is this:Japanese or Greek?

What kind of name is this:Japanese or Greek?AYANO

CHIKAKO

CHIYO

CHIYOKO

CHO CHOU

ETSUKO

ABDERUS

CHIYSES

CHARYBDIS

CEPHALUS

CALCHAS CADMUS

Examples of class A

Alan Turing

Examples of class B

Stan Laurel

Pigeon Problem YWho is this?Who is this?

Examples of class A

Loop

Examples of class B

Arch

Pigeon Problem ZWhat kind of fingerprint is this?

What kind of fingerprint is this?

Grasshoppers

KatydidsThe Classification Problem(informal definition)

Given a collection of annotated data.

(In this case five instances Katydids of and five of Grasshoppers)

Decide which class future unlabeled data belongs to.

Katydid or Grasshopper?

Solving the Classification Problem

How do human and other animals solve the classification problem? (for today, we don’t care)

How can we make computers solve the classification problem? This is called machine learning

The first step is a change of representation, a classic computer science trick

Examples of class A

3 4

1.5 5

6 8

2.5 5

Examples of class B

5 2.5

5 2

8 3

4.5 3

Pigeon Problem 1

We can plot the pigeon problems in 2D space

We can plot the pigeon problems in 2D space

Left

Bar

10

1 2 3 4 5 6 7 8 9 10

123456789

Right Bar

Examples of class A

4 4

5 5

6 6

3 3

Examples of class B

5 2.5

2 5

5 3

2.5 3

Pigeon Problem 2

Left

Bar

10

1 2 3 4 5 6 7 8 9 10

123456789

Right Bar

Let me look it up… here it is.. the rule is, if the two bars are equal sizes, it is an A. Otherwise it is a B.

Let me look it up… here it is.. the rule is, if the two bars are equal sizes, it is an A. Otherwise it is a B.

Examples of class A

4 4

1 5

6 3

3 7

Examples of class B

5 6

7 5

4 8

7 7

Pigeon Problem 3

Left

Bar

100

10 20 30 40 50 60 70 80 90 100

102030405060708090

Right Bar

The rule again:if the square of the sum of the two bars is less than or equal to 100, it is an A. Otherwise it is a B.

The rule again:if the square of the sum of the two bars is less than or equal to 100, it is an A. Otherwise it is a B.

Ante

nna

Len

gth

10

1 2 3 4 5 6 7 8 9 10

123456789

Grasshoppers Katydids

Abdomen Length

Simple Linear Classifier

If previously unseen instance above the linethen class is Katydidelse class is Grasshopper

KatydidsGrasshoppers

R.A. Fisher1890-1962

10

1 2 3 4 5 6 7 8 9 10

123456789

10

1 2 3 4 5 6 7 8 9 10

123456789

100

10 20 30 40 50 60 70 80 90 100

102030405060708090

10

1 2 3 4 5 6 7 8 9 10

123456789

Which of the “Pigeon Problems” can be solved by the Simple Linear Classifier?

1) Perfect2) Useless3) Pretty Good

Problems that can be solved by a linear classifier are called linearly separable.

Now that we understand what the classification problem is, and one way to solve it, let us switch gears for a while…

What is the Deadliest Animal?(not counting humans!)

What is the Deadliest Animal?

500+ per year

200+ per year10+ per year

300+ per year

1,000,000+ per year

50,000+ per year

What is the Deadliest Animal?

50,000+ per year500+ per year

200+ per year10+ per year

300+ per year

1,000,000+ per year

One penny weights about the same as one thousand mosquitoes

How can something so small be so deadly?

What is Malaria?• Malaria is a disease that involves high

fevers, shaking chills, joint pain, flu-like symptoms. In some cases it can produce coma and death.

• There are more than 225 million cases of malaria each year, killing around 1-million people.

Where does Malaria come from?

Malaria has been known since ancient times.

Many believed it came from “bad air” (Italian: mala aria, “bad air”)

500 years ago, a handful of people believed that insects might be involved in human diseases.

Hortus Sanitatis

(The Garden of Health) 1497

It was Sir Ronald Ross, an British army surgeon working in India, who proved in 1897 that malaria is transmitted by mosquitoes.

Sir Ronald Ross received the 1902 Nobel Prize for Physiology or Medicine for his work

(This was somewhat controversial, as many others made similar discoveries around the same time )

Malaria Parasites

1st Vector

Initial Human host Liver

infection

Blood infection

2nd Vector

Next Human host

Malaria Transmission Cycle

We get malaria from mosquitoes

We get malaria from

humans

• There are 3,528 kinds of mosquitoes• Only a handful of species take human blood• Only the females take human blood

• There are 100 trillion mosquitoes alive today

• Mosquitoes have been around for 100 million years

• We know this from fossil records/DNA studies

• Mosquitoes have spread malaria for at least 35 million years• We know this from insects found in amber

The Mosquito

Where does malaria cause problems?

www.worldmapper.org

Given that we have known for over one hundred years how Malaria is spread, where is the magic pill or immunization?

For a variety of reasons, a cure or immunization continues to alluded mankind.

However there are some interventions that can help

In the 20th century, smallpox killed 400 million people worldwide, it is now eradicated.

Polio is almost eradicated.

Interventions to Mitigate Malaria • The use of insecticidal treated mosquito nets• Spraying of insecticides (including controversial chemicals such as DDT)• Introduction of fish/turtles/crustaceans to eat mosquito larva• The introduction of dragonflies which eat adult mosquitoes. • Habitat reduction by draining ponds and pools• Use of chemical films to reduce the surface tension of water

(drowning the pupa).• .. and hundreds more proven or tentative ideas

Interventions Cost Money!

• Even cheap solutions have hidden costs• Insecticidal treated mosquito nets are cheap to

make, but…

• To make mosquito nets work, you need educators, incentive programs, maintenance etc

“...aid agencies and non-governmental organizations are quietly grappling with a problem: Data suggest that nearly half of Africans who have access to the nets refuse to sleep under them” (LA Times May-2-2010).

• We need to know where/when the problem is the greatest. Where are the insects? Which insects are they? When did they arrive?

• The classic solution? Use sticky traps– Inaccurate– Costly– Long time lag

Planning interventions requires knowledge

My Work at UCR

• I believe that we can count and classify insects with sensors. The classification problem– Must be cheap– Must be low powered – Must be accurate

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5x 104-0.2

-0.1

0

0.1

0.2

One second of audio from our sensor. The Common Eastern Bumble Bee (Bombus impatiens) takes about one tenth of a second to pass the laser.

Background noise Bee begins to cross laser Bee has past though the laser

UCR Wingbeat Sensor

10

1 2 3 4 5 6 7 8 9 10

123456789

Bees

Mosquitos

0 0.5 1 1.5

0 0.5 1 1.5

0 0.5 1 1.5

0 0.5 1 1.5

0 0.5 1 1.5

0 0.5 1 1.5

10

1 2 3 4 5 6 7 8 9 10

123456789

Bees

Mosquitos

10

1 2 3 4 5 6 7 8 9 10

123456789

Bees

Mosquitos

0 0.5 1 1.5 2

17Bee count

21Mosquito count

2134Housefly count

17Bee count

21Mosquito count

2134Housefly count

Spay the dark red areas at dusk

TimeStamp 12:23:23Probability of: Bee - 0.96Probability of: Housefly - 0.03Probability of: Other - 0.01TimeStamp 12:27:11Probability of: Bee - 0.99:::

Using Pesticides Intelligently

If we are not sure where the insects are…

If we know where the insects are…

High cost (fuel/pesticide)Damage to environment

Low costLittle damage to environment

You won 10000KCongratulations! You won the Nigerian lottery!Please send me your name and more than four hours!

Upcoming dentist appDear EamonnDon’t forget your dentist appoint Many thanks, joe

here's we hue opposings and ents thers that fled of the undispriz'd coward to sufferLose Weight Now!

here's we hue opposings and ents thers that fled of the undispriz'd coward to suffer

Make money fast!here's we hue opposings and ents thers that fled of the undispriz'd coward to suffer

Upcoming dentist appDear EamonnDon’t forget your dentist appoint next Wednesday the 17

Upcoming dentist appDear EamonnDon’t forget your dentist appoint next Wednesday the 17

You won 10000KCongratulations! You won the Nigerian lottery!Please send me your name and address

Spam Filter

Spam Folder Email Folder

The holy grail of computational

entomology

With a single click of a button, we can take action on our emails/spam.

We can delete, forward, save them etc

17Bee count

21Mosquito count

2134Housefly count

Can we do this with insects?

Can we “delete” mosquitoes(Kill them)

Can we “forward” bees(Make them go North and pollinate almonds etc)

The holy grail of computational

entomology

Controlling Insects with Computers

Insect cyborgs are cool, but not the answer.

We need to be able to control insects at a cost of say 1,000,000 insects per penny.

Controlling Insects with Computers

We already control some insects with technology/computers

We are exploiting the fact that moths evolved without artificial lights.

What else can we exploit?

What else can we exploit?

Now we..

• understand what the classification problem is

• have seen how to solve it with the linear classifier

• have seen how it can be applied to a real problem

I hope I have convinced you that

• There is more to computer science than just programming

• Computer science/engineering is incredibly fun and interesting

• Computer science/engineering can be your passport to work anywhere, do anything

Eamonn KeoghComputer Science & Engineering Department

University of California - RiversideRiverside, CA 92521eamonn@cs.ucr.edu