dffml-model-scikit
dffml-model-scikit
pypi i dffml-model-scikit
dffml-model-scikit

dffml-model-scikit

The easiest way to use Machine Learning. Mix and match underlying ML libraries and data set sources. Generate new datasets or modify existing ones with ease.

by intel

0.1.0.post0 (see all)License:MIT
pypi i dffml-model-scikit
Readme

DFFML Models For scikit / sklearn

About

Models created using scikit.

Install

$ python3 -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 ExperienceExpertiseTrust FactorSalary
0010.210
1030.420
2050.630
3070.840
4091.050
5111.260
$ 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.

VersionTagPublished
0.1.0.post0
2yrs ago
0.1.0
2yrs ago
0.0.9
3yrs ago
0.0.8
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate