Hi Moztaba Zarei,
I tried the below example in MATLAB.
numObservations = 100;
% Define the categorical variables
VehicleType = categorical(randi([1, 3], numObservations, 1), 1:3, {'Car', 'Truck', 'Bike'});
Color = categorical(randi([1, 3], numObservations, 1), 1:3, {'Red', 'Blue', 'Green'});
Size = categorical(randi([1, 3], numObservations, 1), 1:3, {'Small', 'Medium', 'Large'});
% Combine into a table
data = table(Size, Color);
% Display the first few rows of the dataset
head(data)
tree=fitctree(data,VehicleType);
view(tree,'Mode','graph');
I got the below tree:
I would suggest you check the preprocessing steps of the VesselRadius and make sure the categorical values are not "1" and "2".
For more information on Categorical Predictors refer to the following MathWorks Documentation: https://in.mathworks.com/help/stats/fitctree.html#namevaluepairs:~:text=%7C%20%27all%27-,Categorical%20predictors,-list%2C%20specified%20as