Git Product home page Git Product logo

Comments (1)

ThomasBury avatar ThomasBury commented on May 27, 2024

Hi @cryptocoinserver , it works fine on my side (see reproducible example). Could you pip install -u arfs, it should fix it.

from sklearn.datasets import load_wine
import pandas as pd
import arfs
from arfs.allrelevant import GrootCV
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split

#loading the dataset
X1 = load_wine()
df_1 = pd.DataFrame(X1.data, columns=X1.feature_names)
Y_1 = X1.target

#Scaling using the Standard Scaler
sc_1 = StandardScaler()
sc_1.fit(df_1)
X_1 = pd.DataFrame(sc_1.fit_transform(df_1))

print(f'Testing with ARFS version {arfs.__version__}')
print(f"There are {len(np.unique(Y_1))} classes")

#train-test-split
X_train, X_test, y_train, y_test = train_test_split(X_1, Y_1, test_size=0.4, random_state=0)

feat_selector = GrootCV(objective='multiclass', cutoff=1, n_folds=5, n_iter=5, silent=True)
feat_selector.fit(X_train, y_train, sample_weight=None)

print(feat_selector.support_names_)
fig = feat_selector.plot_importance(n_feat_per_inch=5)

image

from arfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.