SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.10703 · 2020

ktrain: A Low-Code Library for Augmented Machine Learning

arXiv · PDF · Open in the Atlas

Code that ran

4 of 16 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 4 have no contract verdict; 0 failures of our instrument; 12 no recorded run), measured 2026-11-21; 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/2004.10703.json · badge: /api/ran/2004.10703.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
amaiya/ktrain canonical (classifier label)
classifier basis: census
0 ran · 10 no recorded run
Vakihito/SentimentYoutube community (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
AnneDirkson/FuzzyBIO community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
average Ran
ran on a synthesized input
Vakihito/SentimentYoutube/SentimentYoutube/utils.py
code served (permissive licence) · get_code("a546a84ed55f0567")
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 float, ndim 0, dtype family float, 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 numpy as np

torch.manual_seed(0)

# The function 'average' takes a list and computes the average of its elements
# It handles empty lists by returning 0
# It uses len() on the list and sum() on the list

lista = [1, 2, 3, 4, 5]

ARGS = {
    "lista": lista
}
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 float, ndim 0, dtype family float, 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
consent_values Ran
ran on a synthesized input
Vakihito/SentimentYoutube/SentimentYoutube/utils.py
code served (permissive licence) · get_code("eac2c90e74cdf386")
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 float, ndim 0, dtype family float, 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

torch.manual_seed(0)

# The function consent_values takes a sentiment_list parameter
# It iterates through the list checking if any two elements have opposite signs (multiply to negative)
# If they do, it returns 0
# Otherwise it returns the sum of the list

# Create a valid sentiment_list argument
# A list of numbers (floats or ints) representing sentiment values
sentiment_list = [0.5, 0.3, 0.8, 0.2]

ARGS = {
    "sentiment_list": sentiment_list
}
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 float, ndim 0, dtype family float, 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
load_obj Ran
ran on a synthesized input
AnneDirkson/FuzzyBIO/src/BERTforNERktrain.py
code served (permissive licence) · get_code("7623c86a08659fbe")
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 pickle
import tempfile
import os

# Create a temporary directory for pickle files
temp_dir = tempfile.mkdtemp()

# Create a sample pickle file
sample_data = {
    'key1': 'value1',
    'key2': [1, 2, 3],
    'key3': {'nested': 'dict'}
}

# Write the pickle file
pickle_path = os.path.join(temp_dir, 'test_object')
with open(pickle_path + '.pkl', 'wb') as f:
    pickle.dump(sample_data, f)

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'name': 'test_object'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
prop_of_having_face Ran
ran on a synthesized input
Vakihito/SentimentYoutube/SentimentYoutube/utils.py
code served (permissive licence) · get_code("745a73e4dcbf8b2c")
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 float32, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 cv2
import numpy as np
import tempfile
import os

# Create a temporary directory for test images
temp_dir = tempfile.mkdtemp()

# Create a minimal test image (small RGB image)
test_image = np.random.randint(0, 256, (300, 300, 3), dtype=np.uint8)
test_image_path = os.path.join(temp_dir, "test_image.jpg")
cv2.imwrite(test_image_path, test_image)

# Load the pre-trained face detection model
modelFile = "opencv_face_detector_uint8.pb"
configFile = "opencv_face_detector.pbtxt"

# Create a minimal mock network since we can't download real weights
# We'll create a mock net object that has setInput and forward methods
class MockNet:
    def setInput(self, blob):
        pass
    
    def forward(self):
        # Return a mock detections array with shape (1, 1, 2, 7)
        # where detections[0, 0, i, 2] is confidence and detections[0, 0, i, 3:7] are box coords
        detections = np.zeros((1, 1, 2, 7), dtype=np.float32)
        # Add a detection with high confidence
        detections[0, 0, 0, 2] = 0.95  # confidence
        detections[0, 0, 0, 3:7] = [0.2, 0.2, 0.8, 0.8]  # normalized box coordinates
        # Add a detection with low confidence
        detections[0, 0, 1, 2] = 0.3  # confidence below threshold
        detections[0, 0, 1, 3:7] = [0.1, 0.1, 0.3, 0.3]
        return detections

# Create the mock network and inject it into cv2.dnn
net = MockNet()

# Inject the mock net into the global scope for the function
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'net', net)

ARGS = {
    "path": test_image_path,
    "confidence_arg": 0.8,
    "save_img": False,
    "show_img": False,
    "show_crop": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, ndim 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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
bn_drop_lin Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/models.py
code served (permissive licence) · get_code("d1b3148b0dd94979")
How it ran

no invocation recorded.

calc_pr Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/text/models.py
code served (permissive licence) · get_code("738bc41e073f5b3e")
How it ran

no invocation recorded.

calc_r Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/text/models.py
code served (permissive licence) · get_code("69a0c53d30354fa2")
How it ran

no invocation recorded.

get_bert_lex Not yet run
unverified (harvested, no recorded run)
Vakihito/SentimentYoutube/SentimentYoutube/BertLex.py
code served (permissive licence) · get_code("c7a8db5540f071a1")
How it ran

no invocation recorded.

get_bert_sent_features Not yet run
unverified (harvested, no recorded run)
Vakihito/SentimentYoutube/SentimentYoutube/BertLex.py
code served (permissive licence) · get_code("e64f0ee1bd42fbaf")
How it ran

no invocation recorded.

get_default_optimizer Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/utils.py
code served (permissive licence) · get_code("5001d8db76a12c5d")
How it ran

no invocation recorded.

graph_link_predictor Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/graph/models.py
code served (permissive licence) · get_code("0b73e2ecb02193e6")
How it ran

no invocation recorded.

graph_node_classifier Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/graph/models.py
code served (permissive licence) · get_code("3ab18e8bf72addb4")
How it ran

no invocation recorded.

is_ktrain_dataset Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/utils.py
code served (permissive licence) · get_code("4d757d2242837b26")
How it ran

no invocation recorded.

loss_fn_from_model Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/utils.py
code served (permissive licence) · get_code("2aa2f26504b22e81")
How it ran

no invocation recorded.

tabular_classifier Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/tabular/models.py
code served (permissive licence) · get_code("02d7dd5830f6012a")
How it ran

no invocation recorded.

tabular_regression_model Not yet run
unverified (harvested, no recorded run)
amaiya/ktrain/ktrain/tabular/models.py
code served (permissive licence) · get_code("908199ea5ec0d185")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 16 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.

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-21.

Repositories linked to this paper

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

Abstract

We present ktrain, a low-code Python library that makes machine learning more accessible and easier to apply. As a wrapper to TensorFlow and many other libraries (e.g., transformers, scikit-learn, stellargraph), it is designed to make sophisticated, state-of-the-art machine learning models simple to build, train, inspect, and apply by both beginners and experienced practitioners. Featuring modules that support text data (e.g., text classification, sequence tagging, open-domain question-answering), vision data (e.g., image classification), graph data (e.g., node classification, link prediction), and tabular data, ktrain presents a simple unified interface enabling one to quickly solve a wide range of tasks in as little as three or four "commands" or lines of code.

For agents

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

get_harvested_code_for_paper("2004.10703")
get_code_for_paper("2004.10703")
have("2004.10703")

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

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

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

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

Connect an agent — have() is free.