Skip to content

Commit

Permalink
docs: add package readme for svm
Browse files Browse the repository at this point in the history
  • Loading branch information
iamDecode committed Jul 24, 2021
1 parent 80ef4e9 commit b4d548c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sklearn_pmml_model/svm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# sklearn-pmml-model.svm

This package contains the `PMMLLinearSVC`, `PMMLNuSVC` and `PMMLSVC` classifier models, as well as the `PMMLLinearSVR`, `PMMLNuSVR` and `PMMLSVR` regression models.

## Example
A minimal working example is shown below:

```python
import pandas as pd
from sklearn_pmml_model.svm import PMMLSVC

# Prepare data
df = pd.read_csv('models/categorical-test.csv')
Xte = df.iloc[:, 1:]
Xte = pd.get_dummies(Xte, prefix_sep='') # create categorical variable

clf = PMMLSVC(pmml="models/svc_cat_pima.pmml")
clf.predict(Xte)
```

0 comments on commit b4d548c

Please sign in to comment.