How to construct 'SeriesVariable' for input in NDtw in VB.net

21 Views Asked by At

I am using the NDtw Nuget in VB.net. I have figured out how to use it to analyze univariate data but I am having trouble preparing the array for multivariate data. I am using a dataset where there are two variables with seven measurements for each variable. According to intellisense these data need to be in the form of a seriesVariable. I can't figure out how to get them into that form. I have tried preparing them as a 2D array but that does not work. I have also tried declaring the 2D array as a seriesVariable and that does not work. How can I get the data into the correct form?

Imports NDtw

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim dist
    Dim path
    Dim actualdist As Double


    Dim series1(,) = {{1.0, 3.0, 7.0, 8.0, 11.0, 6.0, 6.0}, 
{3.0, 6.0, 3.0, 7.0, 13.0, 12.0, 7.0}}
    Dim series2(,) = {{3.0, 6.0, 3.0, 7.0, 13.0, 12.0, 7.0}, 
{1.0, 3.0, 7.0, 8.0, 11.0, 6.0, 6.0}}


    Dim dtw As New Dtw(series1, series2)

    dist = dtw.GetCost()

    TextBox3.Text = dist.ToString

End Sub

End Class
0

There are 0 best solutions below