Constructor
new AppRecom(debug)
Instantiate an AppRecom object for training and fetching recommendations.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
debug |
Boolean | false | option for console log debugging |
- Source:
Methods
getApps(locationCategory)
Retrieves app category recommendations that best fit this location as an array.
Parameters:
Name | Type | Description |
---|---|---|
locationCategory |
String | the category of the location (e.g. 'cafe') |
- Source:
train(data, min_support, min_conf, test_ratio)
Train the recommender against a data set. Entries in the data array look like:
{pname: "Place Name", pcat: "Place Category", aname: "App Name", acat: "App Category"}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
data |
Array.<Object> | data to find association rules on. | |
min_support |
Decimal | 0.02 | the minimum support percentage for an itemset (0.0 - 1.0) |
min_conf |
Decimal | 0.8 | the minimum confidence percentage for a rule (0.0 - 1.0) |
test_ratio |
Number | 0.8 | ratio of training data to test data (0.0 - 1.0) |
- Source:
Returns:
rules