@@ -21,10 +21,10 @@ public static class LightGbmStaticExtensions
21
21
/// <param name="label">The label column.</param>
22
22
/// <param name="features">The features column.</param>
23
23
/// <param name="weights">The weights column.</param>
24
- /// <param name="numLeaves">The number of leaves to use.</param>
25
- /// <param name="numBoostRound">Number of iterations.</param>
26
- /// <param name="minDataPerLeaf">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
24
+ /// <param name="numberOfLeaves">The number of leaves to use.</param>
25
+ /// <param name="minimumDataPerLeaf">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
27
26
/// <param name="learningRate">The learning rate.</param>
27
+ /// <param name="numberOfIterations">Number of iterations.</param>
28
28
/// <param name="onFit">A delegate that is called every time the
29
29
/// <see cref="Estimator{TInShape, TOutShape, TTransformer}.Fit(DataView{TInShape})"/> method is called on the
30
30
/// <see cref="Estimator{TInShape, TOutShape, TTransformer}"/> instance created out of this. This delegate will receive
@@ -39,19 +39,19 @@ public static class LightGbmStaticExtensions
39
39
/// </example>
40
40
public static Scalar < float > LightGbm ( this RegressionCatalog . RegressionTrainers catalog ,
41
41
Scalar < float > label , Vector < float > features , Scalar < float > weights = null ,
42
- int ? numLeaves = null ,
43
- int ? minDataPerLeaf = null ,
42
+ int ? numberOfLeaves = null ,
43
+ int ? minimumDataPerLeaf = null ,
44
44
double ? learningRate = null ,
45
- int numBoostRound = Options . Defaults . NumBoostRound ,
45
+ int numberOfIterations = Options . Defaults . NumberOfIterations ,
46
46
Action < LightGbmRegressionModelParameters > onFit = null )
47
47
{
48
- CheckUserValues ( label , features , weights , numLeaves , minDataPerLeaf , learningRate , numBoostRound , onFit ) ;
48
+ CheckUserValues ( label , features , weights , numberOfLeaves , minimumDataPerLeaf , learningRate , numberOfIterations , onFit ) ;
49
49
50
50
var rec = new TrainerEstimatorReconciler . Regression (
51
51
( env , labelName , featuresName , weightsName ) =>
52
52
{
53
- var trainer = new LightGbmRegressorTrainer ( env , labelName , featuresName , weightsName , numLeaves ,
54
- minDataPerLeaf , learningRate , numBoostRound ) ;
53
+ var trainer = new LightGbmRegressorTrainer ( env , labelName , featuresName , weightsName , numberOfLeaves ,
54
+ minimumDataPerLeaf , learningRate , numberOfIterations ) ;
55
55
if ( onFit != null )
56
56
return trainer . WithOnFitDelegate ( trans => onFit ( trans . Model ) ) ;
57
57
return trainer ;
@@ -122,11 +122,13 @@ public static Scalar<float> LightGbm(this RegressionCatalog.RegressionTrainers c
122
122
/// ]]></format>
123
123
/// </example>
124
124
public static ( Scalar < float > score , Scalar < float > probability , Scalar < bool > predictedLabel ) LightGbm ( this BinaryClassificationCatalog . BinaryClassificationTrainers catalog ,
125
- Scalar < bool > label , Vector < float > features , Scalar < float > weights = null ,
125
+ Scalar < bool > label ,
126
+ Vector < float > features ,
127
+ Scalar < float > weights = null ,
126
128
int ? numLeaves = null ,
127
129
int ? minDataPerLeaf = null ,
128
130
double ? learningRate = null ,
129
- int numBoostRound = Options . Defaults . NumBoostRound ,
131
+ int numBoostRound = Options . Defaults . NumberOfIterations ,
130
132
Action < CalibratedModelParametersBase < LightGbmBinaryModelParameters , PlattCalibrator > > onFit = null )
131
133
{
132
134
CheckUserValues ( label , features , weights , numLeaves , minDataPerLeaf , learningRate , numBoostRound , onFit ) ;
@@ -194,9 +196,9 @@ public static (Scalar<float> score, Scalar<float> probability, Scalar<bool> pred
194
196
/// <param name="features">The features column.</param>
195
197
/// <param name="groupId">The groupId column.</param>
196
198
/// <param name="weights">The weights column.</param>
197
- /// <param name="numLeaves ">The number of leaves to use.</param>
198
- /// <param name="numBoostRound ">Number of iterations.</param>
199
- /// <param name="minDataPerLeaf ">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
199
+ /// <param name="numberOfLeaves ">The number of leaves to use.</param>
200
+ /// <param name="numberOfIterations ">Number of iterations.</param>
201
+ /// <param name="minimumDataPerLeaf ">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
200
202
/// <param name="learningRate">The learning rate.</param>
201
203
/// <param name="onFit">A delegate that is called every time the
202
204
/// <see cref="Estimator{TInShape, TOutShape, TTransformer}.Fit(DataView{TInShape})"/> method is called on the
@@ -206,21 +208,24 @@ public static (Scalar<float> score, Scalar<float> probability, Scalar<bool> pred
206
208
/// <returns>The set of output columns including in order the predicted binary classification score (which will range
207
209
/// from negative to positive infinity), the calibrated prediction (from 0 to 1), and the predicted label.</returns>
208
210
public static Scalar < float > LightGbm < TVal > ( this RankingCatalog . RankingTrainers catalog ,
209
- Scalar < float > label , Vector < float > features , Key < uint , TVal > groupId , Scalar < float > weights = null ,
210
- int ? numLeaves = null ,
211
- int ? minDataPerLeaf = null ,
211
+ Scalar < float > label ,
212
+ Vector < float > features ,
213
+ Key < uint , TVal > groupId ,
214
+ Scalar < float > weights = null ,
215
+ int ? numberOfLeaves = null ,
216
+ int ? minimumDataPerLeaf = null ,
212
217
double ? learningRate = null ,
213
- int numBoostRound = Options . Defaults . NumBoostRound ,
218
+ int numberOfIterations = Options . Defaults . NumberOfIterations ,
214
219
Action < LightGbmRankingModelParameters > onFit = null )
215
220
{
216
- CheckUserValues ( label , features , weights , numLeaves , minDataPerLeaf , learningRate , numBoostRound , onFit ) ;
221
+ CheckUserValues ( label , features , weights , numberOfLeaves , minimumDataPerLeaf , learningRate , numberOfIterations , onFit ) ;
217
222
Contracts . CheckValue ( groupId , nameof ( groupId ) ) ;
218
223
219
224
var rec = new TrainerEstimatorReconciler . Ranker < TVal > (
220
225
( env , labelName , featuresName , groupIdName , weightsName ) =>
221
226
{
222
- var trainer = new LightGbmRankingTrainer ( env , labelName , featuresName , groupIdName , weightsName , numLeaves ,
223
- minDataPerLeaf , learningRate , numBoostRound ) ;
227
+ var trainer = new LightGbmRankingTrainer ( env , labelName , featuresName , groupIdName , weightsName , numberOfLeaves ,
228
+ minimumDataPerLeaf , learningRate , numberOfIterations ) ;
224
229
225
230
if ( onFit != null )
226
231
return trainer . WithOnFitDelegate ( trans => onFit ( trans . Model ) ) ;
@@ -279,10 +284,10 @@ public static Scalar<float> LightGbm<TVal>(this RankingCatalog.RankingTrainers c
279
284
/// <param name="label">The label, or dependent variable.</param>
280
285
/// <param name="features">The features, or independent variables.</param>
281
286
/// <param name="weights">The weights column.</param>
282
- /// <param name="numLeaves">The number of leaves to use.</param>
283
- /// <param name="numBoostRound">Number of iterations.</param>
284
- /// <param name="minDataPerLeaf">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
287
+ /// <param name="numberOfLeaves">The number of leaves to use.</param>
288
+ /// <param name="minimumDataPerLeaf">The minimal number of documents allowed in a leaf of the tree, out of the subsampled data.</param>
285
289
/// <param name="learningRate">The learning rate.</param>
290
+ /// <param name="numberOfIterations">Number of iterations.</param>
286
291
/// <param name="onFit">A delegate that is called every time the
287
292
/// <see cref="Estimator{TInShape, TOutShape, TTransformer}.Fit(DataView{TInShape})"/> method is called on the
288
293
/// <see cref="Estimator{TInShape, TOutShape, TTransformer}"/> instance created out of this. This delegate will receive
@@ -301,19 +306,19 @@ public static (Vector<float> score, Key<uint, TVal> predictedLabel)
301
306
Key < uint , TVal > label ,
302
307
Vector < float > features ,
303
308
Scalar < float > weights = null ,
304
- int ? numLeaves = null ,
305
- int ? minDataPerLeaf = null ,
309
+ int ? numberOfLeaves = null ,
310
+ int ? minimumDataPerLeaf = null ,
306
311
double ? learningRate = null ,
307
- int numBoostRound = Options . Defaults . NumBoostRound ,
312
+ int numberOfIterations = Options . Defaults . NumberOfIterations ,
308
313
Action < OvaModelParameters > onFit = null )
309
314
{
310
- CheckUserValues ( label , features , weights , numLeaves , minDataPerLeaf , learningRate , numBoostRound , onFit ) ;
315
+ CheckUserValues ( label , features , weights , numberOfLeaves , minimumDataPerLeaf , learningRate , numberOfIterations , onFit ) ;
311
316
312
317
var rec = new TrainerEstimatorReconciler . MulticlassClassifier < TVal > (
313
318
( env , labelName , featuresName , weightsName ) =>
314
319
{
315
- var trainer = new LightGbmMulticlassTrainer ( env , labelName , featuresName , weightsName , numLeaves ,
316
- minDataPerLeaf , learningRate , numBoostRound ) ;
320
+ var trainer = new LightGbmMulticlassTrainer ( env , labelName , featuresName , weightsName , numberOfLeaves ,
321
+ minimumDataPerLeaf , learningRate , numberOfIterations ) ;
317
322
318
323
if ( onFit != null )
319
324
return trainer . WithOnFitDelegate ( trans => onFit ( trans . Model ) ) ;
0 commit comments