BRAINIAC Predictive & Customer Analytics

Paid Predictive & Customer Analytics API via x402. Unpaid tool calls return 402.

我该使用它吗

质量与安全性

B
描述质量
100%
模式完整度
98%
命名质量
31%
投毒风险
100%
权限匹配度
100%
协议合规性
100%

发现(29)

  • LOWTool 'predictive-analytics_kmeans-cluster' doesn't follow camelCase/snake_case在 predictive-analytics_kmeans-cluster 中
  • LOWTool 'predictive-analytics_kmeans-cluster' name length outside 3-30 range在 predictive-analytics_kmeans-cluster 中
  • LOWTool 'predictive-analytics_dbscan-cluster' doesn't follow camelCase/snake_case在 predictive-analytics_dbscan-cluster 中
  • LOWTool 'predictive-analytics_dbscan-cluster' name length outside 3-30 range在 predictive-analytics_dbscan-cluster 中
  • LOWTool 'predictive-analytics_pca' doesn't follow camelCase/snake_case在 predictive-analytics_pca 中
  • LOWTool 'predictive-analytics_decision-tree-train' doesn't follow camelCase/snake_case在 predictive-analytics_decision-tree-train 中
  • LOWTool 'predictive-analytics_decision-tree-train' name length outside 3-30 range在 predictive-analytics_decision-tree-train 中
  • LOWTool 'predictive-analytics_random-forest-importance' doesn't follow camelCase/snake_case在 predictive-analytics_random-forest-importance 中
  • LOWTool 'predictive-analytics_random-forest-importance' name length outside 3-30 range在 predictive-analytics_random-forest-importance 中
  • LOWTool 'predictive-analytics_kaplan-meier-survival' doesn't follow camelCase/snake_case在 predictive-analytics_kaplan-meier-survival 中

基于对工具定义和协议合规性的自动分析。

上下文开销

~12,748token 数(工具定义)
~8.4 KB典型响应大小
对注意力有显著影响(占 128k 上下文窗口的 9.96%)

这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。

安装

一键安装

将以下内容添加到你的 `claude_desktop_config.json` 文件中:

{
  "mcpServers": {
    "predictive-analytics": {
      "url": "https://www.brainiac.software/mcp/predictive-analytics"
    }
  }
}

远程端点

https://www.brainiac.software/mcp/predictive-analyticsstreamable-http

它能做什么

工具清单

工具(15)

🟢 只读🟡 写入🔴 删除⚪ 未知
🟢predictive-analytics_kmeans-cluster(columns, rows, k, kRange, standardize, ...)

Lloyd k-means with k-means++ seeding, optional standardisation, nInit restarts, silhouette and inertia for a k range, and stable label renumbering. Docs: https://www.brainiac.software/api/predictive-analytics/kmeans-cluster Keywords: when scoring customers or a predictive model, columns, rows, kRange, standardize, seed, nInit, maxIter, labels, centroids, inertia, silhouette, kSelection, rowsUsed, droppedRows.

输入模式

