Medial Code Documentation
Loading...
Searching...
No Matches
Functions
xgboost.testing.shared Namespace Reference

Functions

None validate_leaf_output (np.ndarray leaf, int num_parallel_tree)
 
None validate_data_initialization (Type dmatrix, Type[xgb.XGBModel] model, ArrayLike X, ArrayLike y)
 
np.ndarray get_feature_weights (ArrayLike X, ArrayLike y, np.ndarray fw, str parser_path, str tree_method, Type[xgb.XGBModel] model=xgb.XGBRegressor)
 

Detailed Description

Testing code shared by other tests.

Function Documentation

◆ get_feature_weights()

np.ndarray xgboost.testing.shared.get_feature_weights ( ArrayLike  X,
ArrayLike  y,
np.ndarray  fw,
str  parser_path,
str  tree_method,
Type[xgb.XGBModel]   model = xgb.XGBRegressor 
)
Get feature weights using the demo parser.

◆ validate_data_initialization()

None xgboost.testing.shared.validate_data_initialization ( Type  dmatrix,
Type[xgb.XGBModel]  model,
ArrayLike  X,
ArrayLike   y 
)
Assert that we don't create duplicated DMatrix.

◆ validate_leaf_output()

None xgboost.testing.shared.validate_leaf_output ( np.ndarray  leaf,
int  num_parallel_tree 
)
Validate output for predict leaf tests.