aboutsummaryrefslogtreecommitdiff
path: root/doc/ml.1
blob: babac620062545e0945309424ecb81c0c8de4d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.3.
.TH ML "1" "October 2023" "ml 0.1" "User Commands"
.SH NAME
ml \- manual page for ml 0.1
.SH SYNOPSIS
.B ml
\fI\,train \/\fR[\fI\,Options\/\fR] \fI\,JSON_FILE\/\fR
.br
.B ml
\fI\,predict \/\fR[\fI\,-o FILE\/\fR] \fI\,FILE\/\fR
.SH DESCRIPTION
ml is a simple neural network maker made to train and predict JSON data,
it is suitable to work on classification problems.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this message
.TP
\fB\-a\fR, \fB\-\-alpha\fR=\fI\,ALPHA\/\fR
Learning rate (only works with train)
.TP
\fB\-e\fR, \fB\-\-epochs\fR=\fI\,EPOCHS\/\fR
Epochs to train the model (only works with train)
.TP
\fB\-o\fR, \fB\-\-output\fR=\fI\,FILE\/\fR
Output file (only works with predict)
.TP
\fB\-c\fR, \fB\-\-config\fR=\fI\,FILE\/\fR
Configuration filepath [default=~/.config/ml/ml.cfg]
.SH FILES
~/.config/ml/ml.cfg
    File path for network configuration, here you can setup the network
    architecture and its training parameters
.SH EXAMPLES

Train a network to solve XOR problem, below is the training data:

    [
      {
        "x": 0,
        "y": 0,
        "z": 0
      },
      {
        "x": 1,
        "y": 0,
        "z": 1
      },
      {
        "x": 0,
        "y": 1,
        "z": 1
      },
      {
        "x": 1,
        "y": 1,
        "z": 0
      }
    ]

Use the default configuration file and train the model with:
    $ ml train -e 150 xor.json

And get the network output using:
    $ ml predict xor.json 
.SH AUTHOR
Written by jvech
.SH COPYRIGHT
Copyright \(co 2023  jvech
.PP
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Feel free to download, copy and edit any repo