Skip to content

Commit

Permalink
✨ Toy Machines (#15)
Browse files Browse the repository at this point in the history
* ✨ Add `toy_machines` multiclass dataset
  • Loading branch information
hayesall authored Dec 1, 2021
1 parent 31aad41 commit 0c02d86
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 0 deletions.
29 changes: 29 additions & 0 deletions srlearn/toy_machines/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# toy_machines

This is a toy dataset based on one distributed with the
[ACE system](https://dtai.cs.kuleuven.be/ACE/doc/) (a short overview is provided
on [page 11 of "The ACE Data Mining System: User's Manual"](https://dtai.cs.kuleuven.be/ACE/doc/ACEuser-1.2.16.pdf#page=11)).

Machines contain parts, and some of those parts are either replaceable or
irreplaceable. Your goal is to infer whether the machine should be repaired
(`replace`), sent back to the manufacturer for repairs (`sendback`), or if the
machine is okay as it is (`ok`).

## Task

**Multiclass Classification**: Is the machine `ok`, or should it be `sendback`
or `replace`?

```prolog
machine(+id,#action).
worn(+id,-part).
replaceable(+part).
irreplaceable(+part).
range: part={gear, wheel, chain, engine, control_unit}.
range: action={ok, fix, sendback}.
```

## Notes

A one-versus-rest classification scheme is recommended.
7 changes: 7 additions & 0 deletions srlearn/toy_machines/toy_machines/background.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
machine(+id,#action).
worn(+id,-part).
replaceable(+part).
irreplaceable(+part).

range: part={gear, wheel, chain, engine, control_unit}.
range: action={ok, fix, sendback}.
11 changes: 11 additions & 0 deletions srlearn/toy_machines/toy_machines/test/test_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
replaceable(gear).
replaceable(wheel).
replaceable(chain).
irreplaceable(engine).
irreplaceable(control_unit).
worn(13,chain).
worn(13,wheel).
worn(13,gear).
worn(13,engine).
worn(15,wheel).
worn(15,gear).
Empty file.
3 changes: 3 additions & 0 deletions srlearn/toy_machines/toy_machines/test/test_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
machine(13,sendback).
machine(14,ok).
machine(15,fix).
23 changes: 23 additions & 0 deletions srlearn/toy_machines/toy_machines/train/train_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
replaceable(gear).
replaceable(wheel).
replaceable(chain).
irreplaceable(engine).
irreplaceable(control_unit).
worn(1,gear).
worn(1,engine).
worn(3,gear).
worn(4,engine).
worn(5,gear).
worn(5,chain).
worn(6,wheel).
worn(7,wheel).
worn(7,control_unit).
worn(9,wheel).
worn(9,chain).
worn(10,engine).
worn(10,chain).
worn(11,engine).
worn(11,control_unit).
worn(12,chain).
worn(12,wheel).
worn(12,gear).
Empty file.
12 changes: 12 additions & 0 deletions srlearn/toy_machines/toy_machines/train/train_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
machine(1,sendback).
machine(2,ok).
machine(3,fix).
machine(4,sendback).
machine(5,fix).
machine(6,fix).
machine(7,sendback).
machine(8,ok).
machine(9,fix).
machine(10,sendback).
machine(11,sendback).
machine(12,fix).

0 comments on commit 0c02d86

Please sign in to comment.