← causalscience

Public SDK methods

The app calls the unmodified CausalScience 0.1.0a13 SDK. This page explains the app's request and result contract. The actual options, methods and diagnostics belong to each returned result.

Target and meanings

APO is the mean outcome under a complete fixed-action assignment. ATE is that mean minus the mean under a reference assignment. The complete ordered outcome list, original graph, complete actions and observed rows are explicit inputs.

Identify asks whether the graph query has an observational formula. Estimate asks whether the SDK can execute its supported numerical route on the supplied data. Neither step verifies that the assumed graph is true.

Which public API runs?

ActionPublic callMeaning
Identifycs.identify_querySubmit the full ordered outcome list once; return the actual identification status, method, reason and supported expression metadata.
APOcs.fit_query_meanIdentify and fit the complete ordered outcome list in one call using the original graph and observed DataFrame; retain the returned mean vector.
ATETwo cs.fit_query_mean callsUse the same original graph, complete ordered outcome list, data and options for both regimes, then subtract their supported mean vectors coordinate by coordinate.

The app uses import causalscience as cs. The public default numerical backend is score. In the automatic score route, the SDK checks fixed_MC and then MC within the configured search limits. Details shows the method name exactly as returned, separately from a computation mode such as UCA_SCORE.

backend="native" names a different plug-in method in the SDK. It does not mean “CPython rather than WebAssembly.” Running the app's score replay in native Python still uses backend="score".

The previous app-specific AIPW, IPW, Outcome Regression and general-ID numerical routines are not fallback methods for this route. A graph-free API would record a user-supplied identifying assumption; it cannot replace a failed graph verification.

For multiple outcomes, a joint fit can differ numerically from separate singleton fits. The app preserves the original full-list query. Outcome cards only select display coordinates from the returned vector; they do not refit individual outcomes. An earlier Identify result is not passed to fit_query_mean as a substitute for its own identification. Details preserves the actual call, options and results for the numerical request.

Original graph and bound data

The adapter passes the full graph and complete action assignment to the SDK. Observed/Unobserved flags, variable types, dimensions, ordered source columns and supports belong to graph or schema metadata. Visual coordinates do not define causal relationships.

Every observed variable used by the request needs a numeric column binding. Unobserved variables have no observed-data column. A logical vector node retains its ordered members; mapping several columns does not create independent causal variables.

The same retained row order and column bindings are recorded for replay. Duplicate headers, reused bindings and invalid selected cells must be corrected rather than silently dropped or imputed. Extra columns are not causal covariates merely because they are present in the CSV.

A binary declaration supplies support 0/1. Observed unique values or sample min/max are not population-support certificates. Sampling independence, consistency, exchangeability, overlap and learning assumptions remain substantive requirements.

Finite discrete execution can use the SDK's declared prior-mass design. A finite result under a positive prior does not prove that every requested action or state was observed. Inspect the original support, prior and inference diagnostics.

Status, diagnostics and uncertainty

Returned fieldInterpretation
statusThe SDK's identification result. ACCEPT concerns the supported identifying expression.
estimation_statusThe separate numerical execution result. ACCEPT identification can coexist with UNSUPPORTED estimation.
reasonThe actual explanation for failure, unfinished search or unsupported execution.
causal_interval, confidence_intervalPreserved as returned. None is not replaced with zero-width or fitted-score uncertainty.
conditional_score_intervalConditional fitted-score inference under the SDK's recorded assumptions; not an automatic causal confidence interval.

An unfinished or unsupported search is not a non-identification proof. A supported formula is not a guarantee that the numerical backend can execute the input. Malformed inputs can raise an exception; the adapter reports its reason rather than calculating with a replacement method.

The original SDK diagnostics describe what ran, including support, numerical design, weighting and inference fields where returned. The frontend does not redefine a balancing objective or add a positive weight floor. A successful fit or finite estimate is not a certificate of causal validity.

ATE is a coordinatewise difference of two full-outcome mean vectors in this integration. The app retains each SDK result and does not combine separate score intervals or standard errors into a causal ATE interval. Failed or unsupported component means do not yield a substituted contrast.

Requests outside this integration

The default public score route supports declared discrete actions. Continuous fixed-point interventions are unsupported by that route. The SDK reports that such point interventions have singular source designs; the app does not discretize the treatment or silently select another model.

Arbitrary Conditioning on and counterfactual factual-evidence requests are not arguments supported by this app's fit_query_mean route. They remain explicit UNSUPPORTED cases. No unconditional estimate, legacy conditional regression or simulated answer is substituted.

Public graph-free means, paired effect and CATE APIs have separate contracts. Their existence does not imply that the same controls or guarantees are available in this graph-based app. IV assumptions, bounds, Difference-in-Differences and Synthetic Control are not active app estimators.

Synthetic data controls

Synthetic generation and estimation are distinct operations. Where generation is supported, its metadata describes how the retained observed rows were made. The numerical SDK fit uses those rows and the declared graph, not hidden simulator values or known answers. Unsupported generation settings retain their actual error.

Model references

The current public SDK app route does not compute or display analytic or Monte Carlo model-reference comparisons. This app-level limitation does not deny the public SDK's separate interventional-sampling capabilities. Benchmark reference metadata, when matched, is displayed separately from the SDK estimate. Hidden simulator values and reference answers are not estimation inputs.

Benchmark references

Compatible benchmark data supply working observed columns with explicit bindings. A released reference is separate source metadata, not an SDK output. It is displayed only when dataset ID, row count, factual-data hash, treatment/outcome bindings and requested regime match. The reference value, definition and provenance are shown outside the raw SDK result. APO uses supplied expected outcomes averaged over the released rows; ATE uses supplied expected effects over those rows. These are not population means or averages of noisy realized differences. LaLonde remains N/A with its original source reason. Reference effects and counterfactual answers are excluded from estimation inputs. An ordinary CSV upload supplies no causal ground truth.

Replay the actual public API request

  1. Open the result's Details → Calculation code.
  2. Download the retained CSV and adapter-generated Python script.
  3. Install CausalScience==0.1.0a13 in your Python environment.
  4. Run the script with the CSV in the same folder.

The script uses import causalscience as cs and restores the actual original graph, variable metadata, ordered columns, bindings, the complete ordered outcome list, action/reference assignments, seed, backend, learner options and search limits. It calls the public API directly and preserves unsupported cases. It does not embed another numerical estimator.

Details records the public wheel hash and actual runtime dependency versions. The replay checks the recorded package/dependency versions and data hash and stops on a mismatch. Match the recorded versions before comparing results. Native Python and Pyodide may still use different builds; bitwise equality across environments is not promised.

The browser runs Pyodide 0.27.7 and loads the unmodified public SDK in memory. The initial runtime and dependency downloads require network access. CSV parsing and numerical calculation stay on the device.

Public API sources

The returned SDK fields are the source for each result's method, options and diagnostics. Use the public documentation for the underlying API conditions rather than inferring them from a template name.

Document · Official Wiki · Installation · App guide · Code & install