maxyoudencut function in the Factory
The maxyoudencut function returns the value which maximizes the youden index of the ROC curve defined by column1 and by the class attclass.
The default value for the class attribute (if more than two values are present) can be specified as the optional parameter defclass.
The computation can be performed according to the groups defined in the group parameter, if required.
Function and parameters Parameter Description column It identifies the column to which you want to apply the formula. The column parameter is mandatory. attclass It identifies the column to which you want to apply the formula. It is a nominal attribute. The attclass parameter is mandatory. defclass It is the default value for the class attribute. group It allows you to group the results by a certain column. weights It defines the importance of a certain attribute. Example The following example uses the Bike sales dataset. Description Screenshot In the example here, we want to calculate the maxyoudencut of the Order_Quantity attribute with the Country target. The formula to write is: If we want to group our results, we can add the group parameter, that, if the defclass is not defined, must be written as We want to group our results by the Customer_Gender attribute, so the formula becomes: In this case, the results don’t change.maxyoudencut(column, attclass, defclass, group, weights)
maxyoudencut($"Order_Quantity",$"Country")
group=$"att"
.maxyoudencut($"Order_Quantity",$"Country",group=$"Customer_Gender")