module binaries.maml_helper

Short summary

module csharpyml.binaries.maml_helper

Implements function around ML.net command line.

source on GitHub

Functions

function truncated documentation
get_help Returns short documentation on one transform or learner.
get_learners_list Returns the list of learners as a unique strings to display.
get_maml_helper Returns the MamlHelper.
get_mlnet_assemblies Makes the list required dependencies to run a C# script using ML.net.
get_transforms_list Returns the list of transforms as a unique strings to display.
maml Runs a maml script through ML.net.
mlnet Compiles a C# function using ML.net. It automatically adds the necessary dependencies including …

Documentation

Implements function around ML.net command line.

source on GitHub

csharpyml.binaries.maml_helper.get_help(cl)[source]

Returns short documentation on one transform or learner.

Parameters:cl – transform or learner name
Returns:string

<<<

from csharpyml.binaries import get_help
print(get_help("lr"))

>>>

    Help for BinaryClassifierTrainer, Trainer, FeatureScorerTrainer: 'LogisticRegression'
      Aliases: lr, logisticregressionwrapper
    Summary:
       Logistic Regression is a method in statistics used to predict the probability
       of occurrence of an event and can be used as a classification algorithm. The
       algorithm predicts the probability of occurrence of an event by fitting data
       to a logistical function.
    showTrainingStats=[+|-]             Show statistics of training examples.
                                        Default value:'-' (short form stat)
    l2Weight=<float>                    L2 regularization weight Default value:'1'
                                        (short form l2)
    l1Weight=<float>                    L1 regularization weight Default value:'1'
                                        (short form l1)
    optTol=<float>                      Tolerance parameter for optimization
                                        convergence. Lower = slower, more accurate
                                        Default value:'1E-07' (short form ot)
    memorySize=<int>                    Memory size for L-BFGS. Lower=faster, less
                                        accurate Default value:'20' (short form m)
    maxIterations=<int>                 Maximum iterations. Default
                                        value:'2147483647' (short form maxiter)
    sgdInitializationTolerance=<float>  Run SGD to initialize LR weights,
                                        converging to this tolerance Default
                                        value:'0' (short form sgd)
    quiet=[+|-]                         If set to true, produce no output during
                                        training. Default value:'-' (short form q)
    initWtsDiameter=<float>             Init weights diameter Default value:'0'
                                        (short form initwts)
    numThreads=<int>                    Number of threads (short form nt)
    denseOptimizer=[+|-]                Force densification of the
                                        /*internal*/public optimization vectors
                                        Default value:'-' (short form do)
    enforceNonNegativity=[+|-]          Enforce non-negative weights Default
                                        value:'-' (short form nn)

source on GitHub

csharpyml.binaries.maml_helper.get_learners_list()[source]

Returns the list of learners as a unique strings to display.

<<<

from csharpyml.binaries import get_learners_list
print(get_learners_list())

