BIS 2040 Home Page The Next Page The Next Page The Next Page
Middlesex Logo

Workshop 8 - Using Caspian to develop a novel CBR system

The purpose of this workshop is to

As we're using Caspian, you are going to have to find a Caspian (CASL) file. You can start with Chef2 and get rid of all but the core, or you can look at:

This file has one field (age) that the case base uses to index. It has three cases, one for each of the age values. Unfortunately, Caspian needs to agree on the Index field, so you can try this and should be able to retrieve each of the cases.

Add another field, number_in_family. Add it in the case definition as:field number_in_family type is number; This is not an enumerated type, but is of course a number: type is X is used to specify the type of the field. Also add a number_in_family to each of the cases.

If you run the system again, you'll still get the three cases no matter what you put in.

Add a new case for middle_aged people with 3 people in the family. Give them a Volvo, and make sure Bob_Porsche has just 1.

Now if you search for middle-aged, and have 3 people you get the Volvo, and any other number of people you get the Porsche. The reason is that Caspian by default only uses exact matches. To fix this you need to add:field number_in_family similar range 3 to 6; Now if you want to try with 5 people, you get a Volvo. You can also add a range for small families, say 1 to 2.

Now add an income field and an income to all of the cases. (You can omit it for the yugo and cadillac, because we don't really care below.) Give the Volvo 30000, and the Porsche 40000.

Exact matches always win, but a person with 5 family members making 39999 still gets a Volvo. We can make some similarity bins to fix this. Say ranges from 20-35000 and from 35000 to 80000. This fixes the above problem, but not the reverse (when someone makes 29999, because a person matches 1 of each criterion. How do you decide which is more important. Let's say money is more important. This can be fixed by modifying the field entry to:field income type is number weight is 2;This makes this more important, though age is still necessary to match.

Now, add another case where an old, rich person gets a yugo. How does this effect the system? Can you add other features? You can also do some case manipulation once you've retrieved the answer.