Commit 1f412e1b authored by romanorac's avatar romanorac
Browse files

lwlr fixed

parent 9f7480a4
......@@ -1451,6 +1451,24 @@
"description": "Locally weighted linear regression with MapReduce\r\n\r\nReference:\r\nMapReduce version of algorithm is proposed by Cheng-Tao Chu; Sang Kyun Kim, Yi-An Lin, YuanYuan Yu, Gary Bradski, Andrew Ng, and Kunle Olukotun. \"Map-Reduce for Machine Learning on Multicore\". NIPS 2006. \r\n"
}
},
{
"pk": 184,
"model": "workflows.abstractinput",
"fields": {
"widget": 61,
"name": "Training dataset",
"short_name": "dst",
"uid": "15644754-4c1d-4367-a0a3-5d442b51ff89",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "training_dataset",
"parameter": false,
"order": 1,
"description": "Define training dataset"
}
},
{
"pk": 183,
"model": "workflows.abstractinput",
......@@ -1465,7 +1483,7 @@
"parameter_type": null,
"variable": "fitting_dataset",
"parameter": false,
"order": 1,
"order": 2,
"description": "Define a dataset that will be fitted to training dataset."
}
},
......@@ -1483,26 +1501,8 @@
"parameter_type": "text",
"variable": "tau",
"parameter": true,
"order": 2,
"description": "Parameter Tau controls how quickly the weight of a training example falls off with distance of its x(i) from the query point x"
}
},
{
"pk": 184,
"model": "workflows.abstractinput",
"fields": {
"widget": 61,
"name": "Training dataset",
"short_name": "dst",
"uid": "15644754-4c1d-4367-a0a3-5d442b51ff89",
"default": "",
"required": true,
"multi": false,
"parameter_type": null,
"variable": "training_dataset",
"parameter": false,
"order": 3,
"description": "Define training dataset"
"description": "Parameter Tau controls how quickly the weight of a training example falls off with distance of its x(i) from the query point x"
}
},
{
......
......@@ -36,7 +36,7 @@ def file_url(input_dict):
X_meta = X_meta,
generate_urls = True if input_dict["range"] == "true" else False,
**input_dict)
print data.params
return {"dataset" : data}
def big_data_apply_classifier(input_dict):
......@@ -70,7 +70,7 @@ def lwlr_fit_predict(input_dict):
def dt_fit(input_dict):
from discomll.ensemble import decision_trees
print input_dict
fitmodel_url = decision_trees.fit(input = input_dict["dataset"],
max_tree_nodes = input_dict["tree_nodes"],
......
......@@ -94,7 +94,9 @@ def results_to_file(request,input_dict,output_dict,widget):
tag = input_dict["string"]
folder = 'discomll_results'
add = "add" if input_dict["add_params"] == "true" else ""
destination = MEDIA_ROOT+'/'+folder+"/"+tag[0][6:]+add+'.txt'
ensure_dir(destination)
if not os.path.isfile(destination): #file doesnt exists
......@@ -107,7 +109,7 @@ def results_to_file(request,input_dict,output_dict,widget):
for k, v in result_iterator(tag):
f.writelines(str(k) + " " + str(v[0]) + "\n")
f.close()
filename = folder+"/"+tag[0][6:]+'.txt'
filename = folder+"/"+tag[0][6:]+add+'.txt'
output_dict['filename'] = filename
return render(request, 'visualizations/string_to_file.html',{'widget':widget,'input_dict':input_dict,'output_dict':output_dict})
......
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