Skip to content

TorokLev/krnn_with_spatial_features

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KRNN with spatial features

Implementation of the technique described in

László et al (2018): Improving the Performance of the k Rare Class Nearest Neighbor Classifier by the Ranking of Point Patterns. In: Lecture Notes in Computer Science, vol 10833, p. 265-283

Installation

pip install git+https://github.com/gykovacs/krnn_with_spatial_features

Sample usage

# importing the dataset package from sklearn
import sklearn.datasets as sd

# import the KRNN_SF classifier
from KRNN_SF import KRNN_SF

# loading the IRIS dataset
X, y= sd.load_iris(return_X_y= True)

# turning the IRIS multi-classification problem into an unbalanced binary classification
y[y == 2]= 1

# fitting and predicting
krnn_sf= KRNN_SF(correction= 'r1')
krnn_sf.fit(X, y)
krnn_sf.predict_proba(X)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%