Skip to main content

NeighborhoodComponentsAnalysis

Nearest Neighbors standalone SDK operation. Source: 6.8.ML.Neighbors.cs. Read the complete C# integration test and setup.

14 recorded job(s); 14 have a success/completed status and a saved result. These are API records rather than independently verified test passes.

Recorded scenarios​

Recorded scenarioPartitionLast statusEvidenceJSON trace
LoadBreastCancer-TrainTestSplit-SimpleImputer-FunctionTransformer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0637
LoadBreastCancer-TrainTestSplit-SimpleImputer-KBinsDiscretizer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0645
LoadBreastCancer-TrainTestSplit-SimpleImputer-QuantileTransformer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0653
LoadBreastCancer-TrainTestSplit-SimpleImputer-StandardScaler / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0661
LoadBreastCancer-TrainTestSplit-SimpleImputer-normalize / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0669
LoadWine-TrainTestSplit-SimpleImputer-FunctionTransformer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0701
LoadWine-TrainTestSplit-SimpleImputer-KBinsDiscretizer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0709
LoadWine-TrainTestSplit-SimpleImputer-QuantileTransformer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0717
LoadWine-TrainTestSplit-SimpleImputer-StandardScaler / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0725
LoadWine-TrainTestSplit-SimpleImputer-normalize / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0733
MakeClassification-TrainTestSplit-SimpleImputer-KBinsDiscretizer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0741
MakeClassification-TrainTestSplit-SimpleImputer-QuantileTransformer / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0749
MakeClassification-TrainTestSplit-SimpleImputer-StandardScaler / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0757
MakeClassification-TrainTestSplit-SimpleImputer-normalize / NeighborhoodComponentsAnalysiswhole runcompletedResult recordedrun-0765

Representative execution​

Scenario: LoadBreastCancer-TrainTestSplit-SimpleImputer-FunctionTransformer / NeighborhoodComponentsAnalysis; partition: whole run; observed status: completed. run-0637 contains all recorded numbered JSON events for this job.

Operation selection in the C# test​

These are matching lines from the parameterized test, not a separate runnable program. See the full source for context.

"LocalOutlierFactor", "NearestCentroid", "NeighborhoodComponentsAnalysis",
or "NearestCentroid" or "NeighborhoodComponentsAnalysis" or "RadiusNeighborsClassifier"
or "NearestCentroid" or "NeighborhoodComponentsAnalysis"
"NeighborhoodComponentsAnalysis" => await SendTypedAsync(new NeighborhoodComponentsAnalysisJobSendRequestModel
ClassifierType = "NeighborhoodComponentsAnalysis",

Request​

{
"input": {
"train_blob_id": "6cd0072c-cacf-f966-963c-7dc144f9db7c",
"test_blob_id": "608f8ac2-dcb0-3eb6-7fa1-4c76b6136d96",
"classifier_type": "NeighborhoodComponentsAnalysis",
"classifier_params": {
"n_components": 2,
"max_iter": 50,
"random_state": 42
},
"feature_columns": [
"mean radius",
"mean texture",
"mean perimeter",
"mean area",
"mean smoothness",
"mean compactness",
"mean concavity",
"mean concave points",
"mean symmetry",
"mean fractal dimension",
"radius error",
"texture error",
"perimeter error",
"area error",
"smoothness error",
"compactness error",
"concavity error",
"concave points error",
"symmetry error",
"fractal dimension error",
"worst radius",
"worst texture",
"worst perimeter",
"worst area",
"worst smoothness",
"worst compactness",
"worst concavity",
"worst concave points",
"worst symmetry",
"worst fractal dimension"
],
"file_format": "csv",
"target_column": "target",
"generate_graphs": true
},
"output": {
"name": "LoadBreastCancer-TrainTestSplit-SimpleImputer-FunctionTransformer-NeighborhoodComponentsAnalysis.zip",
"description": "Neighbors integration test using cached numerical preprocessing outputs",
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"neighbors",
"LoadBreastCancer",
"FunctionTransformer",
"NeighborhoodComponentsAnalysis"
],
"artifact_contract_version": "2.0"
},
"request_timeout_seconds": 300
}

Send response​

