https://github.com/hrolfrc/score-regression
Classifier that maximizes score as a function of features.
https://github.com/hrolfrc/score-regression
classification-algorithm
Last synced: 14 days ago
JSON representation
Classifier that maximizes score as a function of features.
- Host: GitHub
- URL: https://github.com/hrolfrc/score-regression
- Owner: hrolfrc
- License: bsd-3-clause
- Created: 2023-08-02T15:41:57.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-28T22:10:23.000Z (almost 3 years ago)
- Last Synced: 2024-04-17T19:16:31.746Z (about 2 years ago)
- Topics: classification-algorithm
- Language: Python
- Homepage: https://www.nature.com/articles/s41598-022-09415-2
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quick Start
```python
from score_regression import ScoreRegression
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
```
#### Make a classification problem
```python
seed = 42
X, y = make_classification(
n_samples=30,
n_features=5,
n_informative=2,
n_redundant=2,
n_classes=2,
random_state=seed
)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=seed)
```
#### Train the classifier
```python
cls = ScoreRegression().fit(X_train, y_train)
```
#### Get the score on unseen data
```python
cls.score(X_test, y_test)
```
1.0