Skip to content

Commit 81b2773

Browse files
authored
Merge pull request #17 from dataiku/fix/webapp-document-references
Bundle JQuery, update angularjs
2 parents 2eac6b5 + 4bf86a2 commit 81b2773

File tree

7 files changed

+367
-342
lines changed

7 files changed

+367
-342
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Version 1.1.3 (2025-12-10)
4+
* Bump angularjs to 1.8.2
5+
* Include jquery in plugin resources, rather than relying on angularjs jquerylite
6+
* Fix js NPE when checking non-numeric values
7+
8+
39
## Version 1.1.2 (2025-05-14)
410
* Fix issue with webapp not displaying correctly
511
* Fix bug in pandas > 2

plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"id" : "decision-tree-builder",
3-
"version" : "1.1.2",
3+
"version" : "1.1.3",
44
"meta" : {
55
"label" : "Interactive Decision Tree Builder",
66
"description" : "Build and explore decision trees, and use them to score and evaluate data",
7-
"author" : "Dataiku (Agathe Guillemot)",
7+
"author" : "Dataiku (Créml Brûlée)",
88
"supportLevel": "TIER2_SUPPORT",
99
"icon" : "icon-sitemap",
1010
"licenseInfo" : "Apache Software License",

python-lib/dku_idtb_decision_tree/autosplit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import math
22
import pandas as pd
33
from sklearn.tree import _tree, DecisionTreeClassifier
4-
from dku_idtb_compatibility.utils import safe_str
4+
55

66
def apply_cross_entropy(population):
7-
return lambda sample: pd.Series(cross_entropy(population, sample), index=sample.index)
7+
return lambda sample: cross_entropy(population, sample)
88

99
def cross_entropy(population_distrib, sample):
1010
sample_distrib = sample.value_counts(normalize=True)
@@ -15,8 +15,8 @@ def cross_entropy(population_distrib, sample):
1515

1616
def convert_categorical_columns(feature_col, target_col):
1717
target_distrib = target_col.value_counts(normalize=True)
18-
entropies = target_col.groupby(feature_col).apply(apply_cross_entropy(target_distrib))
19-
return entropies.sort_index().reset_index(drop=True)
18+
entropies_by_category = target_col.groupby(feature_col).apply(apply_cross_entropy(target_distrib))
19+
return feature_col.map(entropies_by_category)
2020

2121

2222
def autosplit(df, feature, target, numerical, max_splits):

resource/angular.min.js

Lines changed: 349 additions & 336 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resource/jquery.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resource/js/helpers.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ app.service("Format", function() {
99
return text;
1010
},
1111
toFixedIfNeeded: function(number, decimals) {
12+
if (number == null) {
13+
return "";
14+
}
1215
if(Math.round(number) !== number) {
1316
return number.toFixed(decimals);
1417
}

webapps/interactive-decision-tree-builder/body.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<script src="/plugins/decision-tree-builder/resource/jquery.min.js" type="text/javascript"></script>
45
<script src="/plugins/decision-tree-builder/resource/angular.min.js" type="text/javascript"></script>
56
<script src="/plugins/decision-tree-builder/resource/spin.min.js" type="text/javascript"></script>
67
<script type="text/javascript">

0 commit comments

Comments
 (0)