同步操作将从 Gitee 极速下载/ML.NET 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// Licensed to the .NET Foundation under one or more agreements.// The .NET Foundation licenses this file to you under the MIT license.// See the LICENSE file in the project root for more information.using Microsoft.ML.Data;using Microsoft.ML.Runtime;using Microsoft.ML.Transforms;namespace Microsoft.ML{/// <summary>/// Class used to create instances of preview objects for debugging./// Note: this class and all methods should only be used for debugging and not in production code./// </summary>public static class DebuggerExtensions{/// <summary>/// Extract a 'head' of the data view in a view that is convenient to debug./// </summary>/// <param name="data">The data view to preview</param>/// <param name="maxRows">Maximum number of rows to pull</param>public static DataDebuggerPreview Preview(this IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows)=> new DataDebuggerPreview(data, maxRows);/// <summary>/// Preview an effect of the <paramref name="transformer"/> on a given <paramref name="data"/>./// </summary>/// <param name="transformer">The transformer which effect we are previewing</param>/// <param name="data">The data view to use for preview</param>/// <param name="maxRows">Maximum number of rows to pull</param>public static DataDebuggerPreview Preview(this ITransformer transformer, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows)=> new DataDebuggerPreview(transformer.Transform(data), maxRows);/// <summary>/// Preview an effect of the <paramref name="estimator"/> on a given <paramref name="data"/>./// </summary>/// <param name="estimator">The estimnator which effect we are previewing</param>/// <param name="data">The data view to use for preview</param>/// <param name="maxRows">Maximum number of rows to show in preview</param>/// <param name="maxTrainingRows">Maximum number of rows to fit the estimator</param>public static DataDebuggerPreview Preview(this IEstimator<ITransformer> estimator, IDataView data, int maxRows = DataDebuggerPreview.Defaults.MaxRows,int maxTrainingRows = DataDebuggerPreview.Defaults.MaxRows){Contracts.CheckValue(estimator, nameof(estimator));Contracts.CheckValue(data, nameof(data));Contracts.CheckParam(maxRows >= 0, nameof(maxRows));Contracts.CheckParam(maxTrainingRows >= 0, nameof(maxTrainingRows));var env = new LocalEnvironment();var trainData = SkipTakeFilter.Create(env, new SkipTakeFilter.TakeOptions { Count = maxTrainingRows }, data);return new DataDebuggerPreview(estimator.Fit(trainData).Transform(data), maxRows);}/// <summary>/// Preview an effect of the <paramref name="loader"/> on a given <paramref name="source"/>./// </summary>/// <param name="loader">The data loader to preview</param>/// <param name="source">The source to pull the data from</param>/// <param name="maxRows">Maximum number of rows to pull</param>public static DataDebuggerPreview Preview<TSource>(this IDataLoader<TSource> loader, TSource source, int maxRows = DataDebuggerPreview.Defaults.MaxRows)=> new DataDebuggerPreview(loader.Load(source), maxRows);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。