Class CofiCostFunction
Default Collaborative Filtering cost function.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:numl.Math.Functions.Cost
Assembly:numl.dll
Syntax
public class CofiCostFunction : CostFunction, ICostFunction
Properties
View SourceCollaborativeFeatures
Gets or sets the number of Collaborative Features.
Declaration
public int CollaborativeFeatures { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
R
Gets or Sets the R matrix where each cell indicates if a reference / rating exists (e.g. 1 or 0).
Declaration
public Matrix R { get; set; }
Property Value
| Type | Description |
|---|---|
| Matrix |
Methods
View SourceComputeCost(Vector)
Compute the error cost of the given Theta parameter for the training and label sets
Declaration
public override double ComputeCost(Vector theta)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | theta | Learning Theta parameters |
Returns
| Type | Description |
|---|---|
| System.Double |
Overrides
View SourceComputeGradient(Vector)
Compute the error cost of the given Theta parameter for the training and label sets
Declaration
public override Vector ComputeGradient(Vector theta)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector | theta | Learning Theta parameters |
Returns
| Type | Description |
|---|---|
| Vector |
Overrides
View SourceInitialize()
Initialization method for performing custom actions prior to being optimized.
Declaration
public override void Initialize()