cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lala
Level VIII

How many splits are performed automatically by the decision tree model using JSL?

For example, the number of splits in the figure is 3
How to script this split number 3 to a variable?

2024-04-14_16-33-43.png

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p = Partition(
	Y( :weight ),
	X( :age, :sex, :height ),
	Validation Portion( 0.3 ),
	Split History( 1 ),
	Informative Missing( 1 )
);
p << go;
splitCount = p << GetProperty( "Tree Split Count" );//??

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How many splits are performed automatically by the decision tree model using JSL?

You can get the count from the table box

jthi_1-1713104070466.png

 

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
partition = dt << Partition(
	Y(:mvalue),
	X(
		:crim, :zn, :indus, :chas, :nox, :rooms, :age, :distance, :radial, :tax,
		:pt, :b, :lstat
	),
	Validation Portion(0.3)
);
partition << go;

splitcount = (Report(partition)[Table Box(1), Number Col Box("Number of Splits")] << get)[1];

 

-Jarmo

View solution in original post

2 REPLIES 2
lala
Level VIII

回复: How many splits are performed automatically by the decision tree model using JSL?

 

2024-04-14_17-12-59.png

ss = Report( p )["Split History", Text Edit Box( 2 )];//??
ss = Report( p )["Split History", FrameBox( 1 )];//??

NOT LINE

jthi
Super User

Re: How many splits are performed automatically by the decision tree model using JSL?

You can get the count from the table box

jthi_1-1713104070466.png

 

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Boston Housing.jmp");
partition = dt << Partition(
	Y(:mvalue),
	X(
		:crim, :zn, :indus, :chas, :nox, :rooms, :age, :distance, :radial, :tax,
		:pt, :b, :lstat
	),
	Validation Portion(0.3)
);
partition << go;

splitcount = (Report(partition)[Table Box(1), Number Col Box("Number of Splits")] << get)[1];

 

-Jarmo