Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ configure the build process, e.g.,
cd code/dipha-pss
mkdir build
cd build
cmake ...
cmake ..
make
```

Expand Down Expand Up @@ -251,7 +251,7 @@ In ```/tmp/``` we create such a list via

```bash
cd /tmp/
find . -name 'dmat*.pd' > diagrams.list
find . -name 'dmat*.pd' | sort > diagrams.list
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was essential for me to make the annuli-example work

```
Finally, we execute ```diagram_distance``` and compute features up
to dimension two (set via ```---dim```). In our example, we compute
Expand All @@ -260,7 +260,7 @@ time parameter of the kernel (set via ```--time```) to 0.1.


```bash
cd code/dipha-pss/build/bin
cd code/dipha-pss/build
./diagram_distance --inner_product --time 0.1 --dim 1 /tmp/diagrams.list > /tmp/kernel.txt
```

Expand All @@ -270,9 +270,10 @@ the MATLAB interface to libsvm (see the libsvm documentation on how to compile
the MATLAB interface).

```matlab
kernel = load('/tmp/kernel.txt');
labels = [ones(10,1);ones(10,1)*2]; % Create labels for training
pos = randsample(1:20,15); % Indices of diagrams used for training
neg = setdiff(1:20,pos); % Indices of diagrams used for testing
pos = sort(randperm(20)(1:15)); % Indices of diagrams used for training
neg = setdiff(1:20,pos); % Indices of diagrams used for testing
model = svmtrain(labels(pos),[(1:length(pos))' kernel(pos,pos)], '-t 4 -c 1');
[pred,acc,~] = svmpredict(labels(neg), [(1:5)' kernel(neg,pos)], model);
disp(acc);
Expand Down