matlab,% 加载数据,data = load('your_data.csv');,X = data(:, 1:end-1); % 特征,y = data(:, end); % 标签,,% 训练孤立森林模型,model = fitcensemble(X, y, 'Method','IsolationTree', 'NumLearningCycles',100);,,% 预测异常,predictions = predict(model, X);,,% 查看异常样本,anomalies = predictions == -1;,disp(X(anomalies, :));,
``