{
  "type": "object",
  "properties": {
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "k": {
      "description": "k, integer, from 2 to 50. Optional.",
      "type": "integer",
      "minimum": 2,
      "maximum": 50
    },
    "kRange": {
      "description": "kRange, array. Optional.",
      "type": "array",
      "items": [
        {
          "type": "integer",
          "minimum": 2,
          "maximum": 9007199254740991
        },
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 50
        }
      ],
      "additionalItems": false,
      "minItems": 2,
      "maxItems": 2
    },
    "standardize": {
      "default": true,
      "description": "standardize, boolean. Required.",
      "type": "boolean"
    },
    "seed": {
      "default": 42,
      "description": "seed, integer, from -9007199254740991 to 9007199254740991. Required.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "nInit": {
      "default": 10,
      "description": "nInit, integer, from 1 to 50. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "maxIter": {
      "default": 300,
      "description": "maxIter, integer, from 1 to 1000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "columns",
    "rows"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "k": {
      "type": "number",
      "description": "k. Number."
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "labels. Array."
    },
    "centroids": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "description": "item. Number."
        },
        "description": "item. Array."
      },
      "description": "centroids. Array."
    },
    "inertia": {
      "type": "number",
      "description": "inertia. Number."
    },
    "silhouette": {
      "type": "number",
      "description": "silhouette. Number."
    },
    "kSelection": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "k": {
            "type": "number",
            "description": "k. Number."
          },
          "inertia": {
            "type": "number",
            "description": "inertia. Number."
          },
          "silhouette": {
            "type": "number",
            "description": "silhouette. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "kSelection. Array."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "droppedRows": {
      "type": "number",
      "description": "droppedRows. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_dbscan-cluster(columns, rows, eps, minSamples, metric, ...)

Density-based clustering with Euclidean or haversine distance, core/border/noise labelling, and an optional k-distance knee suggestion for eps. Docs: https://www.brainiac.software/api/predictive-analytics/dbscan-cluster Keywords: when scoring customers or a predictive model, columns, rows, eps, minSamples, metric, kDistance, labels, clusters, noise, corePoints, rowsUsed, droppedRows, caps, DBSCAN density clustering with noise labels.

输入模式

{
  "type": "object",
  "properties": {
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "eps": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "eps, number. Required."
    },
    "minSamples": {
      "default": 5,
      "description": "minSamples, integer, from 2 to 1000. Required.",
      "type": "integer",
      "minimum": 2,
      "maximum": 1000
    },
    "metric": {
      "default": "euclidean",
      "description": "metric, string, one of euclidean, haversine. Required.",
      "type": "string",
      "enum": [
        "euclidean",
        "haversine"
      ]
    },
    "kDistance": {
      "default": false,
      "description": "kDistance, boolean. Required.",
      "type": "boolean"
    }
  },
  "required": [
    "columns",
    "rows",
    "eps"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "labels": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "labels. Array."
    },
    "clusters": {
      "type": "number",
      "description": "clusters. Number."
    },
    "noise": {
      "type": "number",
      "description": "noise. Number."
    },
    "corePoints": {
      "type": "number",
      "description": "corePoints. Number."
    },
    "kDistance": {
      "type": "null",
      "description": "kDistance. Null."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "droppedRows": {
      "type": "number",
      "description": "droppedRows. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_pca(columns, rows, standardize, components, returnScores)

Centre (and optionally standardise) columns, decompose the covariance, and return eigenvalues, explained ratios, signed loadings and optional scores. Docs: https://www.brainiac.software/api/predictive-analytics/pca Keywords: when scoring customers or a predictive model, columns, rows, standardize, components, returnScores, eigenvalues, explainedRatio, loadings, scores, rowsUsed, droppedRows, caps, Principal component analysis.

输入模式

{
  "type": "object",
  "properties": {
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "standardize": {
      "default": false,
      "description": "standardize, boolean. Required.",
      "type": "boolean"
    },
    "components": {
      "description": "components, integer, from 1 to 100. Optional.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "returnScores": {
      "default": true,
      "description": "returnScores, boolean. Required.",
      "type": "boolean"
    }
  },
  "required": [
    "columns",
    "rows"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "eigenvalues": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "eigenvalues. Array."
    },
    "explainedRatio": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "explainedRatio. Array."
    },
    "loadings": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "description": "item. Number."
        },
        "description": "item. Array."
      },
      "description": "loadings. Array."
    },
    "scores": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "description": "item. Number."
        },
        "description": "item. Array."
      },
      "description": "scores. Array."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "droppedRows": {
      "type": "number",
      "description": "droppedRows. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_decision-tree-train(task, columns, rows, target, maxDepth, ...)

Fit a classification or regression CART tree with depth and leaf limits, readable rules, feature importance and optional predictions. Docs: https://www.brainiac.software/api/predictive-analytics/decision-tree-train Keywords: when scoring customers or a predictive model, task, columns, rows, target, maxDepth, minSamplesLeaf, predict, rules, tree, featureImportance, trainAccuracy, predictions, warnings, rowsUsed.

输入模式

{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "enum": [
        "classification",
        "regression"
      ],
      "description": "task, string, one of classification, regression. Required."
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "target": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        ],
        "description": "item, value. Required."
      },
      "description": "target, array. Required."
    },
    "maxDepth": {
      "default": 5,
      "description": "maxDepth, integer, from 1 to 20. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "minSamplesLeaf": {
      "default": 1,
      "description": "minSamplesLeaf, integer, from 1 to 1000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "predict": {
      "description": "predict, array. Optional.",
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "description": "item, number. Required."
        },
        "description": "item, array. Required."
      }
    }
  },
  "required": [
    "task",
    "columns",
    "rows",
    "target"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "rules": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "rules. Array."
    },
    "tree": {
      "type": "object",
      "properties": {
        "feature": {
          "type": "string",
          "description": "feature. String."
        },
        "threshold": {
          "type": "number",
          "description": "threshold. Number."
        },
        "left": {
          "type": "object",
          "properties": {
            "value": {
              "type": "number",
              "description": "value. Number."
            }
          },
          "additionalProperties": {},
          "description": "left. Object."
        },
        "right": {
          "type": "object",
          "properties": {
            "value": {
              "type": "number",
              "description": "value. Number."
            }
          },
          "additionalProperties": {},
          "description": "right. Object."
        }
      },
      "additionalProperties": {},
      "description": "tree. Object."
    },
    "featureImportance": {
      "type": "object",
      "properties": {
        "age": {
          "type": "number",
          "description": "age. Number."
        },
        "income": {
          "type": "number",
          "description": "income. Number."
        }
      },
      "additionalProperties": {},
      "description": "featureImportance. Object."
    },
    "trainAccuracy": {
      "type": "number",
      "description": "trainAccuracy. Number."
    },
    "predictions": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "predictions. Array."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Item. String."
      },
      "description": "warnings. Array."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "droppedRows": {
      "type": "number",
      "description": "droppedRows. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_random-forest-importance(task, columns, rows, target, trees, ...)

Train a small seeded random forest, report out-of-bag accuracy or R², and estimate permutation feature importance with Fisher-Yates shuffles. Docs: https://www.brainiac.software/api/predictive-analytics/random-forest-importance Keywords: when scoring customers or a predictive model, task, columns, rows, target, trees, maxFeatures, maxDepth, seed, permutationRepeats, minSamplesLeaf, oobScore, importance, rowsUsed, droppedRows.

输入模式

{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "enum": [
        "classification",
        "regression"
      ],
      "description": "task, string, one of classification, regression. Required."
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "target": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        ],
        "description": "item, value. Required."
      },
      "description": "target, array. Required."
    },
    "trees": {
      "default": 100,
      "description": "trees, integer, from 10 to 500. Required.",
      "type": "integer",
      "minimum": 10,
      "maximum": 500
    },
    "maxFeatures": {
      "default": "sqrt",
      "description": "maxFeatures, value. Required.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "sqrt",
            "log2"
          ]
        },
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      ]
    },
    "maxDepth": {
      "default": null,
      "description": "maxDepth, value. Required.",
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 20
        },
        {
          "type": "null"
        }
      ]
    },
    "seed": {
      "default": 42,
      "description": "seed, integer, from -9007199254740991 to 9007199254740991. Required.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "permutationRepeats": {
      "default": 5,
      "description": "permutationRepeats, integer, from 1 to 50. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "minSamplesLeaf": {
      "default": 1,
      "description": "minSamplesLeaf, integer, from 1 to 1000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "task",
    "columns",
    "rows",
    "target"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "oobScore": {
      "type": "number",
      "description": "oobScore. Number."
    },
    "importance": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "feature": {
            "type": "string",
            "description": "feature. String."
          },
          "mean": {
            "type": "number",
            "description": "mean. Number."
          },
          "sd": {
            "type": "number",
            "description": "sd. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "importance. Array."
    },
    "seed": {
      "type": "number",
      "description": "seed. Number."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "droppedRows": {
      "type": "number",
      "description": "droppedRows. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_kaplan-meier-survival(subjects, confidence, at)

Estimate group Kaplan-Meier curves with Greenwood log-log confidence intervals, median survival, survival at chosen times, and a multi-group log-rank test. Docs: https://www.brainiac.software/api/predictive-analytics/kaplan-meier-survival Keywords: when scoring customers or a predictive model, subjects, confidence, groups, logRank, Kaplan-Meier survival curves and log-rank test, kaplan meier survival, Predictive & Customer Analytics.

输入模式

{
  "type": "object",
  "properties": {
    "subjects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "time": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "time, number. Required."
          },
          "event": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ],
            "description": "event, value. Required."
          },
          "group": {
            "default": "all",
            "description": "group, string, length 1 to 64. Required.",
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "time",
          "event"
        ],
        "description": "item, object. Required."
      },
      "description": "subjects, array. Required."
    },
    "confidence": {
      "default": 0.95,
      "description": "confidence, number. Required.",
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 1
    },
    "at": {
      "description": "at, array. Optional.",
      "type": "array",
      "items": {
        "type": "number",
        "exclusiveMinimum": 0,
        "description": "item, number. Required."
      }
    }
  },
  "required": [
    "subjects"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "description": "group. String."
          },
          "median": {
            "type": "number",
            "description": "median. Number."
          },
          "survivalAt": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "t": {
                  "type": "number",
                  "description": "t. Number."
                },
                "S": {
                  "type": "number",
                  "description": "S. Number."
                }
              },
              "additionalProperties": {},
              "description": "item. Object."
            },
            "description": "survivalAt. Array."
          },
          "curve": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "t": {
                  "type": "number",
                  "description": "t. Number."
                },
                "atRisk": {
                  "type": "number",
                  "description": "atRisk. Number."
                },
                "events": {
                  "type": "number",
                  "description": "events. Number."
                },
                "S": {
                  "type": "number",
                  "description": "S. Number."
                },
                "ciLow": {
                  "type": "number",
                  "description": "ciLow. Number."
                },
                "ciHigh": {
                  "type": "number",
                  "description": "ciHigh. Number."
                }
              },
              "additionalProperties": {},
              "description": "item. Object."
            },
            "description": "curve. Array."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "groups. Array."
    },
    "logRank": {
      "type": "object",
      "properties": {
        "chiSquare": {
          "type": "number",
          "description": "chiSquare. Number."
        },
        "df": {
          "type": "number",
          "description": "df. Number."
        },
        "p": {
          "type": "number",
          "description": "p. Number."
        }
      },
      "additionalProperties": {},
      "description": "logRank. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_cox-regression(subjects, ties, confidence)

Maximise the Cox partial likelihood with Efron or Breslow ties, return hazard ratios with SEs, concordance, and a rank-time proportional-hazards check. Docs: https://www.brainiac.software/api/predictive-analytics/cox-regression Keywords: when scoring customers or a predictive model, subjects, ties, confidence, coefficients, logLikelihood, concordance, phTest, converged, Cox proportional hazards regression, cox regression.

输入模式

{
  "type": "object",
  "properties": {
    "subjects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "time": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "time, number. Required."
          },
          "event": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ],
            "description": "event, value. Required."
          },
          "covariates": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "additionalProperties": {
              "type": "number"
            },
            "description": "covariates, object. Required."
          }
        },
        "required": [
          "time",
          "event",
          "covariates"
        ],
        "description": "item, object. Required."
      },
      "description": "subjects, array. Required."
    },
    "ties": {
      "default": "efron",
      "description": "ties, string, one of efron, breslow. Required.",
      "type": "string",
      "enum": [
        "efron",
        "breslow"
      ]
    },
    "confidence": {
      "default": 0.95,
      "description": "confidence, number. Required.",
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 1
    }
  },
  "required": [
    "subjects"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "coefficients": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "name. String."
          },
          "beta": {
            "type": "number",
            "description": "beta. Number."
          },
          "se": {
            "type": "number",
            "description": "se. Number."
          },
          "hazardRatio": {
            "type": "number",
            "description": "hazardRatio. Number."
          },
          "z": {
            "type": "number",
            "description": "z. Number."
          },
          "p": {
            "type": "number",
            "description": "p. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "coefficients. Array."
    },
    "logLikelihood": {
      "type": "number",
      "description": "logLikelihood. Number."
    },
    "concordance": {
      "type": "number",
      "description": "concordance. Number."
    },
    "phTest": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "name. String."
          },
          "chiSquare": {
            "type": "number",
            "description": "chiSquare. Number."
          },
          "p": {
            "type": "number",
            "description": "p. Number."
          },
          "timeTransform": {
            "type": "string",
            "description": "timeTransform. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "phTest. Array."
    },
    "converged": {
      "type": "boolean",
      "description": "converged. Boolean."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_cohort-retention(events, period, mode, asOf, timezone)

Build day/week/month cohort retention in classic or rolling mode from signup and activity dates, with partial-period flags and a size-weighted curve. Docs: https://www.brainiac.software/api/predictive-analytics/cohort-retention Keywords: when scoring customers or a predictive model, events, asOf, period, mode, timezone, cohorts, weightedCurve, Cohort retention matrix and weighted curve, cohort retention.

输入模式

{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "userId, string, length 1 to 128. Required."
          },
          "signup": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "signup, string. Required."
          },
          "activity": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "item, string. Required."
            },
            "description": "activity, array. Required."
          }
        },
        "required": [
          "userId",
          "signup",
          "activity"
        ],
        "description": "item, object. Required."
      },
      "description": "events, array. Required."
    },
    "period": {
      "default": "month",
      "description": "period, string, one of day, week, month. Required.",
      "type": "string",
      "enum": [
        "day",
        "week",
        "month"
      ]
    },
    "mode": {
      "default": "classic",
      "description": "mode, string, one of classic, rolling. Required.",
      "type": "string",
      "enum": [
        "classic",
        "rolling"
      ]
    },
    "asOf": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "asOf, string. Required."
    },
    "timezone": {
      "default": "UTC",
      "description": "timezone, string, length 1 to 64. Required.",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "events",
    "asOf"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "cohorts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cohort": {
            "type": "string",
            "description": "cohort. String."
          },
          "size": {
            "type": "number",
            "description": "size. Number."
          },
          "retention": {
            "type": "array",
            "items": {
              "type": "number",
              "description": "item. Number."
            },
            "description": "retention. Array."
          },
          "partial": {
            "type": "boolean",
            "description": "partial. Boolean."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "cohorts. Array."
    },
    "weightedCurve": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "weightedCurve. Array."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_rfm-segment(customers, transactions, asOf, bins, segmentMap)

Score customers 1–bins on recency, frequency and monetary value with average ranks for ties, then map scores to Champions/Loyal/New/At risk/Hibernating or a custom rule list. Docs: https://www.brainiac.software/api/predictive-analytics/rfm-segment Keywords: when scoring customers or a predictive model, customers, transactions, asOf, bins, segmentMap, segments, RFM scoring and named customer segments, rfm segment.

输入模式

{
  "type": "object",
  "properties": {
    "customers": {
      "description": "customers, array. Optional.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "id, string, length 1 to 128. Required."
          },
          "recencyDays": {
            "type": "number",
            "minimum": 0,
            "description": "recencyDays, number, from 0 to any. Required."
          },
          "frequency": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "frequency, number. Required."
          },
          "monetary": {
            "type": "number",
            "minimum": 0,
            "description": "monetary, number, from 0 to any. Required."
          }
        },
        "required": [
          "id",
          "recencyDays",
          "frequency",
          "monetary"
        ],
        "description": "item, object. Required."
      }
    },
    "transactions": {
      "description": "transactions, array. Optional.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "customerId, string, length 1 to 128. Required."
          },
          "date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "date, string. Required."
          },
          "amount": {
            "type": "number",
            "description": "amount, number. Required."
          }
        },
        "required": [
          "customerId",
          "date",
          "amount"
        ],
        "description": "item, object. Required."
      }
    },
    "asOf": {
      "description": "asOf, string. Optional.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "bins": {
      "default": 5,
      "description": "bins, integer, from 3 to 10. Required.",
      "type": "integer",
      "minimum": 3,
      "maximum": 10
    },
    "segmentMap": {
      "default": "default",
      "description": "segmentMap, value. Required.",
      "anyOf": [
        {
          "type": "string",
          "const": "default"
        },
        {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "r": {
                "type": "array",
                "items": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 10
                  }
                ],
                "additionalItems": false,
                "minItems": 2,
                "maxItems": 2
              },
              "f": {
                "type": "array",
                "items": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 10
                  }
                ],
                "additionalItems": false,
                "minItems": 2,
                "maxItems": 2
              },
              "m": {
                "type": "array",
                "items": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 10
                  }
                ],
                "additionalItems": false,
                "minItems": 2,
                "maxItems": 2
              }
            },
            "required": [
              "name",
              "r",
              "f"
            ]
          }
        }
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "customers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "id. String."
          },
          "r": {
            "type": "number",
            "description": "r. Number."
          },
          "f": {
            "type": "number",
            "description": "f. Number."
          },
          "m": {
            "type": "number",
            "description": "m. Number."
          },
          "rfm": {
            "type": "string",
            "description": "rfm. String."
          },
          "segment": {
            "type": "string",
            "description": "segment. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "customers. Array."
    },
    "segments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "name. String."
          },
          "count": {
            "type": "number",
            "description": "count. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "segments. Array."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_clv-bg-nbd(customers, horizon, margin, minRepeatCustomers)

Fit BG/NBD purchase frequency and Gamma-Gamma spend models, then return P(alive), expected purchases over a horizon, expected value and undiscounted CLV per customer. Docs: https://www.brainiac.software/api/predictive-analytics/clv-bg-nbd Keywords: when scoring customers or a predictive model, customers, horizon, margin, minRepeatCustomers, bgnbd, gammaGamma, BG/NBD and Gamma-Gamma customer lifetime value, clv bg nbd.

输入模式

{
  "type": "object",
  "properties": {
    "customers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "id, string, length 1 to 128. Required."
          },
          "frequency": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991,
            "description": "frequency, integer, from 0 to 9007199254740991. Required."
          },
          "recency": {
            "type": "number",
            "minimum": 0,
            "description": "recency, number, from 0 to any. Required."
          },
          "T": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "T, number. Required."
          },
          "monetaryValue": {
            "description": "monetaryValue, number. Optional.",
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "id",
          "frequency",
          "recency",
          "T"
        ],
        "description": "item, object. Required."
      },
      "description": "customers, array. Required."
    },
    "horizon": {
      "default": 10,
      "description": "horizon, number. Required.",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "margin": {
      "default": 1,
      "description": "margin, number. Required.",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "minRepeatCustomers": {
      "default": 10,
      "description": "minRepeatCustomers, integer, from 1 to 100000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    }
  },
  "required": [
    "customers"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "bgnbd": {
      "type": "object",
      "properties": {
        "r": {
          "type": "number",
          "description": "r. Number."
        },
        "alpha": {
          "type": "number",
          "description": "alpha. Number."
        },
        "a": {
          "type": "number",
          "description": "a. Number."
        },
        "b": {
          "type": "number",
          "description": "b. Number."
        },
        "logLikelihood": {
          "type": "number",
          "description": "logLikelihood. Number."
        }
      },
      "additionalProperties": {},
      "description": "bgnbd. Object."
    },
    "gammaGamma": {
      "type": "object",
      "properties": {
        "p": {
          "type": "number",
          "description": "p. Number."
        },
        "q": {
          "type": "number",
          "description": "q. Number."
        },
        "v": {
          "type": "number",
          "description": "v. Number."
        }
      },
      "additionalProperties": {},
      "description": "gammaGamma. Object."
    },
    "customers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "id. String."
          },
          "pAlive": {
            "type": "number",
            "description": "pAlive. Number."
          },
          "expectedPurchases": {
            "type": "number",
            "description": "expectedPurchases. Number."
          },
          "expectedValue": {
            "type": "null",
            "description": "expectedValue. Null."
          },
          "clv": {
            "type": "null",
            "description": "clv. Null."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "customers. Array."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_market-basket-rules(baskets, minSupport, minConfidence, maxItemsetSize, maxRules)

Mine frequent itemsets and association rules with support, confidence, lift, leverage and conviction from caller baskets. Docs: https://www.brainiac.software/api/predictive-analytics/market-basket-rules Keywords: when scoring customers or a predictive model, baskets, minSupport, minConfidence, maxItemsetSize, maxRules, rules, Market-basket association rules, market basket rules.

输入模式

{
  "type": "object",
  "properties": {
    "baskets": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "description": "item, string, length 1 to 128. Required."
        },
        "description": "item, array. Required."
      },
      "description": "baskets, array. Required."
    },
    "minSupport": {
      "default": 0.01,
      "description": "minSupport, number, from any to 1. Required.",
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "minConfidence": {
      "default": 0.5,
      "description": "minConfidence, number, from any to 1. Required.",
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1
    },
    "maxItemsetSize": {
      "default": 3,
      "description": "maxItemsetSize, integer, from 2 to 10. Required.",
      "type": "integer",
      "minimum": 2,
      "maximum": 10
    },
    "maxRules": {
      "default": 1000,
      "description": "maxRules, integer, from 1 to 100000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    }
  },
  "required": [
    "baskets"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "antecedent": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "antecedent. Array."
          },
          "consequent": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "consequent. Array."
          },
          "support": {
            "type": "number",
            "description": "support. Number."
          },
          "confidence": {
            "type": "number",
            "description": "confidence. Number."
          },
          "lift": {
            "type": "number",
            "description": "lift. Number."
          },
          "leverage": {
            "type": "number",
            "description": "leverage. Number."
          },
          "conviction": {
            "type": "null",
            "description": "conviction. Null."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "rules. Array."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_changepoint-detect(values, model, penalty, minSegment)

Detect mean or mean-variance changepoints with PELT, BIC/AIC or custom penalties, and MAD-based noise scaling. Docs: https://www.brainiac.software/api/predictive-analytics/changepoint-detect Keywords: when scoring customers or a predictive model, values, model, penalty, minSegment, changepoints, segments, sigma, penaltyValue, PELT changepoint detection, changepoint detect.

输入模式

{
  "type": "object",
  "properties": {
    "values": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item, number. Required."
      },
      "description": "values, array. Required."
    },
    "model": {
      "default": "mean",
      "description": "model, string, one of mean, meanvar. Required.",
      "type": "string",
      "enum": [
        "mean",
        "meanvar"
      ]
    },
    "penalty": {
      "default": "bic",
      "description": "penalty, value. Required.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "bic",
            "aic"
          ]
        },
        {
          "type": "number",
          "exclusiveMinimum": 0
        }
      ]
    },
    "minSegment": {
      "default": 2,
      "description": "minSegment, integer, from 1 to 10000. Required.",
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    }
  },
  "required": [
    "values"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "changepoints": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item. Number."
      },
      "description": "changepoints. Array."
    },
    "segments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "start": {
            "type": "number",
            "description": "start. Number."
          },
          "end": {
            "type": "number",
            "description": "end. Number."
          },
          "mean": {
            "type": "number",
            "description": "mean. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "segments. Array."
    },
    "sigma": {
      "type": "number",
      "description": "sigma. Number."
    },
    "penaltyValue": {
      "type": "number",
      "description": "penaltyValue. Number."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_classification-metrics(labels, scores, threshold, calibrationBins)

Compute ROC-AUC, average precision, Brier score, confusion at a threshold, Youden-optimal threshold and equal-width calibration bins from binary labels and scores. Docs: https://www.brainiac.software/api/predictive-analytics/classification-metrics Keywords: when scoring customers or a predictive model, labels, scores, threshold, calibrationBins, rocAuc, prAuc, brier, confusion, youdenThreshold, youdenJ, calibration, ROC, PR, Brier and calibration metrics, classification metrics.

输入模式

{
  "type": "object",
  "properties": {
    "labels": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "number",
            "const": 0
          },
          {
            "type": "number",
            "const": 1
          }
        ],
        "description": "item, value. Required."
      },
      "description": "labels, array. Required."
    },
    "scores": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "item, number. Required."
      },
      "description": "scores, array. Required."
    },
    "threshold": {
      "default": 0.5,
      "description": "threshold, number, from 0 to 1. Required.",
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "calibrationBins": {
      "default": 10,
      "description": "calibrationBins, integer, from 2 to 100. Required.",
      "type": "integer",
      "minimum": 2,
      "maximum": 100
    }
  },
  "required": [
    "labels",
    "scores"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "rocAuc": {
      "type": "number",
      "description": "rocAuc. Number."
    },
    "prAuc": {
      "type": "number",
      "description": "prAuc. Number."
    },
    "brier": {
      "type": "number",
      "description": "brier. Number."
    },
    "confusion": {
      "type": "object",
      "properties": {
        "threshold": {
          "type": "number",
          "description": "threshold. Number."
        },
        "tp": {
          "type": "number",
          "description": "tp. Number."
        },
        "fp": {
          "type": "number",
          "description": "fp. Number."
        },
        "fn": {
          "type": "number",
          "description": "fn. Number."
        },
        "tn": {
          "type": "number",
          "description": "tn. Number."
        },
        "precision": {
          "type": "number",
          "description": "precision. Number."
        },
        "recall": {
          "type": "number",
          "description": "recall. Number."
        },
        "f1": {
          "type": "number",
          "description": "f1. Number."
        }
      },
      "additionalProperties": {},
      "description": "confusion. Object."
    },
    "youdenThreshold": {
      "type": "number",
      "description": "youdenThreshold. Number."
    },
    "youdenJ": {
      "type": "number",
      "description": "youdenJ. Number."
    },
    "calibration": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "bin": {
            "type": "array",
            "items": {
              "type": "number",
              "description": "item. Number."
            },
            "description": "bin. Array."
          },
          "meanScore": {
            "type": "number",
            "description": "meanScore. Number."
          },
          "fraction": {
            "type": "number",
            "description": "fraction. Number."
          },
          "n": {
            "type": "number",
            "description": "n. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "calibration. Array."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_correlation-analysis(columns, rows, methods, partial, adjust)

Pairwise Pearson/Spearman/Kendall correlations with p-values, optional partial correlations, and Holm/BH/Bonferroni adjustment across pair-method tests. Docs: https://www.brainiac.software/api/predictive-analytics/correlation-analysis Keywords: when scoring customers or a predictive model, columns, rows, methods, partial, adjust, pairs, rowsUsed, caps, correlation analysis.

输入模式

{
  "type": "object",
  "properties": {
    "columns": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "item, string, length 1 to 64. Required."
      },
      "description": "columns, array. Required."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "description": "item, number. Required.",
          "type": [
            "number",
            "null"
          ]
        },
        "description": "item, array. Required."
      },
      "description": "rows, array. Required."
    },
    "methods": {
      "default": [
        "pearson"
      ],
      "description": "methods, array. Required.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "pearson",
          "spearman",
          "kendall"
        ],
        "description": "item, string, one of pearson, spearman, kendall. Required."
      }
    },
    "partial": {
      "description": "partial, array. Optional.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "x": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "x, string, length 1 to 64. Required."
          },
          "y": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "y, string, length 1 to 64. Required."
          },
          "given": {
            "default": [],
            "description": "given, array. Required.",
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "item, string, length 1 to 64. Required."
            }
          }
        },
        "required": [
          "x",
          "y"
        ],
        "description": "item, object. Required."
      }
    },
    "adjust": {
      "default": "none",
      "description": "adjust, string, one of none, holm, bh, bonferroni. Required.",
      "type": "string",
      "enum": [
        "none",
        "holm",
        "bh",
        "bonferroni"
      ]
    }
  },
  "required": [
    "columns",
    "rows"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "pairs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "a": {
            "type": "string",
            "description": "a. String."
          },
          "b": {
            "type": "string",
            "description": "b. String."
          },
          "n": {
            "type": "number",
            "description": "n. Number."
          },
          "pearson": {
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "r. Number."
              },
              "p": {
                "type": "number",
                "description": "p. Number."
              },
              "pAdjusted": {
                "type": "number",
                "description": "pAdjusted. Number."
              }
            },
            "additionalProperties": {},
            "description": "pearson. Object."
          },
          "spearman": {
            "type": "object",
            "properties": {
              "rho": {
                "type": "number",
                "description": "rho. Number."
              },
              "p": {
                "type": "number",
                "description": "p. Number."
              },
              "pAdjusted": {
                "type": "number",
                "description": "pAdjusted. Number."
              }
            },
            "additionalProperties": {},
            "description": "spearman. Object."
          },
          "kendall": {
            "type": "object",
            "properties": {
              "tau": {
                "type": "number",
                "description": "tau. Number."
              },
              "p": {
                "type": "number",
                "description": "p. Number."
              },
              "pAdjusted": {
                "type": "number",
                "description": "pAdjusted. Number."
              }
            },
            "additionalProperties": {},
            "description": "kendall. Object."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "pairs. Array."
    },
    "partial": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "x": {
            "type": "string",
            "description": "x. String."
          },
          "y": {
            "type": "string",
            "description": "y. String."
          },
          "given": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "item. String."
            },
            "description": "given. Array."
          },
          "r": {
            "type": "number",
            "description": "r. Number."
          },
          "p": {
            "type": "number",
            "description": "p. Number."
          },
          "df": {
            "type": "number",
            "description": "df. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "partial. Array."
    },
    "rowsUsed": {
      "type": "number",
      "description": "rowsUsed. Number."
    },
    "caps": {
      "type": "object",
      "properties": {
        "maxRows": {
          "type": "number",
          "description": "maxRows. Number."
        },
        "maxColumns": {
          "type": "number",
          "description": "maxColumns. Number."
        }
      },
      "additionalProperties": {},
      "description": "caps. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}
🟢predictive-analytics_propensity-score-match(units, caliperSdLogit, replacement, order, seed)

Fit logistic propensity scores, match treated to controls 1:1 on the logit within a caliper, and report SMD balance and common-support counts. Docs: https://www.brainiac.software/api/predictive-analytics/propensity-score-match Keywords: when scoring customers or a predictive model, units, caliperSdLogit, replacement, order, seed, model, caliper, pairs, unmatchedTreated, balance, commonSupport, propensity score match.

输入模式

{
  "type": "object",
  "properties": {
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "id, string, length 1 to 128. Required."
          },
          "treated": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              }
            ],
            "description": "treated, value. Required."
          },
          "covariates": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "additionalProperties": {
              "type": "number"
            },
            "description": "covariates, object. Required."
          }
        },
        "required": [
          "id",
          "treated",
          "covariates"
        ],
        "description": "item, object. Required."
      },
      "description": "units, array. Required."
    },
    "caliperSdLogit": {
      "default": 0.2,
      "description": "caliperSdLogit, number. Required.",
      "type": "number",
      "exclusiveMinimum": 0
    },
    "replacement": {
      "default": false,
      "description": "replacement, boolean. Required.",
      "type": "boolean"
    },
    "order": {
      "default": "descending_score",
      "description": "order, string, one of descending_score, ascending_score, random. Required.",
      "type": "string",
      "enum": [
        "descending_score",
        "ascending_score",
        "random"
      ]
    },
    "seed": {
      "default": 42,
      "description": "seed, integer, from -9007199254740991 to 9007199254740991. Required.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "units"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

输出模式

{
  "type": "object",
  "properties": {
    "model": {
      "type": "object",
      "properties": {
        "intercept": {
          "type": "number",
          "description": "intercept. Number."
        },
        "coefficients": {
          "type": "object",
          "properties": {
            "age": {
              "type": "number",
              "description": "age. Number."
            }
          },
          "additionalProperties": {},
          "description": "coefficients. Object."
        }
      },
      "additionalProperties": {},
      "description": "model. Object."
    },
    "caliper": {
      "type": "number",
      "description": "caliper. Number."
    },
    "pairs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "treated": {
            "type": "string",
            "description": "treated. String."
          },
          "control": {
            "type": "string",
            "description": "control. String."
          },
          "distance": {
            "type": "number",
            "description": "distance. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "pairs. Array."
    },
    "unmatchedTreated": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "unmatchedTreated. Array."
    },
    "balance": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "covariate": {
            "type": "string",
            "description": "covariate. String."
          },
          "smdBefore": {
            "type": "number",
            "description": "smdBefore. Number."
          },
          "smdAfter": {
            "type": "number",
            "description": "smdAfter. Number."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "balance. Array."
    },
    "commonSupport": {
      "type": "object",
      "properties": {
        "treatedOutside": {
          "type": "number",
          "description": "treatedOutside. Number."
        },
        "controlOutside": {
          "type": "number",
          "description": "controlOutside. Number."
        }
      },
      "additionalProperties": {},
      "description": "commonSupport. Object."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "source. String."
          },
          "url": {
            "type": "string",
            "description": "url. String."
          },
          "retrievedAt": {
            "type": "string",
            "description": "retrievedAt. String."
          },
          "status": {
            "type": "string",
            "description": "status. String."
          }
        },
        "additionalProperties": {},
        "description": "item. Object."
      },
      "description": "sources. Array."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "item. String."
      },
      "description": "limitations. Array."
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": {}
}

社区

评价此服务器

证据

最近观测

已验证未记录版本15 个工具