From 9bfba6023f0d5c1a069f9bfdf2ec4eb1593e616c Mon Sep 17 00:00:00 2001 From: Angelos Chatzimparmpas Date: Mon, 29 Jul 2019 14:15:59 +0200 Subject: [PATCH] feature selection --- .vscode/settings.json | 2 +- __pycache__/run.cpython-37.pyc | Bin 8232 -> 9951 bytes frontend/src/components/FeatureSelection.vue | 91 +++++++++++++++ frontend/src/components/Main.vue | 20 +++- frontend/src/components/ParametersSetting.vue | 5 +- frontend/src/components/StretchedChord.vue | 104 +++++++----------- run.py | 37 ++++++- 7 files changed, 189 insertions(+), 70 deletions(-) create mode 100644 frontend/src/components/FeatureSelection.vue diff --git a/.vscode/settings.json b/.vscode/settings.json index ad66e0bb9..353f5f01b 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { "git.ignoreLimitWarning": true, - "python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3" + "python.pythonPath": "/usr/local/bin/python3" } \ No newline at end of file diff --git a/__pycache__/run.cpython-37.pyc b/__pycache__/run.cpython-37.pyc index 88bb2b56b304dfb56ebcc1b6d6b3a2d05f18719f..debea1e7fcfac3cf05b334deaeb1d9fcba3b1a72 100644 GIT binary patch delta 3722 zcmcInZ)hCH6`$GLyW2b6txk8RyOVUXTqm}2a-_(vTg!S?&3p4^cK17{|NNqQCLWIxxIX^N(A4v%eyFBoIwby`%|4~c zoYd(msY^OtrS*U=>48;A3-VAs%!8{GdJ319={PCKW1hUoX9w=l?tAo5AtEN^o?b68 zYiN9t8RLd!6uDWpJ$c>%3|eJPcbE*M-zBUY{#dtoTYgnla2|3-%Frlfg|)xSy|kMh z#_=Nvj{tbVQrVs>dy+oGj^e#MYuY+{T#SUSc5S#q)yHs1JzKUmnTIv5Jt6)WDnM+3 z@W-{MQE88Qq^R-Ym1)hg#$eP50gyn5CMg?%-i@ZdCyH9}iZQL5tQf>WxH_R>_Rd0c z-U$%GiA!ASLdq~*x_mQK4Z6WPQUA`qRP$-wCNPTWp_@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o5@5@|=Jeo*vU``X^DSxz!pXg{yreJVg z6)ZxiF_;T_Yu)bnn`p=xP+P&Ea|rLFLZquGuONH?FbU5F-_@@K+SB~UUEK|%Xd43n z=QmLv=VbTS(*bn>H*r*cju1ttLnt650J3!kbzFDm9lbE)8qhEL7Md;q_;QKnZANW$ z3%ShnWw%twGp&Z+;Gxa~WSSrBOm81pWFW(*J9ToMKk9TRgC1dr=>deB2wxyb08sD{ z%Ku{twti&7vdu~7T)|-z$X5iEf*1$B6j2rFZT{(=@gsfc8HLxwlMjlUmF;q|v`mX& zpfvzlcxTwA?ru%cXQ=*oUG1tRbNF%a6~nRT@;Ta%t`gMl!rQ?qGmCbk>&xg9qGdby z*knURt4Qb3fRE%>9k)=zg6VC9XH^7J7k{sNJRNRnjSw}IAgLNvR9{l#DvOg$SUvhL Dy#3Kg diff --git a/frontend/src/components/FeatureSelection.vue b/frontend/src/components/FeatureSelection.vue new file mode 100644 index 000000000..eb6a9987f --- /dev/null +++ b/frontend/src/components/FeatureSelection.vue @@ -0,0 +1,91 @@ + + + \ No newline at end of file diff --git a/frontend/src/components/Main.vue b/frontend/src/components/Main.vue index 4af7a64e5..60d7e2f6a 100755 --- a/frontend/src/components/Main.vue +++ b/frontend/src/components/Main.vue @@ -53,6 +53,14 @@ + + + Subset Feature Selection + + + + + @@ -77,6 +85,7 @@ import ScatterPlot from './ScatterPlot.vue' import BarChart from './BarChart.vue' import StretchedChord from './StretchedChord.vue' import Tuning from './Tuning.vue' +import FeatureSelection from './FeatureSelection.vue' import axios from 'axios' import { mdbCard, mdbCardBody, mdbCardText, mdbCardHeader } from 'mdbvue' import { EventBus } from '../main.js' @@ -90,6 +99,7 @@ export default Vue.extend({ BarChart, StretchedChord, Tuning, + FeatureSelection, mdbCard, mdbCardBody, mdbCardHeader, @@ -100,7 +110,8 @@ export default Vue.extend({ Collection: 0, OverviewResults: 0, RetrieveValueFile: 'IrisC', - ClassifierIDsList: '' + ClassifierIDsList: '', + SelectedFeaturesPerClassifier: '' } }, methods: { @@ -110,7 +121,8 @@ export default Vue.extend({ DataBaseRequestDataSetName () { const path = `http://127.0.0.1:5000/data/ServerRequest` const postData = { - fileName: this.RetrieveValueFile + fileName: this.RetrieveValueFile, + featureSelection: this.SelectedFeaturesPerClassifier } const axiosConfig = { headers: { @@ -122,6 +134,7 @@ export default Vue.extend({ } axios.post(path, postData, axiosConfig) .then(response => { + console.log(response) console.log('Send request to server! FileName was sent successfully!') }) .catch(error => { @@ -174,6 +187,8 @@ export default Vue.extend({ EventBus.$emit('emittedEventCallingScatterPlot', this.OverviewResults) EventBus.$emit('emittedEventCallingBarChart', this.OverviewResults) EventBus.$emit('emittedEventCallingChordView', this.OverviewResults) + EventBus.$emit('emittedEventCallingTableView', this.OverviewResults) + }) .catch(error => { console.log(error) @@ -204,6 +219,7 @@ export default Vue.extend({ mounted() { EventBus.$on('SendSelectedPointsToServerEvent', data => { this.ClassifierIDsList = data }) EventBus.$on('SendSelectedPointsToServerEvent', this.SendSelectedPointsToServer) + EventBus.$on('SendSelectedFeaturesEvent', data => { this.SelectedFeaturesPerClassifier = data }) } }) diff --git a/frontend/src/components/ParametersSetting.vue b/frontend/src/components/ParametersSetting.vue index d6831f995..7085beb88 100644 --- a/frontend/src/components/ParametersSetting.vue +++ b/frontend/src/components/ParametersSetting.vue @@ -3,7 +3,8 @@ id="Execute" v-on:click="execute"> - Execute + {{ value }} +