Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

NullReferenceException on NaiveBayes Learn #758

@souserge

Description

@souserge

Hi, when trying to train Naive Bayes on multi-label data, I receive a NullReferenceException. Is it just because the method supports only one-dimentional vector of data?
Here's the code I'm using (the exception is thrown on the last statement):

var X = new double[][]
    {new double[] {1, 0, 1, 1, 0},
     new double[] {0, 1, 0, 0, 1},
     new double[] {1, 0, 1, 0, 1}};

var Y = new double[][]
    {new double[] {1, 0},
     new double[] {0, 1},
     new double[] {1, 1}};

var teacher = new NaiveBayesLearning<NormalDistribution>();
var bayes = teacher.Learn(X, Y);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions