HELP FOR DEVELOPING CBR APPLICATIONS

Steps in developing CBR application are as follows


1. Create application directory
2. Set up user roles and access rights
3. Load applications
4. Defining menus and lists
5. Defining global variables
6. Defining case schema configuration
7. Creating Forms
8. Set up database connection
9. Defining Query
10. Linking variables to fields
11. Writing rules
12. Creating templates


CREATE APPLICATION DIRECTORY        Top

Application directory  is required to store web pages and XML files. All web pages would be referred from this directory.
1. Click on Login interface of the iken Studio.
2. Login page will appear
    a) Enter super user ID and Password:
    b) Then click on Login button. (After successfully login Ok message will appear).


3) Open system configuration interface and add ‘MobileSearch’ as a new application in ‘Application Groups’. 



4) Select newly added application from combo list and click on Create Directory button which will create application directory (e.g MobileSearch)
5) Similarly add “MobileSearch” as a new variable Group in ‘Variable Groups’.                                                             
6) Click on Link to Above Application button. Be sure that same Application Group is selected before linking Variable Group.




7) Click on Save to file, if ‘MobileSearch’ application and ‘MobileSearch’ Variable Group is successfully added.


SET UP DATABASE CONNECTION        Top

1. Open database connection setup interface of iKen Studio.
2. Enter ‘MobileSearch’ as a new database Id and click on Add button (System password needs to be entered).


3. Create a connection string and test connection:
    a. Select newly added (MobileSearch) database ID from Database ID combo list.
    b. Select database file (in case of MS Access database) by clicking on Get From Browse button.



    
    c. After selecting database filename, click on create connection string button which will create connection string. Then click on Connect button        (password needs to be entered), you will get the message connection opened successfully as shown in fig. below 

4. Click on Save to File Button to save connection setting

 


SET UP USER ROLES AND ACCESS RIGHTS        Top

Go to the ‘Access Rights and Roles’ Interface of iKen Studio.
1) Select appropriate Role ID from Role ID option. Multiple roles can be selected.
2) Select ‘MobileSearch’ from available applications & click on Add From the List.
3) Select ‘MobileSearch’ from available Variable groups & click on Add From List button.
4) Select ‘MobileSearch’ from available databases & Click on Add From List button (First database ID 'Mobilesearch' must be created using database connection setup. see procedure to set up database connection).




LOAD APPLICATIONS         Top

1. Load application interface used to load the applications.
2. Select all required applications to be loaded and then click on Load Selected button.



CREATING MENUS AND LISTS        Top

Menus and List interface is used to add all menus required for the application. In “MobileSearch” application required menus are like Company, YesNo, CutOffOptions, Fueltype etc. Procedure for creating new menu (e,g. YesNo) is as follows:

1. Open Menu and Lists Interface. Select application from Selected Application Group for which menus are to be added (e.g. MobileSearch).
2. Enter new menu name YesNo and click on Add button.
3. To add options for newly added menu select that menu from Selected Menu option.
4. For adding option to selected menu type option and click on Add button. e.g. To add Yes and No option for YesNO menu First type Yes and click on Add button then type No and click on Add button.



CREATING GLOBAL VARIABLES        Top

Global Variables interface is used to create global variables required for the application. Global variables are mainly used to get user input, call particular form or report, store temporary results, etc. In case of  ”MobileSearch” application Input Global variables are required to get user requirements on evaluation parameters like Company, Price, Flash, MMS, Alarm, FMRadio, VedeoRecorder, etc. For each application there is one final goal, we prefer to define this goal variable as Final_Goal. After creating global variables link appropriate menus, forms, and reports to it.
Example of linking Menus to Variable
Linking YesNo menu to Global Variable Flash



Example of linking Forms to Variables
 Link SearchReport form to ShowForm Variable (Type of the ShowForm Variable must be Goal)



Similarly you can link Reports to Variable by selecting appropriate Report ID from Report/View Options block of Global Variable Interface.
Note: Forms and Reports must be created before linking it to Global Variable.


 

DEFINING CASE SCHEMA CONFIGURATION        Top

Case Based Reasoning Configuration interface is used to define case schema for CBR application. Case schema is collection of features (e.g. Key, Index, Solution, and output). Key features are used to calculate similarity of each case stored in case base. Similarity measure must be defined for each key feature used in case schema. Example of how to configure Case Schema for ”MobileSearch” application is given and highlighted in the fig. below.
1. Open Case-based Reasoning configuration interface and select ”MobileSearch” application
2. Enter new case name (e.g. MobileSearch_Case) and click on Add Case button
3. Select newly added case name from Case IDs combo list
4. Select variable from variables combo list which you want to consider as key or output or solution feature in MobileSearch_Case Case Schema and click on Add button. It will add selected variable in selected features combo list.
5. Select feature from selected feature combo list and select feature type
6. If feature is Key feature then you need to define similarity measure and its importance i.e. weight