{
"start_time": "2026-11-30T20:43:20.1133657+00:00",
"end_time": "2026-11-30T20:43:20.2064325+00:00",
"elapsed_milliseconds": 93.06,
"status": "published",
"job_id": "ff897e2c-037f-6fa0-ba4f-e1f1cbb9df65",
"topic": "pm.topic.ml.neighbors",
"subscription": "cpu.0p5c.1gi",
"send_request_model": {
"job_id": "ff897e2c-037f-6fa0-ba4f-e1f1cbb9df65",
"json": {
"job_id": "ff897e2c-037f-6fa0-ba4f-e1f1cbb9df65",
"model_id": "0092e982-80d0-a014-f4e5-efd5ad4b95a8",
"input": {
"train_blob_id": "6cd0072c-cacf-f966-963c-7dc144f9db7c",
"train_encryption_key": "[REDACTED]",
"test_blob_id": "608f8ac2-dcb0-3eb6-7fa1-4c76b6136d96",
"test_encryption_key": "[REDACTED]",
"classifier_type": "NeighborhoodComponentsAnalysis",
"classifier_params": {
"n_components": 2,
"max_iter": 50,
"random_state": 42
},
"feature_columns": [
"mean radius",
"mean texture",
"mean perimeter",
"mean area",
"mean smoothness",
"mean compactness",
"mean concavity",
"mean concave points",
"mean symmetry",
"mean fractal dimension",
"radius error",
"texture error",
"perimeter error",
"area error",
"smoothness error",
"compactness error",
"concavity error",
"concave points error",
"symmetry error",
"fractal dimension error",
"worst radius",
"worst texture",
"worst perimeter",
"worst area",
"worst smoothness",
"worst compactness",
"worst concavity",
"worst concave points",
"worst symmetry",
"worst fractal dimension"
],
"file_format": "csv"
},
"request_timeout_seconds": 300,
"output": {
"name": "LoadBreastCancer-TrainTestSplit-SimpleImputer-FunctionTransformer-NeighborhoodComponentsAnalysis.zip",
"description": "Neighbors integration test using cached numerical preprocessing outputs",
"record_type": "Generic",
"access_tier": "Hot",
"tags": [
"neighbors",
"LoadBreastCancer",
"FunctionTransformer",
"NeighborhoodComponentsAnalysis"
],
"encryption_key": "[REDACTED]",
"artifact_contract_version": "2.0"
},
"target_column": "target",
"evaluation": null,
"generate_graphs": true
},
"topic": "pm.topic.ml.neighbors",
"subscription": "cpu.0p5c.1gi"
}
}

Final recorded status​

{
"start_time": "2026-11-30T20:44:20.5462904+00:00",
"end_time": "2026-11-30T20:44:21.2133562+00:00",
"elapsed_milliseconds": 667.06,
"job_id": "ff897e2c-037f-6fa0-ba4f-e1f1cbb9df65",
"status": "completed",
"topic": "pm.topic.ml.neighbors",
"subscription": "cpu.0p5c.1gi"
}

Result response​

