|
13 | 13 | using Microsoft.ML.Runtime.Data; |
14 | 14 | using Microsoft.ML.Runtime.Internal.Utilities; |
15 | 15 | using Microsoft.ML.Runtime.Model; |
16 | | -/*LOTUS |
17 | | -using Microsoft.ML.Runtime.Model.LotusVNext; |
18 | | -using LotusvNext.Expressions;*/ |
19 | 16 | using Microsoft.ML.Runtime.Model.Pfa; |
20 | 17 | using Microsoft.ML.Runtime.Internal.Internallearn; |
21 | 18 | using Newtonsoft.Json.Linq; |
@@ -1295,54 +1292,6 @@ private JToken AsPfaCore(JToken feat, int node) |
1295 | 1292 | return PfaUtils.If(PfaUtils.Call("<=", PfaUtils.Index(feat, SplitFeatures[node]), RawThresholds[node]), lte, gt); |
1296 | 1293 | } |
1297 | 1294 |
|
1298 | | - /*LOTUS |
1299 | | - internal void SaveAsLotusVNext(LotusVNextContext ctx, string featuresVariableName, string treeOutputVariable) |
1300 | | - { |
1301 | | - ctx.AddExpression(SaveAsLotusVNext(0, featuresVariableName, treeOutputVariable)); |
1302 | | - } |
1303 | | -
|
1304 | | - private Expression SaveAsLotusVNext(int node, string featuresVariableName, string treeOutputVariable) |
1305 | | - { |
1306 | | - if (node < 0) |
1307 | | - { |
1308 | | - return LotusVNextUtils.MakeSet(treeOutputVariable, |
1309 | | - LotusVNextUtils.MakeFloatLiteral((float)LeafValue(~node))); |
1310 | | - } |
1311 | | -
|
1312 | | - Expression cond; |
1313 | | - if (CategoricalSplit[node]) |
1314 | | - { |
1315 | | - cond = LotusVNextUtils.MakeCall("gt", |
1316 | | - LotusVNextUtils.MakeAttr(featuresVariableName, CategoricalSplitFeatures[node][0]), |
1317 | | - LotusVNextUtils.MakeFloatLiteral(0.5f) |
1318 | | - ); |
1319 | | -
|
1320 | | - for (int i = 1; i < CategoricalSplitFeatures[node].Length; i++) |
1321 | | - { |
1322 | | - cond = LotusVNextUtils.MakeCall("or", |
1323 | | - cond, |
1324 | | - LotusVNextUtils.MakeCall("gt", |
1325 | | - LotusVNextUtils.MakeAttr(featuresVariableName, CategoricalSplitFeatures[node][i]), |
1326 | | - LotusVNextUtils.MakeFloatLiteral(0.5f) |
1327 | | - ) |
1328 | | - ); |
1329 | | - } |
1330 | | - } |
1331 | | - else |
1332 | | - { |
1333 | | - cond = LotusVNextUtils.MakeCall("gt", |
1334 | | - LotusVNextUtils.MakeAttr(featuresVariableName, SplitFeature(node)), |
1335 | | - LotusVNextUtils.MakeFloatLiteral(RawThreshold(node)) |
1336 | | - ); |
1337 | | - } |
1338 | | -
|
1339 | | - return LotusVNextUtils.MakeIf( |
1340 | | - cond, |
1341 | | - new[] { SaveAsLotusVNext(GetGtChildForNode(node), featuresVariableName, treeOutputVariable) }, |
1342 | | - new[] { SaveAsLotusVNext(GetLteChildForNode(node), featuresVariableName, treeOutputVariable) } |
1343 | | - ); |
1344 | | - }*/ |
1345 | | - |
1346 | 1295 | public FeatureToGainMap GainMap |
1347 | 1296 | { |
1348 | 1297 | get |
|
0 commit comments