SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.03500 · 2019

Self-paced Ensemble for Highly Imbalanced Massive Data Classification

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1909.03500.json · badge: /api/ran/1909.03500.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ZhiningLiu1998/self-paced-ensemble canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
FunctionStatusWhere it lives
check_n_target_samples Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation_param.py
code served (permissive licence) · get_code("191e69f2dc4a7ca7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections import Counter

torch.manual_seed(0)

# Analyzing the function signature from the incomplete code:
# def check_n_target_samples(y, n_target_samples, sampling_type):
# The function takes:
# 1. y - a target/label array/list that gets passed to Counter
# 2. n_target_samples - either an int or a dict based on the helper functions
# 3. sampling_type - one of the SAMPLING_KIND values

# Create sample label data for a multi-class classification problem
y = [0, 0, 0, 1, 1, 2, 2, 2, 2]  # 3 samples class 0, 2 samples class 1, 4 samples class 2

# For n_target_samples, we'll use an int value that's valid for over-sampling
# The min class has 2 samples, max has 4
# For over-sampling, n_target_samples must be > min_class_samples (> 2)
n_target_samples = 3

# sampling_type must be one of the valid options
sampling_type = 'over-sampling'

ARGS = {
    'y': y,
    'n_target_samples': n_target_samples,
    'sampling_type': sampling_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_sampling_strategy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation.py
code served (permissive licence) · get_code("a6714376095e7577")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned OrderedDict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from collections import OrderedDict

# Create a simple imbalanced classification target array
y = np.array([0, 0, 0, 0, 0, 1, 1, 2, 2, 2])

# Create valid sampling_strategy values to test
sampling_strategy_dict = {0: 5, 1: 5, 2: 5}
sampling_strategy_str = 'auto'

ARGS = {
    'sampling_strategy': sampling_strategy_dict,
    'y': y,
    'sampling_type': 'over-sampling'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_target_label Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation_param.py
code served (permissive licence) · get_code("0d7d1a79c88c9f3d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numbers
from collections import Counter

# Analyze the function:
# - y: used with Counter(y), so needs to be iterable
# - target_label: checked if it's an Integral, then checked if it's in target_stats.keys()
# - sampling_type: not used in the function body

# Create a simple list of labels (y parameter)
y = [0, 1, 1, 2, 2, 2]

# Create a valid target_label that exists in y
target_label = 1

# sampling_type is not used, so any value works
sampling_type = "over"

ARGS = {
    "y": y,
    "target_label": target_label,
    "sampling_type": sampling_type,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_target_type Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation.py
code served (permissive licence) · get_code("8dc1dbc6e2b2e261")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Test case 1: Binary classification target
y_binary = np.array([0, 1, 1, 0, 1])

# Test case 2: Multiclass target
y_multiclass = np.array([0, 1, 2, 1, 0, 2])

# Test case 3: Multilabel-indicator (one-hot encoded, one label per sample)
y_multilabel = np.array([[1, 0, 0],
                          [0, 1, 0],
                          [0, 0, 1],
                          [1, 0, 0]])

ARGS = {
    "y": y_binary,
    "indicate_one_vs_all": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
imbalance_train_test_split Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_utils.py
code served (permissive licence) · get_code("73c1261f7af67bdb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a simple imbalanced binary classification dataset
np.random.seed(0)

# Create majority class (class 0) - 80 samples
X_maj = np.random.randn(80, 4)
y_maj = np.zeros(80, dtype=int)

# Create minority class (class 1) - 20 samples
X_min = np.random.randn(20, 4)
y_min = np.ones(20, dtype=int)

# Combine into full dataset
X = np.vstack([X_maj, X_min])
y = np.hstack([y_maj, y_min])

# Shuffle to mix classes
shuffle_idx = np.random.permutation(len(X))
X = X[shuffle_idx]
y = y[shuffle_idx]

ARGS = {
    'X': X,
    'y': y,
    'test_size': 0.2,
    'random_state': 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_binary_classification_target Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_utils.py
code served (permissive licence) · get_code("7128f053169a319a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family int, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for make_binary_classification_target
# The function takes y (array/tensor), pos_label (scalar), and verbose (bool)

# Create a multi-class target array with 4 samples and classes 0, 1, 2, 3
y = torch.tensor([0, 1, 2, 3], dtype=torch.long)

# Choose a positive label to convert to binary classification
pos_label = 2

# Set verbose flag
verbose = False

ARGS = {
    'y': y,
    'pos_label': pos_label,
    'verbose': verbose
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
plot_class_distribution Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_plot.py
code served (permissive licence) · get_code("1c0a7146d1bf4c80")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Axes. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import matplotlib.pyplot as plt
from collections import Counter

# Create a small sample classification target
y = [0, 1, 1, 2, 0, 1, 2, 2, 0, 1]

# Create a matplotlib axes object
fig, ax = plt.subplots()

ARGS = {
    'y': y,
    'ax': ax,
    'title': 'Test Class Distribution',
    'sort_values': False,
    'plot_average': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Axes — a Axes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Axes output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
set_ax_border Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_plot.py
code served (permissive licence) · get_code("5feff5207339c493")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Axes. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import matplotlib.pyplot as plt

# Create a matplotlib figure and axis
fig, ax = plt.subplots()

# The function expects ax to have a .spines attribute (dict-like)
# and each spine to have set_color() and set_linewidth() methods
# These are standard matplotlib Axes properties, so we just need a real ax object

ARGS = {
    'ax': ax,
    'border_color': 'black',
    'border_width': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Axes — a Axes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Axes output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sort_dict_by_key Ran
ran on a synthesized input
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/self_paced_ensemble/base.py
code served (permissive licence) · get_code("725d4912711bd963")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function sort_dict_by_key takes a dict and sorts it by keys
# It calls .items() on the dict and uses sorted() with a lambda on keys
# So we need a simple dict with various key types to test sorting

d = {
    "zebra": 1,
    "apple": 2,
    "monkey": 3,
    "banana": 4,
}

ARGS = {
    "d": d,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_eval_datasets Not yet run
unverified (harvested, no recorded run)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation_data.py
code served (permissive licence) · get_code("fe7f7070ccd65a42")
How it ran

no invocation recorded.

check_target_label_and_n_target_samples Not yet run
unverified (harvested, no recorded run)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_validation_param.py
code served (permissive licence) · get_code("b174867866f9c61e")
How it ran

no invocation recorded.

load_covtype_dataset Not yet run
unverified (harvested, no recorded run)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_utils.py
code served (permissive licence) · get_code("54be56bd49600894")
How it ran

no invocation recorded.

plot_scatter Not yet run
unverified (harvested, no recorded run)
ZhiningLiu1998/self-paced-ensemble/self_paced_ensemble/utils/_plot.py
code served (permissive licence) · get_code("8684fa95672d989e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
check_sampling_strategy 1 other paper
1 dated earlier
1609.06570 (2016-09)
Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning
check_target_type 1 other paper
1 dated earlier
1609.06570 (2016-09)
Imbalanced-learn: A Python Toolbox to Tackle the Curse of Imbalanced Datasets in Machine Learning
sort_dict_by_key 1 other paper
1 later
2505.17451 (2025-05)
CLIMB: Class-imbalanced Learning Benchmark on Tabular Data

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many real-world applications reveal difficulties in learning classifiers from imbalanced data. The rising big data era has been witnessing more classification tasks with large-scale but extremely imbalance and low-quality datasets. Most of existing learning methods suffer from poor performance or low computation efficiency under such a scenario. To tackle this problem, we conduct deep investigations into the nature of class imbalance, which reveals that not only the disproportion between classes, but also other difficulties embedded in the nature of data, especially, noises and class overlapping, prevent us from learning effective classifiers. Taking those factors into consideration, we propose a novel framework for imbalance classification that aims to generate a strong ensemble by self-paced harmonizing data hardness via under-sampling. Extensive experiments have shown that this new framework, while being very computationally efficient, can lead to robust performance even under highly overlapping classes and extremely skewed distribution. Note that, our methods can be easily adapted to most of existing learning methods (e.g., C4.5, SVM, GBDT and Neural Network) to boost their performance on imbalanced data.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1909.03500")
get_code_for_paper("1909.03500")
have("1909.03500")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1909.03500.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1909.03500.svg)](https://syntology.ai/paper/1909.03500)

Connect an agent — have() is free.