An implementation of Exact Soft Confidence-Weighted Learning
Project description
The algorithm
This is an online supervised learning algorithm which utilizes all the four salient properties:
Large margin training
Confidence weighting
Capability to handle non-separable data
Adaptive margin
The paper is here.
SCW has 2 formulations of its algorithm which are SCW-I and SCW-II. They can be accessed like below.
scw.SCW1(C, ETA) scw.SCW2(C, ETA)
C and ETA are hyperparameters.
Usage
from scw import SCW1, SCW2 scw = SCW1(C=1.0, ETA=1.0) scw.fit(X, y) y_pred = scw.perdict(X)
X and y are 2-dimensional and 1-dimensional array respectively.
X is a set of data vectors. Each row of X represents a feature vector.
y is a set of labels corresponding with X.
Note
This package performs only binary classification, not multiclass classification.
Training labels must be 1 or -1. No other labels allowed.
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
scw-1.1.2.tar.gz
(2.4 kB
view details)
File details
Details for the file scw-1.1.2.tar.gz
.
File metadata
- Download URL: scw-1.1.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7f9ad5fc5aa4e445b64a02d23b694758e6b51d61afefaaf7e9233c6515c415 |
|
MD5 | cf2bbfa411802e74a7d4db0891c2a103 |
|
BLAKE2b-256 | c0cda8be5ec0460a0b6c1f5260828615e9f8abe988967fc44d2f2feb89cf5933 |