curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"above_noise": 123,
"below_noise": 123,
"cases": 123,
"completed": 123,
"created_at": "2023-11-07T05:31:56Z",
"effect": 123,
"element": "constraints",
"engaged": {
"gained": 123,
"items": 123,
"kept": 123,
"lost": 123,
"shown": 123,
"mean_shift": 123
},
"limits": [
"not_quality"
],
"noise_floor": 123,
"overlap": 123,
"p_value": 123,
"run_id": "<string>",
"ties": 123,
"tool": "<string>",
"label": "<string>",
"skipped": {}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Read a counterfactual
One report: overlap, noise floor, effect, p-value and the limits it declares itself.
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/measure/counterfactual-runs/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"above_noise": 123,
"below_noise": 123,
"cases": 123,
"completed": 123,
"created_at": "2023-11-07T05:31:56Z",
"effect": 123,
"element": "constraints",
"engaged": {
"gained": 123,
"items": 123,
"kept": 123,
"lost": 123,
"shown": 123,
"mean_shift": 123
},
"limits": [
"not_quality"
],
"noise_floor": 123,
"overlap": 123,
"p_value": 123,
"run_id": "<string>",
"ties": 123,
"tool": "<string>",
"label": "<string>",
"skipped": {}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
nia_sk_...
Path Parameters
Response
The report.
Whether the element changes what the tool returns, beyond the tool's own noise. It never says whether
the result got better, nor how the model reacts: limits says so, and what else holds the answer
back.
Completed cases whose overlap is below their own noise.
noise_floor - overlap: how much of the first positions the element moves beyond noise.
constraints, hard, size, exclude Where the items the person engaged with went without the element, over the completed cases.
Show child attributes
Show child attributes
not_quality, model_reaction_not_measured, trivial_for_hard, few_cases, noisy_tool, cases_skipped, dry_run Mean overlap@k of the base with itself.
Mean overlap@k of the base and the variant.
The two-sided sign test of below_noise against above_noise: how likely a split this uneven is when the element changes nothing.
1 - 512The cases not completed.
Show child attributes
Show child attributes

