DFFML Models For scikit / sklearn
About
Models created using scikit.
Install
$ python3 -m pip install --user dffml-model-scikit
Usage
- Linear Regression Model
For implementing linear regression to a dataset, let us take a simple example:
| Years of Experience | Expertise | Trust Factor | Salary |
|---|---|---|---|
| 0 | 01 | 0.2 | 10 |
| 1 | 03 | 0.4 | 20 |
| 2 | 05 | 0.6 | 30 |
| 3 | 07 | 0.8 | 40 |
| 4 | 09 | 1.0 | 50 |
| 5 | 11 | 1.2 | 60 |
$ cat > train.csv << EOF
Years,Expertise,Trust,Salary
0,1,0.2,10
1,3,0.4,20
2,5,0.6,30
3,7,0.8,40
EOF
$ cat > test.csv << EOF
Years,Expertise,Trust,Salary
4,9,1.0,50
5,11,1.2,60
EOF
$ dffml train \
-model scikitlr \
-model-features Years:int:1 Expertise:int:1 Trust:float:1 \
-model-predict Salary \
-model-directory tempdir \
-sources f=csv \
-source-filename train.csv \
-source-readonly \
-log debug
$ dffml accuracy \
-model scikitlr \
-model-features Years:int:1 Expertise:int:1 Trust:float:1 \
-model-predict Salary \
-model-directory tempdir \
-sources f=csv \
-source-filename test.csv \
-source-readonly \
-log debug
$ echo -e 'Years,Expertise,Trust\n6,13,1.4\n' | \
dffml predict all \
-model scikitlr \
-model-features Years:int:1 Expertise:int:1 Trust:float:1 \
-model-predict Salary \
-model-directory tempdir \
-sources f=csv \
-source-filename /dev/stdin \
-source-readonly \
-log debug
License
Scikit Models are distributed under the terms of the MIT License.
Metadata
Release files for dffml-model-scikit 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-scikit-0.1.0.post0.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dffml_model_scikit-0.1.0.post0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.1 kB
Release files / dffml-model-scikit-0.1.0.post0.tar.gz
| Download URL | dffml-model-scikit-0.1.0.post0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b2dcfbc702a6a0ece8ea4d1e36513b96a0b7b4636ac8b663ced06e499bc1e2d
|
|
BLAKE2b-256 checksum How to use checksums |
5d31c897d44529c65b2f46dca6b8b79c42abbeb3acecb238b1e0797dd4e26a7b
|
| 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_scikit-0.1.0.post0-py3-none-any.whl
| Download URL | dffml_model_scikit-0.1.0.post0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9084ac62a1b6f463c275b98b0986e01f08f15da62f4c70f11c8f4e67aee78949
|
|
BLAKE2b-256 checksum How to use checksums |
7fa2f41f887d4b0a47f09c682f626a158088f06552eddd82b6239248c90a29ff
|
| 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
|