No project description provided
Project description
DFFML Models For scikit / sklearn
About
Models created using scikit.
Install
python3.7 -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 def:Years:int:1 def:Expertise:int:1 def:Trust:float:1 \
-model-predict Salary \
-sources f=csv \
-source-filename train.csv \
-source-readonly \
-log debug
$ dffml accuracy \
-model scikitlr \
-model-features def:Years:int:1 def:Expertise:int:1 def:Trust:float:1 \
-model-predict Salary \
-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 def:Years:int:1 def:Expertise:int:1 def:Trust:float:1 \
-model-predict Salary \
-sources f=csv \
-source-filename /dev/stdin \
-source-readonly \
-log debug
License
Scikit Models are distributed under the terms of the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file dffml-model-scikit-0.0.3.tar.gz
.
File metadata
- Download URL: dffml-model-scikit-0.0.3.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75186d5dab5970caf96e8beb8eda4c11cd461574f61f0472d3a4d364d9d7bbde |
|
MD5 | 601f045d09669afca06a6111bfc6ed95 |
|
BLAKE2b-256 | 1bc8f425b95d4b231357c6c3dccd97382729af3caa8063613eb45f6816e4c44f |