fixed reset

Former-commit-id: 738a0da510
master
parent a92b63b9d8
commit 6df8f75215
  1. BIN
      __pycache__/tsneGrid.cpython-37.pyc
  2. 14
      js/tsne_vis.js
  3. 50
      tsneGrid.py

@ -63,6 +63,10 @@ var results_all_global = []
// This function is executed when the factory button is pressed in order to bring the visualization in the initial state.
function FactoryReset(){
var graphDiv = 'ProjectionsVisual'
Plotly.purge(graphDiv);
location.reload();
}
@ -768,6 +772,12 @@ var getData = function() {
// Parse the data set with the use of PapaParse.
function parseData(url) {
var graphDiv = 'gridVisual'
Plotly.purge(graphDiv);
document.getElementById("loader").style.display = "block";
Papa.parse(url, {
download: true,
header: true,
@ -820,6 +830,8 @@ function parseData(url) {
init(results.data, results_all, results.meta.fields); // Call the init() function that starts everything!
} else {
// ajax the JSON to the server
$.post("http://127.0.0.1:5000/resetAll", JSON.stringify(''), function(){
});
$.post("http://127.0.0.1:5000/receiver", JSON.stringify(results_all), function(){
$.get("http://127.0.0.1:5000/sender", function( data ) {
dataReceivedFromServer = data
@ -2471,6 +2483,8 @@ function setReset(){ // Reset only the filters which were applied into the data
ArrayContainsDataFeaturesLimit = [];
prevRightClick = false;
//pcpInitialize();
// Reset the points into their initial state

@ -25,6 +25,56 @@ import bhtsne
app = Flask(__name__)
CORS(app)
@app.route('/resetAll', methods = ['POST'])
def Reset():
print('mpike')
global dataProc
dataProc = []
global D_highSpace
D_highSpace = []
global overalProjectionsNumber
overalProjectionsNumber = []
global projectionsAll
projectionsAll = []
global SelectedListofParams
SelectedListofParams = []
global SelectedProjectionsReturn
SelectedProjectionsReturn = []
global clusterIndex
clusterIndex = []
global convertLabels
convertLabels = []
global D_lowSpaceList
D_lowSpaceList = []
global KeepKs
KeepKs = []
global metricsMatrixEntire
metricsMatrixEntire = []
global metricsMatrix
metricsMatrix = []
global metricsMatrixSel
metricsMatrixSel = []
global metricsMatrixEntireSel
metricsMatrixEntireSel = []
return 'Reset'
# NOTE: Only works with labeled data
def neighborhood_hit(X, y, k):

Loading…
Cancel
Save