cs-ensembles 1.0.2

Tree Ensemble Algorithms such as TreeBagging and AdaBoosting

Install-Package cs-ensembles -Version 1.0.2
dotnet add package cs-ensembles --version 1.0.2
<PackageReference Include="cs-ensembles" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add cs-ensembles --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

cs-ensembles

Ensembles method implemented in C#

Install

Install-Package cs-ensembles

Usage

The sample codes below show how to use the AdaBoosting classifier:

IEnumerable<DDataRecord<string>> training_sample = LoadTrainingSamples();
IEnumerable<DDataRecord<string>> testing_sample = LoadTestingSamples();

AdaBoost<DDataRecord, string> classifier = new AdaBoost<DDataRecord, string>();
classifier.CreateAndTrainWeakClassifiers(training_sample, (t)=>
{
 //create and return a weak classifier such as a decision tree or perceptron
});
classifier.Train(training_sample);

foreach(DDataRecord rec in testing_sample)
{
   string predicted_label = classifier.Predict(rec);
}

The sample codes below show how to use the TreeBagging classifier:

IEnumerable<DDataRecord<string>> training_sample = LoadTrainingSamples();
IEnumerable<DDataRecord<string>> testing_sample = LoadTestingSamples();

TreeBagging<DDataRecord, string> classifier = new TreeBagging<DDataRecord, string>(
(t)=>
{
  //create and return a classifier such as a decision tree or perceptron
}, 900, 2.0 / 3);
classifier.Train(training_sample);

foreach(DDataRecord rec in testing_sample)
{
    string predicted_label = classifier.Predict(rec);
} 

cs-ensembles

Ensembles method implemented in C#

Install

Install-Package cs-ensembles

Usage

The sample codes below show how to use the AdaBoosting classifier:

IEnumerable<DDataRecord<string>> training_sample = LoadTrainingSamples();
IEnumerable<DDataRecord<string>> testing_sample = LoadTestingSamples();

AdaBoost<DDataRecord, string> classifier = new AdaBoost<DDataRecord, string>();
classifier.CreateAndTrainWeakClassifiers(training_sample, (t)=>
{
 //create and return a weak classifier such as a decision tree or perceptron
});
classifier.Train(training_sample);

foreach(DDataRecord rec in testing_sample)
{
   string predicted_label = classifier.Predict(rec);
}

The sample codes below show how to use the TreeBagging classifier:

IEnumerable<DDataRecord<string>> training_sample = LoadTrainingSamples();
IEnumerable<DDataRecord<string>> testing_sample = LoadTestingSamples();

TreeBagging<DDataRecord, string> classifier = new TreeBagging<DDataRecord, string>(
(t)=>
{
  //create and return a classifier such as a decision tree or perceptron
}, 900, 2.0 / 3);
classifier.Train(training_sample);

foreach(DDataRecord rec in testing_sample)
{
    string predicted_label = classifier.Predict(rec);
} 

Release Notes

Tree Ensemble Algorithms such as TreeBagging and AdaBoosting in .NET 4.6.1

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 254 5/2/2018
1.0.1 227 5/2/2018