https://github.com/vaasudevans/svc-support-vector-classification
Classification Algorithm in SVM (Support Vector Machine) 🐍
https://github.com/vaasudevans/svc-support-vector-classification
python3 sklearn svc svm
Last synced: about 1 month ago
JSON representation
Classification Algorithm in SVM (Support Vector Machine) 🐍
- Host: GitHub
- URL: https://github.com/vaasudevans/svc-support-vector-classification
- Owner: VaasuDevanS
- Created: 2019-01-28T02:12:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-28T12:28:27.000Z (over 7 years ago)
- Last Synced: 2025-03-31T12:57:03.966Z (about 1 year ago)
- Topics: python3, sklearn, svc, svm
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Support Vector Classification
Python script to predict Occupancy using SVM in [sklearn](https://scikit-learn.org/stable/modules/svm.html) library.
**Note:**
This script uses 60% Training and 40% testing of the data file.
Random seed used in model_selection.train_test_split is *100.*
Tested in python: 3.5, Pandas: 0.23.4, scikit-learn: 0.20.2
License: *GNU-GPL*
**Installing Dependencies**
```
pip3 install pandas scikit-learn
```
**Data-Insight**
```
$ head Data/430pm_Managed.txt
201611071630 CP:C96GB CHAdeMO Occ
201611071630 CP:C96GB FastAC43 Free
201611071630 CP:C96GB ComboCCS Occ
201611071630 CP:C9QKW CHAdeMO Occ
201611071630 CP:C9QKW FastAC43 Occ
201611071630 CP:C9QKW ComboCCS Occ
201611071630 CP:RC13 CHAdeMO Free
201611071630 CP:RC13 FastAC43 Free
201611071630 CP:RC13 ComboCCS Occ
201611071630 CP:C85WS CHAdeMO Free
```
**Usage**
```
>>> python3 PredictOccupancy.py Data/430pm_Managed.txt
Accuracy: 0.714516129032258
Report:
precision recall f1-score support
Occupied 0.51 0.19 0.28 178
Free 0.74 0.93 0.82 442
micro avg 0.71 0.71 0.71 620
macro avg 0.62 0.56 0.55 620
weighted avg 0.67 0.71 0.67 620
ConfusionMatrix:
[[ 34 144]
[ 33 409]]
```