Search Results for

    Show / Hide Table of Contents

    Class RoundingStarRatingInfo

    An implementation of IStarRatingInfo<TRating> which converts floating-point ratings to star ratings by rounding.

    Inheritance
    Object
    RoundingStarRatingInfo
    Implements
    IStarRatingInfo<Double>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Learners
    Assembly: Microsoft.ML.Probabilistic.Learners.dll
    Syntax
    public class RoundingStarRatingInfo : IStarRatingInfo<double>

    Constructors

    RoundingStarRatingInfo(Int32, Int32)

    Initializes a new instance of the RoundingStarRatingInfo class.

    Declaration
    public RoundingStarRatingInfo(int minRating, int maxRating)
    Parameters
    Type Name Description
    Int32 minRating

    The minimum star rating.

    Int32 maxRating

    The maximum star rating.

    Properties

    MaxStarRating

    Gets the maximum possible star rating.

    Declaration
    public int MaxStarRating { get; }
    Property Value
    Type Description
    Int32

    MinStarRating

    Gets the minimum possible star rating.

    Declaration
    public int MinStarRating { get; }
    Property Value
    Type Description
    Int32

    Methods

    ToStarRating(Double)

    Converts a floating-point rating to a star rating by rounding to the nearest integer.

    Declaration
    public int ToStarRating(double rating)
    Parameters
    Type Name Description
    Double rating

    The floating-point rating.

    Returns
    Type Description
    Int32

    The rounded star rating.

    Implements

    IStarRatingInfo<TRating>
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.