Skip to content

Commit 0870afe

Browse files
committed
fix univariate supervised used dataset (to learning)
1 parent 3e12a3e commit 0870afe

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed

dist/predicsis-jsSDK.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ angular
9393

9494
/**
9595
* @ngdoc service
96-
* @name predicsis.jsSDK.models.Datafile
96+
* @name predicsis.jsSDK.models.Datafiles
9797
* @requires $q
9898
* @requires Restangular
9999
* @description
@@ -111,7 +111,7 @@ angular
111111
* </tr>
112112
* <tr>
113113
* <td><span class="badge get">get</span> <kbd>/data_files/:id/signed_url</kbd></td>
114-
* <td><kbd>{@link predicsis.jsSDK.models.Datafiles#methods_get_signed_url Datafiles.getSignedUrl()}</kbd></td>
114+
* <td><kbd>{@link predicsis.jsSDK.models.Datafiles#methods_getsignedurl Datafiles.getSignedUrl()}</kbd></td>
115115
* <td></td>
116116
* </tr>
117117
* <tr>
@@ -2610,6 +2610,19 @@ angular
26102610
});
26112611
}
26122612

2613+
function createUnivariateSupervisedReport(project) {
2614+
var Datasets = $injector.get('Datasets');
2615+
return Datasets.getChildren(project.learning_dataset_id, project.dictionary_id)
2616+
.then(function(children) {
2617+
return self.create({
2618+
type: 'univariate_supervised',
2619+
dataset_id: children.train.id,
2620+
dictionary_id: project.dictionary_id,
2621+
variable_id: project.target_variable_id
2622+
});
2623+
});
2624+
}
2625+
26132626
// -----------------------------------------------------------------------------------------------------------------
26142627

26152628
/**
@@ -2680,12 +2693,7 @@ angular
26802693
* @return {Object} Promise of a report
26812694
*/
26822695
this.createUnivariateSupervisedReport = function(project) {
2683-
return self.create({
2684-
type: 'univariate_supervised',
2685-
dataset_id: project.learning_dataset_id,
2686-
dictionary_id: project.dictionary_id,
2687-
variable_id: project.target_variable_id
2688-
});
2696+
return createUnivariateSupervisedReport(project);
26892697
};
26902698

26912699
/**

0 commit comments

Comments
 (0)