Skip to main content

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

  1. 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 \
    -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 \
    -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 \
    -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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dffml-model-scikit-0.0.7.tar.gz (15.3 kB view details)

Uploaded Source

File details

Details for the file dffml-model-scikit-0.0.7.tar.gz.

File metadata

  • Download URL: dffml-model-scikit-0.0.7.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for dffml-model-scikit-0.0.7.tar.gz
Algorithm Hash digest
SHA256 df1bb0d1dd240a6549312ea832376894171034e5039c17f8b25937badebbaca1
MD5 e7d027e37904f0aa4bf5644718cb4a91
BLAKE2b-256 cae67c4ce757da7c5f8a3c9f07a00d3be4a48a5dbcc58899f92ba71199b83773

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page