>>>

    Available components for kind 'Trainer':
      AveragedPerceptron: Averaged Perceptron
        Aliases: avgper, ap
      BinaryClassificationGamTrainer: Generalized Additive Model for Binary Classification
        Aliases: gam
      BinarySGD: Hogwild SGD (binary)
        Aliases: sgd
      EnsembleRegression: Regression Ensemble (bagging, stacking, etc)
      FastForestClassification: Fast Forest Classification
        Aliases: FastForest, ff, ffc
      FastForestRegression: Fast Forest Regression
        Aliases: ffr
      FastTreeBinaryClassification: FastTree (Boosted Trees) Classification
        Aliases: FastTreeClassification, FastTree, ft, ftc, FastRankBinaryClassification, FastRankBinaryClassificationWrapper, FastRankClassification, fr, btc, frc, fastrank, fastrankwrapper
      FastTreeRanking: FastTree (Boosted Trees) Ranking
        Aliases: ftrank, FastRankRanking, FastRankRankingWrapper, rank, frrank, btrank
      FastTreeRegression: FastTree (Boosted Trees) Regression
        Aliases: ftr, FastRankRegression, FastRankRegressionWrapper, frr, btr
      FastTreeTweedieRegression: FastTree (Boosted Trees) Tweedie Regression
        Aliases: fttweedie
      FieldAwareFactorizationMachine: Field-aware Factorization Machine
        Aliases: ffm
      InternalOVA: MultiToBinary
        Aliases: iOVA
      InternalOVARanker: MultiToRanker
        Aliases: iOVArk
      KMeansPlusPlus: KMeans++ Clustering
        Aliases: KM, KMeans
      kNNbc: NearestNeighborsBC
        Aliases: kNN
      kNNmcl: NearestNeighborsMCC
        Aliases: kNNmc
      LightGBMBinary: LightGBM Binary Classifier
        Aliases: LightGBM
      LightGBMMulticlass: LightGBM Multi-class Classifier
        Aliases: LightGBMMC
      LightGBMRanking: LightGBM Ranking
        Aliases: LightGBMRank
      LightGBMRegression: LightGBM Regressor
        Aliases: LightGBMR
      LinearSVM: SVM (Pegasos-Linear)
        Aliases: svm
      LogisticRegression: Logistic Regression
        Aliases: lr, logisticregressionwrapper
      MatrixFactorization: Matrix Factorization
        Aliases: libmf, mf
      MultiClassLogisticRegression: Multi-class Logistic Regression
        Aliases: MulticlassLogisticRegressionPredictorNew, mlr, multilr
      MultiClassNaiveBayes: Multiclass Naive Bayes
        Aliases: MNB
      OLSLinearRegression: Ordinary Least Squares (Regression)
        Aliases: ols
      OnlineGradientDescent: Stochastic Gradient Descent (Regression)
        Aliases: ogd, sgdr, stochasticgradientdescentregression
      OptimizedOVA: Optimized One-vs-All
        Aliases: OOVA
      OVA: One-vs-All
      pcaAnomaly: PCA Anomaly Detector
        Aliases: pcaAnom
      PKPD: Pairwise coupling (PKPD)
      PoissonRegression: Poisson Regression
        Aliases: PoissonRegressionNew, Poisson, PR
      PrePost: PPTSP
      PriorPredictor: Prior Predictor
        Aliases: prior, constant
      RandomPredictor: Random Predictor
        Aliases: random
      RegressionGamTrainer: Generalized Additive Model for Regression
        Aliases: gamr
      SDCA: Fast Linear (SA-SDCA)
        Aliases: LinearClassifier, lc, sasdca
      SDCAMC: Fast Linear Multi-class Classification (SA-SDCA)
        Aliases: sasdcamc
      SDCAR: Fast Linear Regression (SA-SDCA)
        Aliases: sasdcar
      SymbolicSGD: Symbolic SGD (binary)
        Aliases: SymSGD
      WeightedEnsemble: Parallel Ensemble (bagging, stacking, etc)
        Aliases: pe, ParallelEnsemble
      WeightedEnsembleMulticlass: Multi-class Parallel Ensemble (bagging, stacking, etc)

source on GitHub

csharpyml.binaries.maml_helper.get_maml_helper()[source]

Returns the MamlHelper.

source on GitHub

csharpyml.binaries.maml_helper.get_mlnet_assemblies(chdir=False)[source]

Makes the list required dependencies to run a C# script using ML.net.

Parameters:chdir – change directory to the current one before computing the list
Returns:list of assemblies, list of usings

<<<

from csharpyml.binaries import get_mlnet_assemblies
deps, usings = get_mlnet_assemblies()

for i, d in enumerate(deps):
    print("dependencies %d: %s" % (i, d))
for i, u in enumerate(usings):
    print("using %d: %s" % (i, u))