In CBR cut off and importance for each feature can be set at design time or at rune time. If we want to set it at run time then we need to define corresponding weight and cut off variable for each feature. If case schema consists of 100 features then we need to define 100 weight and 100 cut off variables. Instead of defining these variables one by one we can create those variables in single click as follows (highlighted in Fig. below):

1. Open Global variable interface and select ”MobileSearch” application
2. Select Goal variable of the CBR application (In MobileSearch application it is Final_Goal)
3. Go to the bottom of the screen i.e. System integration block of the global variable interface
4. Select Case Schema Set as MobileSearch.MobileSearch_Case and click on create Weight/CuttOff Variables. This will create weight and cutoff variable for all features used in MobileSearch_Case case schema. If Flash is one of the Key features then it will create Wt_Flash and CutOff_Flash variables. This will also create CBRParameters menu automatically for ”MobileSearch” application.
Note: Before creating weight and cutoff variables, CutOffOptions menu must be created otherwise later we have to link this menu to cutoff variable explicitly.





CREATING FORMS        Top

Form designer interface is used to create Forms. In CBR application Forms are mainly used to gather user requirements. For example in case of ”MobileSearch” application we use form to gather user requirements such as what feature He/She wants in the new mobile to be purchased. E.g. Alarm facility - Yes or No FMRadio Feature – Yes or No.
Example of how to create Form for MobileSearch application is given below:
1. Open Form Designer interface and select ”MobileSearch” application
2. Enter new form ID (e.g. SearchReport) and click on Add button. This will add new Form in Form ID combo list
3. Select newly added form from Form ID combo list
4. Give html form name (e.g SearchReport.htm) and select yes as group form option and click on Update button
5. Open CBR configuration interface and select ”MobileSearch” application
6. Select MobileSearch_Case case schema from Case Ids combo list
7. Click on Copy Table button
8. Open Form Designer interface, select ”MobileSearch” application and SearchReport form added in step 2
9. Enter new table (e.g. Main) and click on Paste button. This will create and add table automatically in the selected form.



10. Click on Preview button to see the preview of the form. The newly created form for ”MobileSearch” application looks as shown in fig. below.

11. Click on Update button
12. Click on Save to file button


DEFINING QUERY         Top

Database access configuration interface is used to define CBR query.
Example of how to define query for  MobileSearch application is explained below:
1. Open database access configuration interface and make sure following options are selected
Role ID – Branch Manager
variable group - MobileSearch
goal variable - Final_Goal
Interface option – CBR
System/Query ID – MobileSearch.MobileSearch_Case
Selected database - MobileSearch



2. Click on Build Query button which will open SQL query builder interface Select Database ID – MobileSearch
a) Select Mobile table from available tables list and click on Add button. This will add Mobiles table in selected tables list
b) Select required fields form fields list and click on Insert Field button which will add the field in selected fields box. All fields should be separated by comma. If we want to select all fields then use * in selected fields box.
c) Use where, group by, having and order by clause if required.
d) Test query result by clicking on Execute Select Query button
e) Click on OK button. This will close SQL query builder interface and take you back to the data access configuration interface.



3. Click on Add Query (at seq no) button and then on update query button of data access configuration interface.




DATABASE VARIABLE LINKING        Top

Database variable linking interface is used to map/link global variables to Fields in the database table. This mapping is essential to retrieve database values to global variables which are used to display results to the user. In case of CBR application final result is most matching cases with similarity score. Example of how to link variables to the fields in the database table is given below.
1. Open Database Variable Linking  interface
2. Select MobileSearch Database
3. Select variable to be linked to the field in the database table
4. Select table name
5. Select field name to which variable is to be linked
6. Click on Add button from Read only link block (in case of update transaction linking should be done in update link block)
7. Click on Save to File button




WRITING RULES        Top
Rule interface is used to write the rules. In CBR rules are written to gather user requirements e.g user requirements of Mobile Phone in case of ”MobileSearch” application. Knowledge of Expert system (RBR) is required to write rules. Example of rule written for CBR application is shown below. Only one rule is written for ”MobileSearch” application to control input parameters.
1. Open rule editor interface
2. Select ”MobileSearch” application
3. Write if and then part of the rule and click on Append at Last button which will add the rule at the first position in case of first rule otherwise rule will be added at the last.
4. Click on Save to File button to save the rules




CREATING TEMPLATES        Top

Rule editor interface is used to create templates (web pages). Procedure to create templates is as follows
1. Open rule editor interface
2. Select application e.g. MobileSearch
3. Select Variable group
4. Select Variable for which template is to be created
5. Click on Create Web Page Button. This will create template for selected variable only. If you want to create web pages for all variables in selected variable group then click on Create Web Pages for Var Group button.
Note: Before creating web pages for any variable group you need to copy generic_template file into application directory and click on Create Generic Template button which will create templates (e.g. template.htm, welcome.htm, form_template.htm) that are must for every application. Generic templates need to be created only once.