UncenteredCosineSimilarity ClassNReco.Recommender Class Library
An implementation of the cosine similarity. The result is the cosine of the angle formed between the two preference vectors.
Inheritance Hierarchy

System Object
  NReco.CF.Taste.Impl.Similarity AbstractItemSimilarity
    NReco.CF.Taste.Impl.Similarity AbstractSimilarity
      NReco.CF.Taste.Impl.Similarity UncenteredCosineSimilarity

Namespace: NReco.CF.Taste.Impl.Similarity
Assembly: NReco.Recommender (in NReco.Recommender.dll) Version: (

public sealed class UncenteredCosineSimilarity : AbstractSimilarity

The UncenteredCosineSimilarity type exposes the following members.


Public methodUncenteredCosineSimilarity(IDataModel)
Initializes a new instance of the UncenteredCosineSimilarity class
Public methodUncenteredCosineSimilarity(IDataModel, Weighting)
Initializes a new instance of the UncenteredCosineSimilarity class

Public methodAllSimilarItemIDs (Inherited from AbstractItemSimilarity.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodItemSimilarities (Inherited from AbstractSimilarity.)
Public methodItemSimilarity (Inherited from AbstractSimilarity.)
Public methodRefresh (Inherited from AbstractSimilarity.)
Public methodSetPreferenceInferrer (Inherited from AbstractSimilarity.)
Public methodToString (Inherited from AbstractSimilarity.)
Public methodUserSimilarity (Inherited from AbstractSimilarity.)

Note that this similarity does not "center" its data, shifts the user's preference values so that each of their means is 0. For this behavior, use {@link PearsonCorrelationSimilarity}, which actually is mathematically equivalent for centered data.
See Also