In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the features of ML.NET 0.9. the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
ML.NET 0.9 was released last week, just over a month after the last release of version 0.8, and the new features include feature contribution calculation, model interpretability enhancements, GPU support for ONNX transformations, Visual Studio ML.NET project template previews, and API improvements.
Characteristic contribution calculation
Feature contribution calculation (Feature Contribution Calculation) shows which features have the most influence on the model prediction of data samples of a particular individual by determining the contribution of each feature to the model score.
When you are faced with many features in historical data and want to choose to use the most important features, feature contribution calculation is very important. Because the use of too many features (especially those that have no impact on the model) will reduce the performance and accuracy of the model. Therefore, using feature contribution calculation, you can identify the most influential positive and negative contributions from the original feature set.
Sample code:
/ / create feature contribution Calculator
/ / A calculation contribution to all the characteristics of the parameters of the existing training model
Var featureContributionCalculator = mlContext.Model.Explainability.FeatureContributionCalculation (model.Model, model.FeatureColumn, numPositiveContributions: 11, normalize: false)
/ / FeatureContributionCalculatingEstimator can be used as a step in a pipe
/ / the features saved by FeatureContributionCalculatingEstimator will be in the FeatureContribution column
Var pipeline = mlContext.Model.Explainability.FeatureContributionCalculation (model.Model, model.FeatureColumn, numPositiveContributions: 11) .append (mlContext.Regression.Trainers.OrdinaryLeastSquares (featureColumn: "FeatureContributions"))
The output results can be as follows:
The output of the above code is: Label Score BiggestFeature Value Weight Contribution 24.00 27.74 RoomsPerDwelling 6.58 98.55 39.95 21.60 23.85 RoomsPerDwelling 6.42 98.55 39.01 34.70 29.29 RoomsPerDwelling 7.19 98.55 43.65 33.40 27.17 RoomsPerDwelling 7.00 98.55 42.52 explanatory enhancements to feature selection models
In addition to feature contribution calculation, permutation feature importance (PFI) and generalized additive model (GAM) are also enhanced.
The importance of permutation features supports most learning tasks: regression, binary classification, multivariate classification and ranking.
Permutation feature importance allows you to calculate the confidence interval on the feature importance score so that you can get a better average estimate.
The generalized additive model supports feature contribution calculation so that you can quickly see which features drive individual predictions.
Add GPU support for ONNX conversion
The ability to run the ONNX model using CUDA 10.0 that activates GPU has been added in ML.NET 0.9 by integrating the high-performance ONNX runtime library. GPU support for the ONNX model is now available on Windows 64-bit systems, and Linux and Mac systems will be supported soon.
Preview of the new Visual Studio ML.NET project template
The Visual Studio project template now has a preview version that supports ML.NET. Download address
The template covers the following scenarios:
ML.NET console application
ML.NET model class library
Other API improvements to simplify text data loading
The list names that you need to display before ML.NET 0.9:
Var mlContext = new MLContext (); var reader = mlContext.Data.CreateTextReader (new [] {new TextLoader.Column ("IsOver50K", DataKind.BL, 0), new TextLoader.Column ("Workclass", DataKind.TX, 1)}, hasHeader: true); var dataView = reader.Read (dataPath)
Now you can use generics directly:
Var mlContext = new MLContext (); var dataView = mlContext.Data.ReadFromTextFile (dataPath, hasHeader: true); private class InspectedRow {[LoadColumn (0)] public bool IsOver50K {get; set;} [LoadColumn (1)] public string Workclass {get; set;} get the confidence factor
Through Calibrator Estimators, not only the score column can be obtained when evaluating the model quality, but also the confidence factor can be obtained.
For example, you can get the probability of each predicted value:
Score-0.458968 Probability 0.4670409Score-0.7022135 Probability 0.3912723Score 1.138822 Probability 0.8703266 New key-value matching Estimator and conversion
The new feature replaces TermLookupTransform and provides a new method of matching between specified values. You can specify the matching relationship between the key column and the value column, but make sure that the number of the two columns is the same.
Other improvements and changes
Allows ML.NET to run on Windows Nano containers and Windows machines without installing the Visual C++ runtime.
Provide metadata support in DataView constructors that contain model information, such as evaluation metrics encoded as metadata can be parsed through code, so that you can use any tool for visualization.
These are the features of ML.NET 0.9. the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.