a) Create a Case‐Based Reasoning System for recommending restaurants in Örebro based on properties of restaurants such as Restaurant Type (e.g. Gourmet, Traditional, Fast Food, Cafe, ...), Nationality (Swedish, Asian, Italian, Other,...), Quality Level, Price Level, Distance to University, ... Other properties may be the distance from university or city center, the number of main dishes or desserts on the menu, the noise or crowdedness level... You are free to decide with which properties you want to describe a restaurant. For creating such a system, you need to do the following steps:
Design data structures to store the cases in. A case hereby holds all information about one restaurant. You may want to use classes and instances or dictionaries. In addition you need to define a similarity function that takes two restaurant‐cases and returns a number between 0 and 1 that expresses how similar the two restaurants are. The higher the number, the more similar the cases are. Also create a function/method that prints a restaurant case in a form understandable for a user.
Define functions/methods to load and save cases in a CSV‐file (include a header line). The structure of a line in the file should be like:
For example the content of the file could look like:
Pasta la Vista;Take Away;Italian;2;1
to fill your case base from the file,
to add cases to your case base and
to write the case base into a file
and create a data set with at least 20 restaurant entries. If you do not know sufficiently many, look into [url removed, login to view] – we have a lot of restaurants in Örebro.
Use case‐based reasoning to create a function that takes an input from a user and returns and displays the case from the case base that is the most similar one:
Input can be done via the console with e.g. using “*” as a don’t care signal telling that this property is currently not important for the user. Create a query‐case from the user input and search for the most similar case in your data base. You may need to decide what to do with “don’t care” properties in the similarity function.
Return and display the most similar restaurant‐case as the recommendation to the user.
b) Use the functionality created in Task 2 – mainly loading restaurant data from a file, similarity functions – to analyze the restaurant scene in Örebro: Use k‐means clustering as given in the lecture on your restaurant data base.
The critical question hereby is how to calculate a centroid. While calculating the average for numeric properties (e.g. quality level or distance from university), the average for symbolic properties (e.g. nationality) is not clear? Try to find out what effect it has on the final clusters, to calculate the average in different ways: An option could be to simply ignore symbolic properties when calculating the average; another option is to set the value that is given most often in the cluster or third, you may also arrange all entries to numbers in some systematic way, e.g. from east to west in nationality and then calculate the average.
What do you find out about the restaurants in Örebro? Do we have a good distribution of all kinds of restaurants or are there only Fast‐Food Asian restaurants and expensive Italian ones? You need to show (print) the information about the clusters: So for each cluster show:
how many cases are in that cluster
Give the Centroid of that cluster
3 freelancerów złożyło ofertę na kwotę kr1197 do tego projektu
Hi, I'm working in machine learning field for last 1 year and I really like exploring this field. I've gone through the description, and I've the idea how to make it work. I'd like to discuss more on chat.