コード例 #1
0
 /// <summary>
 /// Convert to variable array of floats.
 /// </summary>
 /// <param name="input">The input column.</param>
 /// <returns >Column with variable array of floats.</returns>
 public static VarVector <float> ToFloat(this VarVector <ushort> input) => new ImplVarVector <ushort>(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4);
コード例 #2
0
 public IidSpikeEstimator(IHostEnvironment env, IidSpikeDetector.Arguments args)
     : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidSpikeEstimator)), new IidSpikeDetector(env, args))
 {
 }
コード例 #3
0
 // Do not edit this file directly. Rather, it is generated out of ConvertStaticExtensions.tt.
 #region For string inputs.
 /// <summary>
 /// Convert to float.
 /// </summary>
 /// <param name="input">The input column.</param>
 /// <returns >Float column.</returns>
 public static Scalar <float> ToFloat(this Scalar <string> input) => new ImplScalar <string>(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4);
コード例 #4
0
 /// <summary>
 /// Feature Contribution Calculation computes model-specific contribution scores for each feature.
 /// Note that this functionality is not supported by all the models. See <see cref="FeatureContributionCalculatingTransformer"/> for a list of the suported models.
 /// </summary>
 /// <param name="env">The environment to use.</param>
 /// <param name="modelParameters">Trained model parameters that support Feature Contribution Calculation and which will be used for scoring.</param>
 /// <param name="featureColumn">The name of the feature column that will be used as input.</param>
 /// <param name="numPositiveContributions">The number of positive contributions to report, sorted from highest magnitude to lowest magnitude.
 /// Note that if there are fewer features with positive contributions than <paramref name="numPositiveContributions"/>, the rest will be returned as zeros.</param>
 /// <param name="numNegativeContributions">The number of negative contributions to report, sorted from highest magnitude to lowest magnitude.
 /// Note that if there are fewer features with negative contributions than <paramref name="numNegativeContributions"/>, the rest will be returned as zeros.</param>
 /// <param name="normalize">Whether the feature contributions should be normalized to the [-1, 1] interval.</param>
 internal FeatureContributionCalculatingTransformer(IHostEnvironment env, ICalculateFeatureContribution modelParameters,
                                                    string featureColumn         = DefaultColumnNames.Features,
                                                    int numPositiveContributions = FeatureContributionCalculatingEstimator.Defaults.NumPositiveContributions,
                                                    int numNegativeContributions = FeatureContributionCalculatingEstimator.Defaults.NumNegativeContributions,
                                                    bool normalize = FeatureContributionCalculatingEstimator.Defaults.Normalize)
     : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(FeatureContributionCalculatingTransformer)), new[] { (name: DefaultColumnNames.FeatureContributions, source: featureColumn) })