Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from micromlgen import port
- from sklearn.svm import SVC
- from sklearn.datasets import load_iris
- iris = load_iris ()
- X = iris.data
- y = iris.target
- model=SVC(kernel='linear', gamma=0.01)
- model.fit(X,y)
- weights= port(model)
- file = open ("SVMClassifier.h","w+")
- # convert ke string agar bisa ditulis ke file
- content = str(weights)
- file.write(content)
- file.close
Advertisement
Add Comment
Please, Sign In to add comment