diff --git a/src/DotNetBridge/transforms/VariableColumnTransform.cs b/src/DotNetBridge/transforms/VariableColumnTransform.cs index ea9ecafb..9ee1ebd7 100644 --- a/src/DotNetBridge/transforms/VariableColumnTransform.cs +++ b/src/DotNetBridge/transforms/VariableColumnTransform.cs @@ -247,6 +247,9 @@ public override bool IsColumnActive(DataViewSchema.Column column) return _active[column.Index]; } + private static readonly FuncInstanceMethodInfo1 _makeVarLengthVectorGetterMethodInfo + = FuncInstanceMethodInfo1.Create(target => target.MakeVarLengthVectorGetter); + private Delegate MakeVarLengthVectorGetter(DataViewRow input) { var srcGetters = new ValueGetter[_bindings.vectorToInputMap.Count]; @@ -304,7 +307,7 @@ public override ValueGetter GetGetter(DataViewSchema.Column colu if (column.Index == _bindings.outputColumn) { VectorDataViewType columnType = column.Type as VectorDataViewType; - Delegate getter = Utils.MarshalInvoke(MakeVarLengthVectorGetter, columnType.ItemType.RawType, _cursor); + Delegate getter = Utils.MarshalInvoke(_makeVarLengthVectorGetterMethodInfo, this, columnType.ItemType.RawType, _cursor); return getter as ValueGetter; } else diff --git a/src/python/nimbusml/internal/entrypoints/_calibratortrainer_fixedplattcalibrator.py b/src/python/nimbusml/internal/entrypoints/_calibratortrainer_fixedplattcalibrator.py index 35e80514..8f1904cb 100644 --- a/src/python/nimbusml/internal/entrypoints/_calibratortrainer_fixedplattcalibrator.py +++ b/src/python/nimbusml/internal/entrypoints/_calibratortrainer_fixedplattcalibrator.py @@ -10,16 +10,16 @@ def fixed_platt_calibrator( - slope=1.0, + slope=-1.0, offset=0.0, **params): """ **Description** None - :param slope: The slope parameter of f(x) = 1 / (1 + exp(-slope * + :param slope: The slope parameter of f(x) = 1 / (1 + exp(slope * x + offset) (settings). - :param offset: The offset parameter of f(x) = 1 / (1 + exp(-slope + :param offset: The offset parameter of f(x) = 1 / (1 + exp(slope * x + offset) (settings). """ diff --git a/src/python/nimbusml/internal/entrypoints/models_fixedplattcalibrator.py b/src/python/nimbusml/internal/entrypoints/models_fixedplattcalibrator.py index f5665675..4876c6ff 100644 --- a/src/python/nimbusml/internal/entrypoints/models_fixedplattcalibrator.py +++ b/src/python/nimbusml/internal/entrypoints/models_fixedplattcalibrator.py @@ -13,7 +13,7 @@ def models_fixedplattcalibrator( data, uncalibrated_predictor_model, predictor_model=None, - slope=1.0, + slope=-1.0, offset=0.0, max_rows=1000000000, **params): @@ -23,12 +23,12 @@ def models_fixedplattcalibrator( model :param slope: The slope parameter of the calibration function 1 / - (1 + exp(-slope * x + offset) (inputs). + (1 + exp(slope * x + offset) (inputs). :param data: Input dataset (inputs). :param uncalibrated_predictor_model: The predictor to calibrate (inputs). :param offset: The offset parameter of the calibration function 1 - / (1 + exp(-slope * x + offset) (inputs). + / (1 + exp(slope * x + offset) (inputs). :param max_rows: The maximum number of examples to train the calibrator on (inputs). :param predictor_model: The trained model (outputs). diff --git a/src/python/tools/manifest.json b/src/python/tools/manifest.json index eb019968..fd7f7950 100644 --- a/src/python/tools/manifest.json +++ b/src/python/tools/manifest.json @@ -1731,14 +1731,14 @@ { "Name": "Slope", "Type": "Float", - "Desc": "The slope parameter of the calibration function 1 / (1 + exp(-slope * x + offset)", + "Desc": "The slope parameter of the calibration function 1 / (1 + exp(slope * x + offset)", "Aliases": [ "slope" ], "Required": false, "SortOrder": 1.0, "IsNullable": false, - "Default": 1.0 + "Default": -1.0 }, { "Name": "Data", @@ -1762,7 +1762,7 @@ { "Name": "Offset", "Type": "Float", - "Desc": "The offset parameter of the calibration function 1 / (1 + exp(-slope * x + offset)", + "Desc": "The offset parameter of the calibration function 1 / (1 + exp(slope * x + offset)", "Aliases": [ "offset" ], @@ -25355,19 +25355,19 @@ { "Name": "Slope", "Type": "Float", - "Desc": "The slope parameter of f(x) = 1 / (1 + exp(-slope * x + offset)", + "Desc": "The slope parameter of f(x) = 1 / (1 + exp(slope * x + offset)", "Aliases": [ "a" ], "Required": false, "SortOrder": 150.0, "IsNullable": false, - "Default": 1.0 + "Default": -1.0 }, { "Name": "Offset", "Type": "Float", - "Desc": "The offset parameter of f(x) = 1 / (1 + exp(-slope * x + offset)", + "Desc": "The offset parameter of f(x) = 1 / (1 + exp(slope * x + offset)", "Aliases": [ "b" ],