Skip to content

README from_vector notes and documentation links #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "RelationalDatasets"
uuid = "6b8bdb16-f930-11eb-22b5-7ba1dabdf7a8"
license = "Apache 2.0"
authors = ["Alexander L. Hayes <[email protected]>"]
version = "0.1.1"
version = "0.2.0"

[deps]
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Expand Down
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# RelationalDatasets.jl

> *A small library for loading and downloading relational datasets.*
>
> or:
>
> *The [`relational-datasets`](https://github.com/srlearn/relational-datasets)
> Python package—but written in Julia.*
*A small library for loading and downloading relational datasets.*

or: *The [`relational-datasets`](https://github.com/srlearn/relational-datasets)
Python package—but written in Julia.*

```console
add RelationalDatasets
```

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

## Usage

[![RelationalDatasets.jl stable documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://srlearn.github.io/RelationalDatasets.jl/stable)
[![RelationalDatasets.jl latest documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://srlearn.github.io/RelationalDatasets.jl/dev)

### Loading and Downloading Benchmark Datasets

`RelationalDatasets.jl` exports a single function: `load` to return train
and test folds.

```julia
using RelationalDatasets

train, test = load("webkb", "v0.0.4", fold=2)

println(length(train.facts))
length(train.facts)
# 1344
```

### Converting Vector-based Datasets

*Binary classification when `y` is a vector of 0/1*:

```julia
using RelationalDatasets

data, modes = RelationalDatasets.from_vector(
[0 1 1; 1 0 2; 2 2 0],
[0, 0, 1],
)
```

*Regression when `y` is a vector of floats*:

```julia
using RelationalDatasets

data, modes = RelationalDatasets.from_vector(
[0 1 1; 1 0 2; 2 2 0],
[1.1, 0.9, 2.5],
)
```

## Install

### From Registry
Expand Down