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.

partial least squares pls #332

@petroph

Description

@petroph

Let
double[,] x = { { 1.05, 1.96, 3.02 }, { 3.94, 4.98, 6.04 }, { 5, 6, 7 } };
double[,] y = { { 11 }, { 13 }, { 13.68 } };

The following code works:
PartialLeastSquaresAnalysis pls = new PartialLeastSquaresAnalysis(x, y, PartialLeastSquaresAlgorithm.SIMPLS);
int factors = 1;
pls.Compute(factors);
Console.WriteLine(pls.Factors.Count);

The following code also works:
PartialLeastSquaresAnalysis pls = new PartialLeastSquaresAnalysis(x, y, PartialLeastSquaresAlgorithm.NIPALS);
pls.Compute();
Console.WriteLine(pls.Factors.Count);

The following code gives an exception:
PartialLeastSquaresAnalysis pls = new PartialLeastSquaresAnalysis(x, y, PartialLeastSquaresAlgorithm.NIPALS);
int factors = 1;
pls.Compute(factors);

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