>>>

    dependencies 0: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
    dependencies 1: c:\Python370_x64\lib\site-packages\Python.Runtime.dll
    dependencies 2: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
    dependencies 3: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
    dependencies 4: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll
    dependencies 5: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
    dependencies 6: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
    dependencies 7: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.SqlXml\v4.0_4.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll
    dependencies 8: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_fr_b77a5c561934e089\mscorlib.resources.dll
    dependencies 9: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\CSharPyMLExtension.dll
    dependencies 10: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll
    dependencies 11: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.DocHelperMlExt.dll
    dependencies 12: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Core.dll
    dependencies 13: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\System.Memory.dll
    dependencies 14: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\System.Collections.Immutable.dll
    dependencies 15: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.ScikitAPI.dll
    dependencies 16: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Data.dll
    dependencies 17: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.Composition\v4.0_4.0.0.0__b77a5c561934e089\System.ComponentModel.Composition.dll
    dependencies 18: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Newtonsoft.Json.dll
    dependencies 19: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
    dependencies 20: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Threading.Tasks\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Threading.Tasks.dll
    dependencies 21: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Primitives\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Primitives.dll
    dependencies 22: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.Runtime.dll
    dependencies 23: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Linq.Expressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Linq.Expressions.dll
    dependencies 24: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Reflection\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Reflection.dll
    dependencies 25: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization.Formatters\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Serialization.Formatters.dll
    dependencies 26: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ObjectModel\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.ObjectModel.dll
    dependencies 27: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll
    dependencies 28: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.ReaderWriter\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Xml.ReaderWriter.dll
    dependencies 29: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ValueTuple\v4.0_4.0.0.0__cc7b13ffcd2ddd51\System.ValueTuple.dll
    dependencies 30: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.StandardLearners.dll
    dependencies 31: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Transforms.dll
    dependencies 32: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.FastTree.dll
    dependencies 33: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Ensemble.dll
    dependencies 34: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.KMeansClustering.dll
    dependencies 35: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.LightGBM.dll
    dependencies 36: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.HalLearners.dll
    dependencies 37: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.PCA.dll
    dependencies 38: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.TimeSeries.dll
    dependencies 39: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.TensorFlow.dll
    dependencies 40: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Maml.dll
    dependencies 41: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Onnx.dll
    dependencies 42: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Google.Protobuf.dll
    dependencies 43: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Text.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Text.RegularExpressions.dll
    dependencies 44: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.IO.dll
    dependencies 45: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Sweeper.dll
    dependencies 46: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Api.dll
    dependencies 47: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.DataManipulation.dll
    dependencies 48: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineHelper.dll
    dependencies 49: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Legacy.dll
    dependencies 50: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.EntryPoints.dll
    dependencies 51: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.FeaturesTransforms.dll
    dependencies 52: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.NearestNeighbors.dll
    dependencies 53: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineTransforms.dll
    dependencies 54: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.RandomTransforms.dll
    dependencies 55: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.Clustering.dll
    dependencies 56: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.TimeSeries.dll
    dependencies 57: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineLambdaTransforms.dll
    dependencies 58: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.MultiClass.dll
    dependencies 59: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineGraphTraining.dll
    dependencies 60: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineGraphTransforms.dll
    dependencies 61: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.PipelineTraining.dll
    dependencies 62: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.ModelSelection.dll
    dependencies 63: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.ProductionPrediction.dll
    dependencies 64: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Scikit.ML.OnnxHelper.dll
    dependencies 65: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.CpuMath.dll
    dependencies 66: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.OnnxTransform.dll
    dependencies 67: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Scoring.dll
    dependencies 68: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.PipelineInference.dll
    dependencies 69: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Recommender.dll
    dependencies 70: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.ResultProcessor.dll
    dependencies 71: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\Microsoft.ML.Runtime.ImageAnalytics.dll
    dependencies 72: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\System.Drawing.Common.dll
    dependencies 73: C:\xavierdupre\__home_\GitHub\csharpyml\_doc\sphinxdoc\source\csharpyml\binaries\Release\MML.dll
    dependencies 74: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.dll
    dependencies 75: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IO.Compression.FileSystem\v4.0_4.0.0.0__b77a5c561934e089\System.IO.Compression.FileSystem.dll
    using 0: System
    using 1: System.Linq
    using 2: System.Collections.Generic
    using 3: System.IO
    using 4: System.Text
    using 5: Microsoft.ML.Runtime
    using 6: Microsoft.ML.Runtime.Api
    using 7: Microsoft.ML.Runtime.Data
    using 8: Microsoft.ML.Runtime.Learners
    using 9: Microsoft.ML.Runtime.Ensemble
    using 10: Microsoft.ML.Runtime.LightGBM
    using 11: Microsoft.ML.Runtime.Model.Onnx
    using 12: Microsoft.ML.Runtime.TimeSeriesProcessing
    using 13: Microsoft.ML.Runtime.Tools
    using 14: Microsoft.ML.Trainers
    using 15: Microsoft.ML.Trainers.HalLearners
    using 16: Microsoft.ML.Trainers.KMeans
    using 17: Microsoft.ML.Trainers.FastTree
    using 18: Microsoft.ML.Trainers.Online
    using 19: Microsoft.ML.Trainers.PCA
    using 20: Microsoft.ML.Transforms
    using 21: Microsoft.ML.Transforms.Categorical
    using 22: Microsoft.ML.Transforms.Normalizers
    using 23: Microsoft.ML.Transforms.Projections
    using 24: Microsoft.ML.Transforms.TensorFlow
    using 25: Microsoft.ML.Transforms.Text
    using 26: Microsoft.ML.Runtime.Sweeper
    using 27: Scikit.ML.DataManipulation
    using 28: Scikit.ML.EntryPoints
    using 29: Scikit.ML.Clustering
    using 30: Scikit.ML.TimeSeries
    using 31: Scikit.ML.FeaturesTransforms
    using 32: Scikit.ML.PipelineLambdaTransforms
    using 33: Scikit.ML.NearestNeighbors
    using 34: Scikit.ML.MultiClass
    using 35: Scikit.ML.PipelineGraphTraining
    using 36: Scikit.ML.PipelineGraphTransforms
    using 37: Scikit.ML.PipelineTraining
    using 38: Scikit.ML.PipelineTransforms
    using 39: Scikit.ML.RandomTransforms
    using 40: Scikit.ML.ModelSelection
    using 41: Scikit.ML.ProductionPrediction
    using 42: Scikit.ML.OnnxHelper
    using 43: Scikit.ML.ScikitAPI

source on GitHub

csharpyml.binaries.maml_helper.get_transforms_list()[source]

Returns the list of transforms as a unique strings to display.

<<<

from csharpyml.binaries import get_transforms_list
print(get_transforms_list())

>>>

    Available components for kind 'DataTransform':
      AddRandomTransform: Add Random Transform
        Aliases: AddRandom, arnd
      AppendViewTransform: Append View Transform
        Aliases: Append
      BinNormalizer: Binning Normalizer
        Aliases: Bin
      BootstrapSampleTransform: Bootstrap Sample Transform
        Aliases: BootstrapSample
      CategoricalHashTransform: Categorical Hash Transform
        Aliases: CatHashTransform, CategoricalHash, CatHash
      CategoricalTransform: Categorical Transform
        Aliases: CatTransform, Categorical, Cat
      ChainTransform: Chain Transform
        Aliases: ChainTrans, Chtr
      CharTokenize: Character Tokenizer Transform
        Aliases: CharToken
      Concat: Concat Transform
        Aliases: ConcatTransform
      Convert: Convert Transform
        Aliases: ConvertTransform
      CopyColumns: Copy Columns Transform
        Aliases: CopyColumnsTransform, Copy
      CountFeatureSelectionTransform: Count Feature Selection Transform
        Aliases: CountFeatureSelection
      CustomStopWordsRemoverTransform: Custom Stopwords Remover Transform
        Aliases: CustomStopWords
      DBScan: DBScanTransform
      DescribeTransform: Describe Transform
        Aliases: Describe
      DeTrend: DeTrendTransform
      DropSlots: Drop Slots Transform
        Aliases: DropSlotsTransform
      Evaluate: Evaluate Predictor
      ExpAverageTransform: Exponential Average Transform
        Aliases: ExpAvg
      ExtendedCacheTransform: Extended Cache Transform
        Aliases: CacheDF
      GcnTransform: Global Contrast Normalization Transform
        Aliases: Gcn
      GenerateNumberTransform: Generate Number Transform
        Aliases: GenerateNumber, Generate
      Group: Group Transform
      HashJoinTransform: Hash Join Transform
        Aliases: HashJoin
      HashTransform: Hash Transform
        Aliases: Hash
      IidChangePointDetector: IID Change Point Detection
        Aliases: ichgpnt
      IidSpikeDetector: IID Spike Detection
        Aliases: ispike
      ImageGrayscaleTransform: Image Greyscale Transform
        Aliases: ImageGrayscale
      ImageLoaderTransform: Image Loader Transform
        Aliases: ImageLoader
      ImagePixelExtractorTransform: Image Pixel Extractor Transform
        Aliases: ImagePixelExtractor
      ImageResizerTransform: Image Resizer Transform
        Aliases: ImageResizer
      KeyToBinaryVectorTransform: Key To Binary Vector Transform
        Aliases: KeyToBinary, ToBinaryVector
      KeyToValueTransform: Key To Value Transform
        Aliases: KeyToValue, KeyToVal, Unterm
      KeyToVectorTransform: Key To Vector Transform
        Aliases: KeyToVector, ToVector
      LabelIndicatorTransform: Label Indicator Transform
        Aliases: LabelIndicator
      LdaTransform: Latent Dirichlet Allocation Transform
        Aliases: LightLda
      LearnerFeatureSelectionTransform: Learner Feature Selection Transform
        Aliases: LearnerFeatureSelection
      LoadTransform: Load Transform
        Aliases: Load
      LogMeanVarNormalizer: LogMeanVar Normalizer
        Aliases: LogMeanVar, LogNormalNormalizer, LogNormal
      LpNormNormalizer: Lp-Norm Normalizer
        Aliases: lpnorm
      MeanVarNormalizer: MeanVar Normalizer
        Aliases: MeanVar, ZScoreNormalizer, ZScore, GaussianNormalizer, Gaussian
      MinMaxNormalizer: Min-Max Normalizer
        Aliases: MinMax
      MovingAverageTransform: Moving Average Transform
        Aliases: MoAv
      MultiClassConvertTransform: Extended Convert Transform
        Aliases: ExtConv, mcConv
      MultiToBinaryTransform: MultiClass to Binary classification
        Aliases: MultiToBinary, M2B
      MutualInformationFeatureSelection: Mutual Information Feature Selection Transform
        Aliases: MutualInformationFeatureSelectionTransform, MIFeatureSelection
      NADrop: NA Drop Transform
        Aliases: NADropTransform
      NAFilter: NA Filter
        Aliases: MissingValueFilter, MissingFilter
      NAHandleTransform: NA Handle Transform
        Aliases: NAHandle, NA
      NaIndicatorTransform: NA Indicator Transform
        Aliases: NAIndicator, NAInd
      NAReplaceTransform: NA Replace Transform
        Aliases: NAReplace, NARep
      NearNeighborsTransform: Nearest Neighbors Transform
        Aliases: knntr
      NgramHashTransform: Ngram Hash Transform
        Aliases: NgramHash
      NgramTransform: Ngram Transform
        Aliases: Ngram
      Onnx: ONNX Scoring Transform
        Aliases: OnnxTransform, OnnxScorer
      OptColTransform: Optional Column Transform
        Aliases: optional
      OPTICS: OpticsTransform
      OpticsOrderingTransform: OPTICS Ordering Transform
        Aliases: OPTICSOrdering, OPTICSOrd
      PassThroughTransform: Pass Through Transform
        Aliases: Pass, PassThrough, DumpView
      PcaTransform: Principal Component Analysis Transform
        Aliases: Pca
      PercentThrTransform: Percentile Threshold Transform
        Aliases: TopPcnt
      PolynomialTransform: Polynomial Transform
        Aliases: Poly
      PredictTransform: Run prediction for a transform
        Aliases: Predict
      PValueTransform: p-Value Transform
        Aliases: PVal
      RangeFilter: Range Filter
      ResampleTransform: Resample Transform
        Aliases: Resample
      RffTransform: Random Fourier Features Transform
        Aliases: Rff
      ScalerTransform: Scaler Transform
        Aliases: Scaler
      Score: Score Predictor
      SelectColumns: Select Columns Transform
        Aliases: SelectColumnsTransform, Select
      SelTaggedViewTransform: Select Tagged View
        Aliases: SelectTaggedViewTransform, SelectTag, SelTag
      SentimentAnalyzingTransform: Sentiment Analyzing Transform
        Aliases: SentimentAnalyzer, Senti
      ShuffleTransform: Shuffle Transform
        Aliases: Shuffle, shuf
      SkipFilter: Skip Filter
        Aliases: Skip
      SkipTakeFilter: Skip and Take Filter
        Aliases: SkipTake
      SlideWinTransform: Sliding Window Transform
        Aliases: SlideWin
      SortInDataFrameTransform: Sort In DataFrame Transform
        Aliases: SortInDataFrame, SortMem, SortDf
      SplitTrainTestTransform: Split Train Test Transform
        Aliases: SplitTrainTest
      SsaChangePointDetector: SSA Change Point Detection
        Aliases: chgpnt
      SsaSpikeDetector: SSA Spike Detection
        Aliases: spike
      StopWordsRemoverTransform: Stopwords Remover Transform
        Aliases: StopWordsRemover, StopWords
      TaggedPredictTr: Run prediction for a transform
        Aliases: TagPredict
      TaggedScoreTransform: Score a Tagged Predictor
        Aliases: TagScore
      TagTrainScoreTransform: Train and Tag and Score a Predictor
        Aliases: TagTrainScore
      TagViewTransform: Tag View
        Aliases: Tag
      TakeFilter: Take Filter
        Aliases: Take
      Term: Term Transform
        Aliases: AutoLabel, TermTransform, AutoLabelTransform
      TermLookup: Term Lookup Transform
        Aliases: Lookup, LookupTransform, TermLookupTransform
      TextNormalizerTransform: Text Normalizer Transform
        Aliases: TextNormalizer, TextNorm
      TextTransform: Text Transform
        Aliases: Text
      TFTransform: TensorFlowTransform
      TrainScore: Train and Score Predictor
      TreeFeat: Tree Ensemble Featurization Transform
        Aliases: TreeFeaturizationTransform
      ULabelToR4LabelTransform: ULabelToR4Label Transform
        Aliases: ULabelToR4Label, U2R4
      Ungroup: Un-group Transform
      VectorToImageTransform: Vector To Image Transform
        Aliases: VectorToImage
      WhiteningTransform: Whitening Transform
        Aliases: Whitening
      WordBagTransform: Word Bag Transform
        Aliases: WordBag
      WordEmbeddingsTransform: Word Embeddings Transform
        Aliases: WordEmbeddings
      WordHashBagTransform: Word Hash Bag Transform
        Aliases: WordHashBag
      WordTokenizeTransform: Word Tokenizer Transform
        Aliases: DelimitedTokenizeTransform, WordToken, DelimitedTokenize, Token

source on GitHub

csharpyml.binaries.maml_helper.maml(script, catch_output=True, conc=0, verbose=2, sensitivity=-1)[source]

Runs a maml script through ML.net.

Parameters:
  • script – script
  • catch_output – the function returns the output as a result at of the execution, otherwise, it gets printed on stdout while being executed
  • conc – concurrency (number of threads or 0 to let the library choose)
  • verbose – more or less display
  • sensitivity – to hide information about data
Returns:

stdout, stderr

See notebook csharpformlinnotebookrst for an example.

source on GitHub

csharpyml.binaries.maml_helper.mlnet(name, code, usings=None, dependencies=None, redirect=False)[source]

Compiles a C# function using ML.net. It automatically adds the necessary dependencies including in this package. Relies on :epkg:`create_cs_function`

Parameters:
  • name – function name
  • codeC# code
  • usingsusing to add, such as System, System.Linq, …
  • dependencies – dependencies, can be absolute path file
  • redirect – redirect standard output and error
Returns:

Python wrapper on the compiled C#

The default dependencies are returned by get_mlnet_assemblies.

source on GitHub