Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
titsuki committed Apr 3, 2018
1 parent a5b4fec commit a64c75d
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/src/svm.cpp
/src/svm.h
/.panda-work
/resources/*.so
/resources/*.dylib
/resources/libraries/*.so
/resources/libraries/*.dylib
.precomp/
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Revision history for Algorithm-LibSVM

{{$NEXT}}

0.0.2 2018-04-03T23:55:43+09:00
- Fix documentation

0.0.1
- Initial version
2 changes: 1 addition & 1 deletion META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"source-url" : "git://github.com/titsuki/p6-Algorithm-LibSVM.git",
"tags" : [ ],
"test-depends" : [ ],
"version" : "0.0.1"
"version" : "0.0.2"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ Copyright 2016 titsuki
This library is free software; you can redistribute it and/or modify it under the terms of the MIT License.

libsvm ( https://github.com/cjlin1/libsvm ) by Chih-Chung Chang and Chih-Jen Lin is licensed under the BSD 3-Clause License.

8 changes: 8 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = Algorithm-LibSVM

[ReadmeFromPod]
; disable = true
filename = lib/Algorithm/LibSVM.pm6

[PruneFiles]
; match = ^ 'xt/'
4 changes: 2 additions & 2 deletions lib/Algorithm/LibSVM.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Algorithm::LibSVM::Grammar;
use Algorithm::LibSVM::Actions;
use NativeHelpers::Array;

unit class Algorithm::LibSVM;
unit class Algorithm::LibSVM:ver<0.0.2>;

has Int $.nr-feature;

Expand Down Expand Up @@ -136,7 +136,7 @@ Algorithm::LibSVM - A Perl 6 bindings for libsvm
my Algorithm::LibSVM::Parameter $parameter .= new(svm-type => C_SVC,
kernel-type => RBF);
my Algorithm::LibSVM::Problem $problem = $libsvm.load-problem('heart_scale');
my @r = $libsvm.cross-validation($problem, $param, 10);
my @r = $libsvm.cross-validation($problem, $parameter, 10);
$libsvm.evaluate($problem.y, @r).say; # {acc => 81.1111111111111, mse => 0.755555555555556, scc => 1.01157627463546}
=head2 EXAMPLE 2
Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Actions.pm6
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use v6;
unit class Algorithm::LibSVM::Actions;
unit class Algorithm::LibSVM::Actions:ver<0.0.2>;

method TOP($/) { make $<bodylist>.made }
method bodylist($/) { make $<body>>>.made }
Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Grammar.pm6
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use v6;
unit grammar Algorithm::LibSVM::Grammar;
unit grammar Algorithm::LibSVM::Grammar:ver<0.0.2>;

token TOP { <bodylist> }
token number { '-'* \d+ [ \. \d+ ]? }
Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Model.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use NativeCall;
use Algorithm::LibSVM::Node;
use Algorithm::LibSVM::Parameter;

unit class Algorithm::LibSVM::Model is export is repr('CPointer');
unit class Algorithm::LibSVM::Model:ver<0.0.2> is export is repr('CPointer');

my constant $library = %?RESOURCES<libraries/svm>.Str;

Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Node.pm6
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use v6;

unit class Algorithm::LibSVM::Node is export is repr('CStruct');
unit class Algorithm::LibSVM::Node:ver<0.0.2> is export is repr('CStruct');

has int32 $.index;
has num64 $.value;
Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Parameter.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;
use NativeCall;
use NativeHelpers::Array;

unit class Algorithm::LibSVM::Parameter is export is repr('CStruct');
unit class Algorithm::LibSVM::Parameter:ver<0.0.2> is export is repr('CStruct');

my constant $library = %?RESOURCES<libraries/svm>.Str;

Expand Down
2 changes: 1 addition & 1 deletion lib/Algorithm/LibSVM/Problem.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use NativeCall;
use Algorithm::LibSVM::Node;
use NativeHelpers::Array;

unit class Algorithm::LibSVM::Problem is export is repr('CStruct');
unit class Algorithm::LibSVM::Problem:ver<0.0.2> is export is repr('CStruct');

has int32 $.l;
has CArray[num64] $!y;
Expand Down

0 comments on commit a64c75d

Please sign in to comment.