@@ -761,7 +761,8 @@ mod tests {
761761
762762 #[ test]
763763 fn save_and_load_from_buffer ( ) {
764- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
764+ let dmat_train =
765+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
765766 let mut booster = Booster :: new_with_cached_dmats ( & BoosterParameters :: default ( ) , & [ & dmat_train] ) . unwrap ( ) ;
766767 let attr = booster. get_attribute ( "foo" ) . expect ( "Getting attribute failed" ) ;
767768 assert_eq ! ( attr, None ) ;
@@ -804,8 +805,10 @@ mod tests {
804805
805806 #[ test]
806807 fn predict ( ) {
807- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
808- let dmat_test =DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
808+ let dmat_train =
809+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
810+ let dmat_test =
811+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
809812
810813 let tree_params = tree:: TreeBoosterParametersBuilder :: default ( )
811814 . max_depth ( 2 )
@@ -886,8 +889,10 @@ mod tests {
886889
887890 #[ test]
888891 fn predict_leaf ( ) {
889- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
890- let dmat_test = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
892+ let dmat_train =
893+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
894+ let dmat_test =
895+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
891896
892897 let tree_params = tree:: TreeBoosterParametersBuilder :: default ( )
893898 . max_depth ( 2 )
@@ -919,8 +924,10 @@ mod tests {
919924
920925 #[ test]
921926 fn predict_contributions ( ) {
922- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
923- let dmat_test = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
927+ let dmat_train =
928+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
929+ let dmat_test =
930+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
924931
925932 let tree_params = tree:: TreeBoosterParametersBuilder :: default ( )
926933 . max_depth ( 2 )
@@ -953,8 +960,10 @@ mod tests {
953960
954961 #[ test]
955962 fn predict_interactions ( ) {
956- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
957- let dmat_test = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
963+ let dmat_train =
964+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
965+ let dmat_test =
966+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"# ) . unwrap ( ) ;
958967
959968 let tree_params = tree:: TreeBoosterParametersBuilder :: default ( )
960969 . max_depth ( 2 )
@@ -1005,7 +1014,8 @@ mod tests {
10051014
10061015 #[ test]
10071016 fn dump_model ( ) {
1008- let dmat_train = DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
1017+ let dmat_train =
1018+ DMatrix :: load ( r#"{"uri": "xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"# ) . unwrap ( ) ;
10091019
10101020 println ! ( "{:?}" , dmat_train. shape( ) ) ;
10111021
0 commit comments