Generic Instance Method

getSimilarItems(fromItems:maxCount:)

Returns the top ranked similar items based on the model’s similarity type.

Declaration

func getSimilarItems<T>(fromItems: MLDataColumn<T>, maxCount: Int = 10) throws -> MLDataTable where T : MLDataValueConvertible

Parameters

fromItems

A column of item identifiers.

maxCount

The maximum number of similar items per item in the fromItems column. The default is 10.

See Also

Testing a Recommender

func recommendations<T>(fromUsers: MLDataColumn<T>, maxCount: Int, restrictingToItems: MLDataColumn<T>?, excluding: MLDataTable?, excludingObserved: Bool) -> MLDataTable

Retrieves the highest scored items for the given column of users, based on item similarity and the rating column.

func recommendations(fromUsers: [MLIdentifier], maxCount: Int, restrictingToItems: [MLIdentifier]?, excluding: MLDataTable?, excludingObserved: Bool) -> MLDataTable

Retrieves the highest scored item for the given array of users, based on item similarity and the rating column.

protocol MLIdentifier

A type the Create ML framework can use as a machine learning identifier.

func getSimilarItems(fromItems: [MLIdentifier], maxCount: Int) -> MLDataTable

Returns the top ranked similar items based on the model’s similarity type.