{
"schema_version": "2.0",
"job_id": "ff897e2c-037f-6fa0-ba4f-e1f1cbb9df65",
"model_id": "0092e982-80d0-a014-f4e5-efd5ad4b95a8",
"status": "succeeded",
"worker": {
"name": "neighbors",
"task_family": "feature_extraction",
"algorithm": "NeighborhoodComponentsAnalysis"
},
"input": {
"mode": "prepared_train_test",
"partitions": {
"train": {
"blob_id": "6cd0072c-cacf-f966-963c-7dc144f9db7c",
"row_count": 426
},
"test": {
"blob_id": "608f8ac2-dcb0-3eb6-7fa1-4c76b6136d96",
"row_count": 143
}
},
"feature_columns": [
"mean radius",
"mean texture",
"mean perimeter",
"mean area",
"mean smoothness",
"mean compactness",
"mean concavity",
"mean concave points",
"mean symmetry",
"mean fractal dimension",
"radius error",
"texture error",
"perimeter error",
"area error",
"smoothness error",
"compactness error",
"concavity error",
"concave points error",
"symmetry error",
"fractal dimension error",
"worst radius",
"worst texture",
"worst perimeter",
"worst area",
"worst smoothness",
"worst compactness",
"worst concavity",
"worst concave points",
"worst symmetry",
"worst fractal dimension"
],
"target_columns": [
"target"
]
},
"training": {
"effective_params": {
"callback": null,
"init": "auto",
"max_iter": 50,
"n_components": 2,
"random_state": 42,
"tol": 1e-05,
"verbose": 0,
"warm_start": false
},
"metrics": {}
},
"evaluation": {
"partition": "test",
"metrics": {
"scope": "holdout",
"sample_count": 143,
"output_dimension": 2,
"mean_neighbor_distance": null,
"graph_edge_count": null,
"mean_log_density": null,
"non_finite_log_density_count": null,
"outlier_count": null,
"outlier_fraction": null,
"mean_outlier_score": null
}
},
"artifact_files": [
"model/model.joblib",
"predictions/predictions.csv",
"graphs/output_distribution.png",
"graphs/output_distribution.svg",
"graphs/components.png",
"graphs/components.svg",
"result.json"
],
"extras": {
"algorithm": {
"learned": {
"n_features_in": 30,
"n_samples_fit": null,
"effective_metric": null,
"effective_metric_params": null,
"classes": null,
"centroids": null,
"class_prior": null,
"components": [
[
-6.607574382446629,
-16.349026245304145,
-4.586426817287238,
-15.046586262407494,
27.787740195007004,
9.159018987681572,
46.2061093127029,
38.147660410780524,
30.70791701239539,
2.8297343323515527,
18.79565436677802,
-9.300137045141277,
-61.43420958457984,
48.007572877045114,
8.61012552228897,
-7.086952567482621,
4.284809612611702,
6.999315414184744,
6.0325573517828035,
-0.5970230802486788,
16.72606016568151,
49.21051128713854,
-3.408687804263595,
39.23994206656293,
51.82313702876943,
-27.035881069734174,
35.04774767356817,
57.7322163031934,
56.33614831652269,
2.236827594741053
],
[
-2.3034758651639256,
-12.62375795724328,
-3.734877751250593,
-3.4543496570552787,
-0.08908723957324688,
-3.0077144491087044,
-4.810277681720118,
-2.3436851765457436,
-9.827847040223803,
-0.7699975959207637,
-3.2728244552486516,
9.759822903103304,
2.3715362603059056,
14.359974184532987,
0.12952490720615661,
0.6940786157148876,
1.2573337313662427,
-0.27328130892785435,
-4.446032692447345,
-0.38648566437993986,
-4.693933023054707,
-29.122942867169524,
-5.468602599417299,
-6.447623672559873,
-2.8133810796031193,
-9.715253306132887,
-7.794839330773968,
-6.001719408982555,
-22.661689131625593,
-3.368709250055705
]
],
"n_iter": 23,
"bandwidth": null,
"n_neighbors": null,
"offset": null
},
"warnings": [],
"data": {
"row_count": 569,
"column_count": 33,
"feature_count": 30,
"file_format": "csv",
"prediction_scope": "all_input_rows",
"training_row_indices": null
},
"runtime": {
"captured_at_utc": "2026-11-30T20:44:01.254106+00:00",
"python": {
"version": "3.12.16",
"implementation": "CPython"
},
"packages": {
"scikit-learn": "1.9.1",
"numpy": "2.5.4",
"pandas": "3.0.6",
"scipy": "1.18.1",
"pydantic": "2.14.1",
"joblib": "1.6.0",
"matplotlib": "3.11.2",
"azure-servicebus": "7.14.3",
"parallelmodel": "1.0.0"
},
"environment": {
"os": "Linux",
"os_release": "6.6.159.1-2.azl3",
"architecture": "x86_64",
"region": "uk1"
}
},
"execution": {
"executionName": "[REDACTED]",
"jobName": "[REDACTED]",
"container": {
"hostname": "[REDACTED]",
"replicaName": "[REDACTED]",
"processId": 1
}
}
},
"build": {
"built_at_utc": null,
"source": "unavailable",
"image_tag": null
}
}
}

First extract response​

{
"start_time": "2026-11-30T20:44:34.3228982+00:00",
"end_time": "2026-11-30T20:44:35.1239824+00:00",
"elapsed_milliseconds": 801.07,
"status": "uploaded",
"model_id": "0092e982-80d0-a014-f4e5-efd5ad4b95a8",
"source_blob_id": "db3e6980-8102-72ab-c6fb-15b42c4adcaa",
"uploaded_blob_id": "38a4ee78-d8e4-8fcb-d605-29fb23dc504f",
"filename": "56aa3459-2fd4-44da-b637-0a5dc06a095c.json",
"source_path": "result.json",
"source_format": "json",
"size_bytes": 6023,
"upload_status_code": 200
}

Logs​

The trace includes the saved log response (58 entries).

Reproduce the operation​

dotnet test --filter "FullyQualifiedName~ParallelModel.Sdk.UnitTests.Neighbors.Run"

The filter runs the class theory; use the recorded scenario values above to identify the corresponding parameter set. For partitioned operations, one theory can submit multiple jobs. The redacted payload identifiers are not usable live credentials or blob IDs.