Skip to content

MatrixFactorization construction parameters are not consistent with other learners #1826

Closed
@singlis

Description

@singlis

The ordering of parameters for the Matrix Factorization constructor is inconsistent with other trainers, specifically the Label column should be first before the matrixColumnIndex and matrixRowIndex as the matrixColumnIndex and matrixRowIndex are the feature columns:

        /// <summary>
        /// Initializing a new instance of <see cref="MatrixFactorizationTrainer"/>.
        /// </summary>
        /// <param name="env">The private instance of <see cref="IHostEnvironment"/>.</param>
        /// <param name="matrixColumnIndexColumnName">The name of the column hosting the matrix's column IDs.</param>
        /// <param name="matrixRowIndexColumnName">The name of the column hosting the matrix's row IDs.</param>
        /// <param name="labelColumn">The name of the label column.</param>
        /// <param name="advancedSettings">A delegate to apply all the advanced arguments to the algorithm.</param>
        public MatrixFactorizationTrainer(IHostEnvironment env,
            string matrixColumnIndexColumnName,
            string matrixRowIndexColumnName,
            string labelColumn = DefaultColumnNames.Label,
            Action<Arguments> advancedSettings = null)
            : base(env, LoadNameValue)

Where other trainers have the label column argument followed by feature column:

 public static SdcaBinaryTrainer StochasticDualCoordinateAscent(
                this BinaryClassificationContext.BinaryClassificationTrainers ctx,
                string labelColumn = DefaultColumnNames.Label,
                string featureColumn = DefaultColumnNames.Features,
                string weights = null,
...)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions