Skip to content

Commit 24d2a73

Browse files
author
bezzazi abir
committed
Merge c7be783
2 parents 6a769d0 + c7be783 commit 24d2a73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ If you are new to baselines and Metacello, check out the [Baselines](https://git
3535
Here's an example of how to use soft margin SVM. For that, open a Playground (CMD+OW) in your Pharo image and execute this code (CMD+A) and then (CMD+PP)
3636

3737
```st
38-
inputMatrix := AIMatrix from: #( #( 1 0 0 ) #( 1 1 1 ) #( 1 3 3 ) #( 1 4 4 ) ).
38+
inputMatrix :=#( #( 1 0 0 ) #( 1 1 1 ) #( 1 3 3 ) #( 1 4 4 ) ).
3939
outputVector := #( 1 1 -1 -1 ).
4040
41-
model := AISupportVectorMachinesSoftSGD new.
41+
model := AISupportVectorMachines new.
4242
model regularizationStrenght: 10000.
4343
model learningRate: 1e-6.
4444
model maxEpochs: 5000.
4545
4646
model fitX: inputMatrix y: outputVector.
4747
48-
testInput := AIMatrix from: #( #( 1 -1 -1 ) #( 1 5 5 ) #( 1 6 6 ) #( 1 7 7 ) ).
48+
testInput := #( #( 1 -1 -1 ) #( 1 5 5 ) #( 1 6 6 ) #( 1 7 7 ) ).
4949
50-
model predict: testInput "an AIMatrix(1 -1 -1 -1)"
50+
model predict: testInput "#(1 -1 -1 -1)"
5151
```
5252

5353
To understand this example and the soft margin svm in general please refer to our [Wiki](https://github.com/pharo-ai/wiki/blob/master/wiki/MachineLearning/Support-Vector-Machines.md).

0 commit comments

Comments
 (0)