Skip to content

seo-young-kim/GDBFS_deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of Geometric Distance Based Feature Selection

This package is intended for use with 'geometric distance based feature selection'. For more information on this feature selection, please refer to 'https://github.com/seo-young-kim/GeometricDistanceBasedFeatureSelection'

pip install gdbfs 

How to Use

Currently, only functions implemented in the sequential forward selection method exist. Therefore, import sfs of the package and use it with fit() function.

from gdbfs import sfs

fit()

arguments

  1. the entire dataframe for the data.
  2. the target columns name.

return
Print the process of selecting with added feature name and evaluated value.
return a subset of the selected features using the gdbfs.

for a instance, we can select best features int iris problem as follows:

  1. make dataframe that contains all information (data,target)
from sklearn.datasets import load_iris
import pandas as pd

data = load_iris()
df = pd.DataFrame(data.data)
df['result']=data.target
  1. call fit with two arguments
sfs.fit(df,'result')
  1. result

print

   feature to add     gdbfs
0               2  2.215350
1               0  2.969618
2               3  2.521875
3               1  2.533693

return

array([[2],
       [0]], dtype=int64)

seoykim996@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages