task_id
stringlengths
6
6
category
stringclasses
5 values
prompt
stringlengths
86
304
datasets
stringclasses
1 value
seed
int64
20.3M
20.3M
expected_output
stringlengths
51
127
sk-000
preprocessing
Fit a StandardScaler on X_clf and return its per-feature mean_, rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.058753, -0.037808, -0.053043, -0.0129, -0.249795, 0.018859, -0.362284, 0.018563], "dtype": "float64", "shape": [8]}
sk-001
preprocessing
Fit a StandardScaler on X_clf, transform it, and return a 2-element array [mean of the transformed matrix, std of the transformed matrix], each rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [-0.0, 1.0], "dtype": "float64", "shape": [2]}
sk-002
preprocessing
Fit a MinMaxScaler on X_clf, transform it, and return a 2-element array [min of the result, max of the result], rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.0, 1.0], "dtype": "float64", "shape": [2]}
sk-003
preprocessing
Fit PCA(n_components=3, random_state=20260806) on X_clf and return its explained_variance_ratio_, rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.588764, 0.132395, 0.096792], "dtype": "float64", "shape": [3]}
sk-004
preprocessing
Apply SelectKBest(f_classif, k=4) to (X_clf, y_clf) and return the 0-based indices of the selected features as a sorted int array.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [2, 3, 4, 6], "dtype": "int64", "shape": [4]}
sk-005
preprocessing
Split (X_clf, y_clf) with train_test_split(test_size=0.25, random_state=20260806, stratify=y_clf) and return a 4-element int array [n_train_rows, n_test_rows, positives in train, positives in test].
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [225, 75, 113, 37], "dtype": "int64", "shape": [4]}
sk-006
classification
Split (X_clf, y_clf) with train_test_split(test_size=0.25, random_state=20260806, stratify=y_clf). Fit LogisticRegression(max_iter=1000, random_state=20260806) on the train split and return a 1-element array with the test accuracy rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.693333], "dtype": "float64", "shape": [1]}
sk-007
classification
Same split as above. Fit RandomForestClassifier(n_estimators=50, random_state=20260806, n_jobs=1) and return a 1-element array with the test accuracy rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.813333], "dtype": "float64", "shape": [1]}
sk-008
classification
Same split as above. Fit DecisionTreeClassifier(max_depth=4, random_state=20260806) and return its feature_importances_ rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.107393, 0.051301, 0.082084, 0.0, 0.0, 0.372747, 0.364173, 0.022301], "dtype": "float64", "shape": [8]}
sk-009
classification
Same split as above. Fit a Pipeline of StandardScaler then SVC(kernel='rbf', random_state=20260806) and return a 1-element array with the test accuracy rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.813333], "dtype": "float64", "shape": [1]}
sk-010
classification
Same split as above. Fit GradientBoostingClassifier(n_estimators=40, random_state=20260806) and return a 1-element array with the test accuracy rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.826667], "dtype": "float64", "shape": [1]}
sk-011
classification
Same split as above. Fit LogisticRegression(max_iter=1000, random_state=20260806) and return the first 10 predicted TEST labels as an int array, in test-set order.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0, 1, 1, 0, 1, 0, 0, 0, 0, 0], "dtype": "int64", "shape": [10]}
sk-012
metrics
Split (X_imb, y_imb) with train_test_split(test_size=0.25, random_state=20260806, stratify=y_imb). Fit LogisticRegression(max_iter=1000, random_state=20260806) and return a 4-element array [accuracy, precision, recall, f1] on the test split, each rounded to 6 decimals. Use zero_division=0 for precision.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.97, 1.0, 0.7, 0.823529], "dtype": "float64", "shape": [4]}
sk-013
metrics
Same imbalanced split. Fit LogisticRegression(max_iter=1000, random_state=20260806) and return a 1-element array with the test ROC AUC computed from predict_proba, rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.987778], "dtype": "float64", "shape": [1]}
sk-014
metrics
Same imbalanced split. Return a 4-element int array with the confusion-matrix counts [tn, fp, fn, tp] for LogisticRegression(max_iter=1000, random_state=20260806) on the test split.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [90, 0, 3, 7], "dtype": "int64", "shape": [4]}
sk-015
metrics
Return a 2-element array [number of class-0 samples, number of class-1 samples] in y_imb, as int64.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [358, 42], "dtype": "int64", "shape": [2]}
sk-016
regression
Split (X_reg, y_reg) with train_test_split(test_size=0.25, random_state=20260806). Fit LinearRegression and return a 3-element array [R2, MAE, RMSE] on the test split, each rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.981652, 6.978677, 8.68575], "dtype": "float64", "shape": [3]}
sk-017
regression
Same regression split. Fit LinearRegression and return its coef_ rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [1.00929, 0.305271, 26.87147, 60.479451, 15.443362], "dtype": "float64", "shape": [5]}
sk-018
regression
Same regression split. Fit Ridge(alpha=10.0, random_state=20260806) and return a 1-element array with the test R2 rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.975896], "dtype": "float64", "shape": [1]}
sk-019
regression
Same regression split. Fit a Pipeline of StandardScaler then Ridge(alpha=1.0, random_state=20260806) and return the first 5 test predictions rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [47.800108, 6.009665, 75.209202, 41.860588, 15.131067], "dtype": "float64", "shape": [5]}
sk-020
validation
Run cross_val_score on the FULL (X_clf, y_clf) with LogisticRegression(max_iter=1000, random_state=20260806), cv=KFold(n_splits=5, shuffle=True, random_state=20260806), scoring 'accuracy', and return the 5 fold scores rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.666667, 0.65, 0.7, 0.683333, 0.6], "dtype": "float64", "shape": [5]}
sk-021
validation
Same cross-validation setup, but score a Pipeline of StandardScaler then LogisticRegression(max_iter=1000, random_state=20260806) — so the scaler is fitted INSIDE each fold. Return the 5 fold scores rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.666667, 0.666667, 0.7, 0.683333, 0.616667], "dtype": "float64", "shape": [5]}
sk-022
validation
Same cross-validation setup with RandomForestClassifier(n_estimators=40, random_state=20260806, n_jobs=1). Return a 2-element array [mean score, std of scores], rounded to 6 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [0.83, 0.032318], "dtype": "float64", "shape": [2]}
sk-023
validation
Fit KMeans(n_clusters=3, n_init=10, random_state=20260806) on X_clf and return a 1-element array with its inertia_ rounded to 4 decimals.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [3216.3212], "dtype": "float64", "shape": [1]}
sk-024
validation
Fit KMeans(n_clusters=3, n_init=10, random_state=20260806) on X_clf and return the size of each cluster as an int array, ordered by cluster label.
Three datasets are preloaded, each generated with a fixed seed: X_clf, y_clf : make_classification(n_samples=300, n_features=8, n_informative=5, n_redundant=1, n_classes=2, random_state=20260806) X_imb, y_imb : make_classification(n_samples=400, n_features=6, n_informativ...
20,260,806
{"data": [117, 124, 59], "dtype": "int64", "shape": [3]}