cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lala
Level IX

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 IX

回复: 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

Recommended Articles