Git Product home page Git Product logo

kmeans_smote's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar felix-last avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kmeans_smote's Issues

consultant

The input space is the entire data set or just a few class data sets in the data set?

Installation for Python2 fails

It seems that the latest version is not compatible with Python2:

image

Clearly, Python2's open() function does not have the argument 'encoding', which causes the error in installation. Is there any previous version of the library compatible with python2?

help

Hello, can you tell me?how to run test_kmeans_smote.py,and how to call those test functions, I have already said that the value of the plot is changed to True, but the result is the following error.---------------------------------------------------------------------------

TypeError Traceback (most recent call last)
in
----> 1 test_smoke(True)

in test_smoke(plot)
48
49 """Execute k-means SMOTE with default parameters"""
---> 50 kmeans_smote = KMeansSMOTE(random_state=RND_SEED)
51 X_resampled, y_resampled = kmeans_smote.fit_sample(X, Y)
52

TypeError: Can't instantiate abstract class KMeansSMOTE with abstract methods _sample

multiclass dataset

your proposed hybrid approach is it applicable for multiclass dataset?

TypeError: Can't instantiate abstract class KMeansSMOTE with abstract methods _fit_resample

Hi, @felix-last Thanks for sharing your great job. When I run the following codes, I met a Type Error. It seems that KMeansSMOTE didn't implement the abstract method _fit_resample. Can you help to fix it?

Using TensorFlow backend.
Class -1 has 896 instances
Class 1 has 41 instances
Traceback (most recent call last):
File "test_kmeans_smote.py", line 12, in
smote_args={'k_neighbors': 10})
TypeError: Can't instantiate abstract class KMeansSMOTE with abstract methods _fit_resample

import numpy as np
from imblearn.datasets import fetch_datasets
from kmeans_smote import KMeansSMOTE

datasets = fetch_datasets(filter_data=['oil'])
X, y = datasets['oil']['data'], datasets['oil']['target']

[print('Class {} has {} instances'.format(label, count))
 for label, count in zip(*np.unique(y, return_counts=True))]

kmeans_smote = KMeansSMOTE(kmeans_args={'n_clusters': 100},
    smote_args={'k_neighbors': 10})
X_resampled, y_resampled = kmeans_smote.fit_sample(X, y)

[print('Class {} has {} instances after oversampling'.format(label, count))
 for label, count in zip(*np.unique(y_resampled, return_counts=True))]

kmeans_smote test

Why didn't I get the visualization after running the test program? I only got the results in the example, but there was no visualization after test_kemans_smote.py

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.