Search:

# CWIS Developers Documentation

- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Recommender Class Reference

Inheritance diagram for Recommender:

[legend]
List of all members.

## Public Member Functions
| Recommender (&$DB, $ItemTableName, $RatingTableName, $ItemIdFieldName, $UserIdFieldName, $RatingFieldName, $ContentFields)
| DebugLevel ($Setting)
| Recommend ($UserId, $StartingResult=0, $NumberOfResults=10)
| AddResultFilterFunction ($FunctionName)
| NumberOfResults ()
| SearchTime ()
| GetSourceList ($UserId, $RecommendedItemId)
| FindSimilarItems ($ItemId, $FieldList=NULL)
| RecommendFieldValues ($ItemId, $FieldList=NULL)
| UpdateForItems ($StartingItemId, $NumberOfItems)
| UpdateForItem ($ItemId, $FullPass=FALSE)
| DropItem ($ItemId)
| PruneCorrelations ()
| LoadItemIds ()
| GetFieldData ($ItemId, $FieldName)
| CalculateContentCorrelation ($ItemIdA, $ItemIdB, $FieldList=NULL)
| UpdateContentCorrelation ($ItemIdA, $ItemIdB)
| NormalizeAndParseText ($Text)
| CalcTextCorrelation ($WordsA, $WordsB)
| ContentCorrelation ($ItemIdA, $ItemIdB, $NewCorrelation=-1)
| FilterOnSuppliedFunctions ($Results)
## Public Attributes
const | CONTENTFIELDTYPE_TEXT = 1
const | CONTENTFIELDTYPE_NUMERIC = 2
const | CONTENTFIELDTYPE_CONTROLLEDNAME = 3
const | CONTENTFIELDTYPE_DATE = 4
const | CONTENTFIELDTYPE_DATERAMGE = 5
| $ContentCorrelationThreshold
| $ContentFields
| $ItemTableName
| $RatingTableName
| $ItemIdFieldName
| $UserIdFieldName
| $RatingFieldName
| $ItemIds
| $DB
| $FilterFuncs
| $LastSearchTime
| $NumberOfResultsAvailable
| $DebugLevel

## Detailed Description

Definition at line 19 of file Recommender.php.

## Member Function Documentation

Recommender::AddResultFilterFunction | ( | $ | FunctionName | ) |

Definition at line 153 of file Recommender.php.

Recommender::CalcTextCorrelation | ( | $ | WordsA,
|  | $ | WordsB |
| ) |  |  |

Definition at line 686 of file Recommender.php.

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

Recommender::CalculateContentCorrelation | ( | $ | ItemIdA,
|  | $ | ItemIdB,
|  | $ | FieldList = `NULL` |
| ) |  |  |

Definition at line 504 of file Recommender.php.

References $ContentFields, CalcTextCorrelation(), CONTENTFIELDTYPE_CONTROLLEDNAME, CONTENTFIELDTYPE_TEXT, DebugLevel(), and GetFieldData().

Referenced by FindSimilarItems(), and UpdateContentCorrelation().

Here is the caller graph for this function:

Recommender::ContentCorrelation | ( | $ | ItemIdA,
|  | $ | ItemIdB,
|  | $ | NewCorrelation = `-1` |
| ) |  |  |

Definition at line 695 of file Recommender.php.

Referenced by UpdateContentCorrelation().

Here is the caller graph for this function:

Recommender::DebugLevel | ( | $ | Setting | ) |

Definition at line 53 of file Recommender.php.

Referenced by CalculateContentCorrelation(), FindSimilarItems(), Recommend(), Recommender(), RecommendFieldValues(), UpdateContentCorrelation(), UpdateForItem(), and UpdateForItems().

Here is the caller graph for this function:

Recommender::DropItem | ( | $ | ItemId | ) |

Definition at line 412 of file Recommender.php.

Recommender::FilterOnSuppliedFunctions | ( | $ | Results | ) |

Definition at line 747 of file Recommender.php.

Referenced by FindSimilarItems().

Here is the caller graph for this function:

Recommender::FindSimilarItems | ( | $ | ItemId,
|  | $ | FieldList = `NULL` |
| ) |  |  |

Definition at line 207 of file Recommender.php.

References CalculateContentCorrelation(), DebugLevel(), FilterOnSuppliedFunctions(), and LoadItemIds().

Referenced by RecommendFieldValues().

Here is the caller graph for this function:

Recommender::GetFieldData | ( | $ | ItemId,
|  | $ | FieldName |
| ) |  |  |

Definition at line 468 of file Recommender.php.

References NormalizeAndParseText().

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

Recommender::GetSourceList | ( | $ | UserId,
|  | $ | RecommendedItemId |
| ) |  |  |

Definition at line 172 of file Recommender.php.

Recommender::LoadItemIds | ( |  | ) |

