Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 417f5aa3 authored by Marc Duez's avatar Marc Duez

model.js : data normalization

parent 1fbf6f4c
......@@ -786,6 +786,7 @@ Model.prototype = {
this.normalization.A = []
this.normalization.B = expected_size
this.normalization.id = cloneID
this.normalization.type = "clone"
var tmp = this.norm
this.norm = false
......@@ -798,8 +799,24 @@ Model.prototype = {
}
},
compute_data_normalization: function (data, expected_size) {
expected_size = typeof expected_size !== 'undefined' ? expected_size : this.data[data].expected;
this.norm = true
this.normalization.A = []
this.normalization.B = expected_size
this.normalization.id = data
this.normalization.type = "data"
this.data[data].expected = expected_size
for (var i=0; i<this.samples.number; i++){
this.normalization.A[i] = this.data[data][i]
}
this.changeNormMethod("rescale")
},
update_normalization: function () {
if (this.normalization.B != 0) {
if (this.normalization.B != 0 && this.normalization.type=="clone") {
this.compute_normalization( this.normalization.id, this.normalization.B);
}
},
......@@ -1491,11 +1508,15 @@ Model.prototype = {
changeNormMethod : function (method){
this.normalization.method=method;
if (this.normalization.type=="data" && method !="rescale"){
this.normalization.method="rescale";
}
this.update()
var radio = document.getElementsByName("normalize_method");
for(var elem in radio){
if(radio[elem].value == method) radio[elem].checked=true;
if(radio[elem].value == this.normalization.method) radio[elem].checked=true;
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment