DFFML Scratch Models
About
Models created without a machine learning framework.
Install
$ python3 -m pip install --user dffml-model-scratch
Usage
If we have a dataset of years of experience in a job and the Salary (in thousands) at that job we can use the Simple Linear Regression model to predict a salary given the years of experience (or the other way around).
First we create the file containing the dataset. Then we train the model, get
its accuracy. And using echo pipe a new csv file of data to predict into the
model, and it will give us it prediction of the Salary.
$ cat > dataset.csv << EOF
Years,Salary
1,40
2,50
3,60
4,70
5,80
EOF
$ dffml train -model scratchslr -model-features Years:int:1 -model-predict Salary -model-directory tempdir -sources f=csv -source-filename dataset.csv -source-readonly -log debug
$ dffml accuracy -model scratchslr -model-features Years:int:1 -model-predict Salary -model-directory tempdir -sources f=csv -source-filename dataset.csv -source-readonly -log debug
1.0
$ echo -e 'Years,Salary\n6,0\n' | dffml predict all -model scratchslr -model-features Years:int:1 -model-predict Salary -model-directory tempdir -sources f=csv -source-filename /dev/stdin -source-readonly -log debug
[
{
"extra": {},
"features": {
"Salary": 0,
"Years": 6
},
"last_updated": "2019-07-19T09:46:45Z",
"prediction": {
"confidence": 1.0,
"value": 90.0
},
"key": "0"
}
]
License
Scratch Models are distributed under the terms of the MIT License.
Release files for dffml-model-scratch 0.1.0.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dffml-model-scratch-0.1.0.post0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dffml_model_scratch-0.1.0.post0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.4 kB
Release files / dffml-model-scratch-0.1.0.post0.tar.gz
| Download URL | dffml-model-scratch-0.1.0.post0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d46acdcd8fb6d3700a0c068653e2700ea06c8ad2f8db971d9d78e25b974a80f8
|
|
BLAKE2b-256 checksum How to use checksums |
55a66b7063b9da1cb742a30f74a6d3adc0fd09c6e2ad58e49fc942e9ec30f945
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10
|
Release files / dffml_model_scratch-0.1.0.post0-py3-none-any.whl
| Download URL | dffml_model_scratch-0.1.0.post0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30e09202f3cad6da079c7e55867601a6a1d72e3345837b07345e3632882200b2
|
|
BLAKE2b-256 checksum How to use checksums |
bbd87d8bf7ae1f1d78df62dbad1dde8046c1b86f04c4b1439cb27d18da5f1c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10
|