Skip to content

[MRG + 1] Reorganize imports #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sys

import sphinx_rtd_theme

Expand Down
8 changes: 5 additions & 3 deletions examples/combine/plot_smote_enn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.combine import SMOTEENN

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.combine import SMOTEENN

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/combine/plot_smote_tomek.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.combine import SMOTETomek

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.combine import SMOTETomek

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
6 changes: 4 additions & 2 deletions examples/datasets/plot_make_imbalance.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_moons

from imblearn.datasets import make_imbalance

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_moons
from imblearn.datasets import make_imbalance


# Generate the dataset
Expand Down
10 changes: 6 additions & 4 deletions examples/ensemble/plot_balance_cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@

print(__doc__)

import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.ensemble import BalanceCascade

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.ensemble import BalanceCascade

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
10 changes: 6 additions & 4 deletions examples/ensemble/plot_easy_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@

print(__doc__)

import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.ensemble import EasyEnsemble

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.ensemble import EasyEnsemble

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_adasyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import ADASYN

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import ADASYN

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_random_over_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import RandomOverSampler

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import RandomOverSampler

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_smote.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_smote_bordeline_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_smote_bordeline_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/over-sampling/plot_smote_svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.over_sampling import SMOTE

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
7 changes: 3 additions & 4 deletions examples/pipeline/plot_pipeline_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
from sklearn.cross_validation import train_test_split as tts
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA
from sklearn.neighbors import KNeighborsClassifier as KNN
from sklearn.metrics import classification_report

from sklearn.neighbors import KNeighborsClassifier as KNN

from imblearn.pipeline import make_pipeline
from imblearn.under_sampling import EditedNearestNeighbours
from imblearn.under_sampling import RepeatedEditedNearestNeighbours
from imblearn.under_sampling import (EditedNearestNeighbours,
RepeatedEditedNearestNeighbours)

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=1.25, weights=[0.3, 0.7],
Expand Down
11 changes: 6 additions & 5 deletions examples/under-sampling/plot_allknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import (AllKNN, EditedNearestNeighbours,
RepeatedEditedNearestNeighbours)

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import EditedNearestNeighbours
from imblearn.under_sampling import RepeatedEditedNearestNeighbours
from imblearn.under_sampling import AllKNN

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=1.25, weights=[0.3, 0.7],
Expand Down
8 changes: 5 additions & 3 deletions examples/under-sampling/plot_cluster_centroids.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import ClusterCentroids

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import ClusterCentroids

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/under-sampling/plot_condensed_nearest_neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import CondensedNearestNeighbour

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import CondensedNearestNeighbour

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/under-sampling/plot_edited_nearest_neighbours.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import EditedNearestNeighbours

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import EditedNearestNeighbours

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=2, weights=[0.1, 0.9],
Expand Down
8 changes: 5 additions & 3 deletions examples/under-sampling/plot_instance_hardness_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@

import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import InstanceHardnessThreshold

sns.set()

# Define some color for the plotting
almost_black = '#262626'
palette = sns.color_palette()

from sklearn.datasets import make_classification
from sklearn.decomposition import PCA

from imblearn.under_sampling import InstanceHardnessThreshold

# Generate the dataset
X, y = make_classification(n_classes=2, class_sep=1., weights=[0.05, 0.95],
Expand Down
Loading