Search:

# CWIS Developers Documentation

Public Member Functions | Public Attributes

# Recommender Class Reference

## 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 ()
| GetItemIds ()
| Retrieve all item IDs.
| 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

List of all members.

## Detailed Description

Definition at line 19 of file Recommender.php.

Inheritance diagram for Recommender:
[legend]

## Member Function Documentation

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

Definition at line 153 of file Recommender.php.

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

Definition at line 701 of file Recommender.php.

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

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

Definition at line 519 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 710 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 411 of file Recommender.php.

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

Definition at line 762 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 483 of file Recommender.php.

References NormalizeAndParseText().

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

Recommender::GetItemIds | ( | ) |

Retrieve all item IDs.

Returns:
  Array of item IDs.

Definition at line 437 of file Recommender.php.

References $ItemIds.

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

Definition at line 172 of file Recommender.php.

Recommender::LoadItemIds | ( | ) |

Definition at line 467 of file Recommender.php.

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

Here is the caller graph for this function:

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

Definition at line 609 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 419 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 595 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 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 452 of file Recommender.php.

Recommender::$ContentFields

Definition at line 453 of file Recommender.php.

Referenced by CalculateContentCorrelation(), and Recommender().

Recommender::$DB

Definition at line 460 of file Recommender.php.

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

Recommender::$DebugLevel

Definition at line 464 of file Recommender.php.

Recommender::$FilterFuncs

Definition at line 461 of file Recommender.php.

Recommender::$ItemIdFieldName

Definition at line 456 of file Recommender.php.

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

Recommender::$ItemIds

Definition at line 459 of file Recommender.php.

Referenced by GetItemIds().

Recommender::$ItemTableName

Definition at line 454 of file Recommender.php.

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

Recommender::$LastSearchTime

Definition at line 462 of file Recommender.php.

Recommender::$NumberOfResultsAvailable

Definition at line 463 of file Recommender.php.

Recommender::$RatingFieldName

Definition at line 458 of file Recommender.php.

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

Recommender::$RatingTableName

Definition at line 455 of file Recommender.php.

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

Recommender::$UserIdFieldName

Definition at line 457 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