The User uses (i.e. coding) provides generates Output data The WebValley Team Input data • So a Program: • asks the user for some input data • makes some computations • returns a value or a series of values passed to Programming Language to create
A: Programming language • Q: What is a program? • A: A program is a software that resolves a particular task/problem • Key Components: • User • Input data • Output data • (soon) Algorithm!
• We will implement an innovative Pokémon Search Engine • iow, our software program will look for the K top Pokémon that are most similar to some input Pokémon characteristics (i.e. the search query) • The search query (i.e. input data to our program) will be some characteristics (numbers) denoting a Pokémon
similar to the search query” ? • Q: What kind of data can a user provide to our program ? • Q: (once we’ve clari f ied this) what are the instructions to actually solve the problem? • The problem is: “(somehow) determine what Pokémons are most similar to a speci f ied set of characteristics denoting a Pokémon provided by the user.” • There's a lot of ambiguity in what we just said
software • Input Data (search query given by the user). A series of numbers representing a Pokémon: • HP (Hit Points) • Speed • Attack • Defense • Special Attack • Special Defence • The search query then will be a series of numbers • Based on those numbers, the program will return (output data) A list of K Pokémons • K is a parameter of the algorithm
small sub-problems (i.e. Tasks) • For example: Problem: “start from a bunch of numbers and extract K Pokémons according to certain similarity measure” • What will our algorithm do? • Search for the K Pokèmon with the highest “similarity” • Breakdown into Tasks • Compare the data inserted by the user and those of existing Pokémon • Generalisation -> compare any pair of Pokémon • Sort the results of the comparison • Return the top K
for Pokémon data and store them accordingly • Task 2: • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
for Pokémon data and store them accordingly • Task 2: • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
user for Pokémon data and store them accordingly • Task 2: • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
to compare two series of numbers? • A Pokémon with these scores (user's inputs) should be compared with all the other existing Pokémons • So.. time to acquire some Pokémon Data • CSV f ile (Comma Separated Values) with all data from all generations of Pokemon • Task 2.a.1: Read and Store Pokémon Data
user for Pokémon data and store them accordingly • Task 2: • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
user for Pokémon data and store them accordingly • Task 2: • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
user for Pokémon data and store them accordingly • Task 2: • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
39 45 58 60 80 Bulbasaur Ivysaur Venusaur Chameleon Chameleon Charizard • What function to get a similarity degree? • Hypothesis: let's start from just 1 feature (e.g., hit points)
(attack) • We still have to compute a distance • In this case we calculate the distance on a 2D plane 40 53 65 78 90 30 43 55 68 80 54, 55 78, 84 58, 64 39, 52 80, 82 60, 62 45, 49
user for Pokémon data and store them accordingly • Task 2: • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
user for Pokémon data and store them accordingly • Task 2: • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)
user for Pokémon data and store them accordingly • Task 2: ✅ • (+1) Read all Pokémon data and store accordingly • De f ine the Pokémon Similarity Function • Compute similarity between the search query and existing Pokémon • Return the top K most similar Pokémon • Task 3: • Return and Show algorithm’s output • (what will be the algorithm output?)