Skip to content

Commit bc56cc2

Browse files
authored
Merge pull request #12 from srlearn/readme_convert
README from_vector notes and documentation links
2 parents 4d919c3 + 403cce1 commit bc56cc2

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "RelationalDatasets"
22
uuid = "6b8bdb16-f930-11eb-22b5-7ba1dabdf7a8"
33
license = "Apache 2.0"
44
authors = ["Alexander L. Hayes <[email protected]>"]
5-
version = "0.1.1"
5+
version = "0.2.0"
66

77
[deps]
88
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# RelationalDatasets.jl
22

3-
> *A small library for loading and downloading relational datasets.*
4-
>
5-
> or:
6-
>
7-
> *The [`relational-datasets`](https://github.com/srlearn/relational-datasets)
8-
> Python package—but written in Julia.*
3+
*A small library for loading and downloading relational datasets.*
4+
5+
or: *The [`relational-datasets`](https://github.com/srlearn/relational-datasets)
6+
Python package—but written in Julia.*
7+
8+
```console
9+
add RelationalDatasets
10+
```
911

1012
![GitHub release (latest by date)](https://img.shields.io/github/v/release/srlearn/RelationalDatasets.jl)
1113
![GitHub](https://img.shields.io/github/license/srlearn/RelationalDatasets.jl)
@@ -14,18 +16,46 @@
1416

1517
## Usage
1618

19+
[![RelationalDatasets.jl stable documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://srlearn.github.io/RelationalDatasets.jl/stable)
20+
[![RelationalDatasets.jl latest documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://srlearn.github.io/RelationalDatasets.jl/dev)
21+
22+
### Loading and Downloading Benchmark Datasets
23+
1724
`RelationalDatasets.jl` exports a single function: `load` to return train
1825
and test folds.
1926

2027
```julia
2128
using RelationalDatasets
2229

2330
train, test = load("webkb", "v0.0.4", fold=2)
24-
25-
println(length(train.facts))
31+
length(train.facts)
2632
# 1344
2733
```
2834

35+
### Converting Vector-based Datasets
36+
37+
*Binary classification when `y` is a vector of 0/1*:
38+
39+
```julia
40+
using RelationalDatasets
41+
42+
data, modes = RelationalDatasets.from_vector(
43+
[0 1 1; 1 0 2; 2 2 0],
44+
[0, 0, 1],
45+
)
46+
```
47+
48+
*Regression when `y` is a vector of floats*:
49+
50+
```julia
51+
using RelationalDatasets
52+
53+
data, modes = RelationalDatasets.from_vector(
54+
[0 1 1; 1 0 2; 2 2 0],
55+
[1.1, 0.9, 2.5],
56+
)
57+
```
58+
2959
## Install
3060

3161
### From Registry

0 commit comments

Comments
 (0)