Definition at line 452 of file Recommender.php.

Referenced by FindSimilarItems(), UpdateForItem(), and UpdateForItems().

Here is the caller graph for this function:

Recommender::NormalizeAndParseText | ( | $ | Text | ) |

Definition at line 594 of file Recommender.php.

Referenced by GetFieldData().

Here is the caller graph for this function:

Recommender::NumberOfResults | ( |  | ) |

Definition at line 160 of file Recommender.php.

Recommender::PruneCorrelations | ( |  | ) |

Definition at line 420 of file Recommender.php.

Recommender::Recommend | ( | $ | UserId,
|  | $ | StartingResult = `0`,
|  | $ | NumberOfResults = `10` |
| ) |  |  |

Definition at line 62 of file Recommender.php.

References $DB, and DebugLevel().

Recommender::Recommender | ( | &$ | DB,
|  | $ | ItemTableName,
|  | $ | RatingTableName,
|  | $ | ItemIdFieldName,
|  | $ | UserIdFieldName,
|  | $ | RatingFieldName,
|  | $ | ContentFields |
| ) |  |  |

Definition at line 30 of file Recommender.php.

References $ContentFields, $DB, $ItemIdFieldName, $ItemTableName, $RatingFieldName, $RatingTableName, $UserIdFieldName, and DebugLevel().

Referenced by SPTRecommender::SPTRecommender().

Here is the caller graph for this function:

Recommender::RecommendFieldValues | ( | $ | ItemId,
|  | $ | FieldList = `NULL` |
| ) |  |  |

Definition at line 255 of file Recommender.php.

References DebugLevel(), and FindSimilarItems().

Recommender::SearchTime | ( |  | ) |

Definition at line 166 of file Recommender.php.

Recommender::UpdateContentCorrelation | ( | $ | ItemIdA,
|  | $ | ItemIdB |
| ) |  |  |

Definition at line 580 of file Recommender.php.

References CalculateContentCorrelation(), ContentCorrelation(), and DebugLevel().

Referenced by UpdateForItem().

Here is the caller graph for this function:

Recommender::UpdateForItem | ( | $ | ItemId,
|  | $ | FullPass = `FALSE` |
| ) |  |  |

Definition at line 388 of file Recommender.php.

References $DB, DebugLevel(), LoadItemIds(), and UpdateContentCorrelation().

Referenced by UpdateForItems().

Here is the caller graph for this function:

Recommender::UpdateForItems | ( | $ | StartingItemId,
|  | $ | NumberOfItems |
| ) |  |  |

Definition at line 355 of file Recommender.php.

References DebugLevel(), LoadItemIds(), and UpdateForItem().

## Member Data Documentation

Recommender::$ContentCorrelationThreshold

Definition at line 437 of file Recommender.php.

Recommender::$ContentFields

Definition at line 438 of file Recommender.php.

Referenced by CalculateContentCorrelation(), and Recommender().

Recommender::$DB

Definition at line 445 of file Recommender.php.

Referenced by Recommend(), Recommender(), SPTRecommender::SPTRecommender(), and UpdateForItem().

Recommender::$DebugLevel

Definition at line 449 of file Recommender.php.

Recommender::$FilterFuncs

Definition at line 446 of file Recommender.php.

Recommender::$ItemIdFieldName

Definition at line 441 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender::SPTRecommender().

Recommender::$ItemIds

Definition at line 444 of file Recommender.php.

Recommender::$ItemTableName

Definition at line 439 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender::SPTRecommender().

Recommender::$LastSearchTime

Definition at line 447 of file Recommender.php.

Recommender::$NumberOfResultsAvailable

Definition at line 448 of file Recommender.php.

Recommender::$RatingFieldName

Definition at line 443 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender::SPTRecommender().

Recommender::$RatingTableName

Definition at line 440 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender::SPTRecommender().

Recommender::$UserIdFieldName

Definition at line 442 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender::SPTRecommender().

const Recommender::CONTENTFIELDTYPE_CONTROLLEDNAME = 3

Definition at line 25 of file Recommender.php.

Referenced by CalculateContentCorrelation().

const Recommender::CONTENTFIELDTYPE_DATE = 4

Definition at line 26 of file Recommender.php.

Referenced by SPTRecommender::SPTRecommender().

const Recommender::CONTENTFIELDTYPE_DATERAMGE = 5

Definition at line 27 of file Recommender.php.

const Recommender::CONTENTFIELDTYPE_NUMERIC = 2

Definition at line 24 of file Recommender.php.

Referenced by SPTRecommender::SPTRecommender().

const Recommender::CONTENTFIELDTYPE_TEXT = 1

Definition at line 23 of file Recommender.php.

Referenced by CalculateContentCorrelation(), and SPTRecommender::SPTRecommender().

The documentation for this class was generated from the following file:

- Recommender.php