-
Notifications
You must be signed in to change notification settings - Fork 0
Machine Learning Commands
CRISP-T includes built-in machine learning capabilities for clustering, classification, and regression. These algorithms can operate on your numeric data (CSV) and can also incorporate text data if it has been linked or vectored.
Note: You must have the ML dependencies installed:
pip install crisp-t[ml]
All commands use the crisp CLI.
These options apply to most ML commands below.
-
--include <cols>: Comma-separated list of columns to use as features (inputs). -
--outcome <col>: The target variable (output) you want to predict. -
--aggregation <strategy>: How to handle cases where multiple documents link to a single data row.-
majority: Use the most frequent value (for classification). -
mean: Average the values (for regression). -
first: Use the first available value. -
mode: Same as majority.
-
Group similar data points together.
crisp --inp ./corpus --kmeans --num 3 --include "age,income,score"-
--num <N>: Number of clusters to create.
Predict a categorical outcome (e.g., "High/Low", "Success/Failure").
crisp --inp ./corpus --cls --outcome target_col- Algorithms: Runs both Support Vector Machine (SVM) and Decision Tree.
- Output: Confusion Matrix and Feature Importance.
Train a simple neural network.
crisp --inp ./corpus --nnet --outcome target_colLong Short-Term Memory network. Used to predict an outcome variable based on the sequence of words in linked text documents.
crisp --inp ./corpus --lstm --outcome target_colFind items similar to a specific record.
crisp --inp ./corpus --knn --num 5 --rec 1 --outcome target_col-
--rec <index>: The (1-based) index of the record to search from.
Predict a continuous numerical outcome (e.g., "Sales", "Temperature").
crisp --inp ./corpus --regression --outcome target_col- Auto-detection: Automatically chooses Linear Regression for continuous targets or Logistic Regression if the target appears binary.
Principal Component Analysis. Reduce your features to a smaller set of components.
crisp --inp ./corpus --pca --num 2 --outcome target_colDiscover rules like "If A, then B".
crisp --inp ./corpus --cart --num 50 --rec 70-
--num: Minimum support (e.g., 50 = 0.50). -
--rec: Minimum confidence threshold (e.g., 70 = 0.70).