Skip to content

Commit

Permalink
Release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Nov 20, 2023
1 parent d11add0 commit 0c65ce5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 40 deletions.
53 changes: 17 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ It encapsulates the cross-compiled Java code from **LIBSVM** behind an object-or

To use the latest release of **zlibsvm**, please use the following snippet in your `pom.xml`

#### Java 11+
#### Java 17+
```xml
<dependency>
<groupId>de.hs-heilbronn.mi</groupId>
<artifactId>zlibsvm-core</artifactId>
<version>2.0.9</version>
<version>2.1.0</version>
</dependency>
```

Expand Down Expand Up @@ -91,40 +91,21 @@ First of all, you need to implement your custom `SvmDocument` and a custom `SvmF
```

```java
public class SvmFeatureImpl implements SvmFeature {

private int index;
private double value;

public SvmFeatureImpl(int index, double value) {
this.index = index;
this.value = value;
}

public int getIndex() {
return index;
}

public double getValue() {
return value;
}

public void setIndex(int index) {
this.index = index;

}

public void setValue(double value) {
this.value = value;

}

@Override
public int compareTo(SvmFeature o) {
throw new UnsupportedOperationException("TODO: Implement this method for real use-cases");
}
}

public record SvmFeatureImpl(int index, double value) implements SvmFeature {

public int getIndex() {
return index;
}

public double getValue() {
return value;
}

@Override
public int compareTo(SvmFeature o) {
return Integer.compare(getIndex(), o.getIndex());
}
}
```

To obtain an `SvmModel` the SVM needs to be trained. This is done via an `SvmConfigurationImpl.Builder()`, which is used to specify your custom SVM configuration.
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>de.hs-heilbronn.mi</groupId>
<artifactId>zlibsvm</artifactId>
<packaging>pom</packaging>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0</version>

<name>zlibsvm</name>
<description>A Java binding for the famous LIBSVM library</description>
Expand Down Expand Up @@ -78,7 +78,7 @@
<maven.compile.encoding>UTF-8</maven.compile.encoding>
<maven.compiler.target>${java.target}</maven.compiler.target>

<zlibsvm.version>2.1.0-SNAPSHOT</zlibsvm.version>
<zlibsvm.version>2.1.0</zlibsvm.version>
<libsvm.version>3.31</libsvm.version>
<!-- apache commons stuff -->
<commons.lang3.version>3.13.0</commons.lang3.version>
Expand Down
2 changes: 1 addition & 1 deletion zlibsvm-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.hs-heilbronn.mi</groupId>
<artifactId>zlibsvm</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion zlibsvm-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.hs-heilbronn.mi</groupId>
<artifactId>zlibsvm</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down

0 comments on commit 0c65ce5

Please sign in to comment.