Skip to content

Commit

Permalink
Apparently multidimensional arrrays need commas
Browse files Browse the repository at this point in the history
  • Loading branch information
midnightfreddie committed Dec 14, 2016
1 parent 83bcc03 commit 2ee44f6
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions scratch2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,25 @@ Add-Type -Path $MlDllPath

$KMeans = New-Object Accord.MachineLearning.KMeans -ArgumentList 3

[double[]]$Observations = @(
#[double[]]
$Observations = @(
@(-5, -2, -1),
@(-5, -5, -6),
@( 2, 1, 1),
@( 1, 1, 2),
@( 1, 2, 2),
@( 3, 1, 2),
@(11, 5, 4),
@(15, 5, 6),
@(10, 5, 6)
)

[int[]]$Labels = $KMeans.Compute($Observations)

$Labels -join ", "

#[double[][]]$New = @(,@( 4, 1, 9))
$New = @(
@(-5, -2, -1)
@(-5, -5, -6)
@( 2, 1, 1)
Expand All @@ -22,12 +40,11 @@ $KMeans = New-Object Accord.MachineLearning.KMeans -ArgumentList 3
@(15, 5, 6)
@(10, 5, 6)
)

[int[]]$Labels = $KMeans.Compute($Observations)

$Labels -join ", "

[double[][]]$New = @(,@( 4, 1, 9))
$New = @(
# @(5, 2, 3)
@( 4, 1, 9)
)
$New = @(@(5, 2, 3), @( 4, 1, 9))

# Ugh. Trying to find <Tinput> class which Decide() seems to want
# [Accord.MachineLearning.MulticlassScoreClassifierBase]
Expand Down

0 comments on commit 2ee44f6

Please sign in to comment.