浏览代码

🔧 return multiple clustering methods

+ set initialWeights
jmacura 4 年之前
父节点
当前提交
d539fa393b
共有 2 个文件被更改,包括 19 次插入5 次删除
  1. 1 3
      src/adjuster/adjuster.service.ts
  2. 18 2
      src/attractiveness.config.json

+ 1 - 3
src/adjuster/adjuster.service.ts

@@ -11,15 +11,13 @@ import {AdjusterEventService} from './adjuster-event.service';
 import {AdjusterLoaderComponent} from './adjuster-loader.component';
 import {AttractivenessClustersService} from './attractiveness-clusters.service';
 import {AttractivenessIndexService} from './attractiveness-index.service';
-import {nuts} from '../nuts';
-//import {factors} from './factors.js';
 
 @Injectable({providedIn: 'root'})
 export class AdjusterService {
   /** To be read from a config file */
   allowedClusteringMethods: Array<string>;
   /** To be read from a config file */
-  initialWeights;
+  initialWeights: Record<string, number>;
   /** To be read from a config file */
   serviceBaseUrl: string;
   /** Used in the UI as a selector */

+ 18 - 2
src/attractiveness.config.json

@@ -1,8 +1,24 @@
 {
   "allowedClusteringMethods": [
+    "km25.cluster",
+    "km50hw.cluster",
+    "km50l.cluster",
+    "km50m.cluster",
+    "kme_eu.cluster",
+    "kme_mn.cluster",
+    "haclust",
+    "haclustmin",
+    "haclustman",
+    "haclustcan",
     "haclustwd2",
-    "km50l.cluster"
+    "haclustmcq",
+    "hdclust"
   ],
-  "initialWeights": {  },
+  "initialWeights": {
+    "Social": 0.1,
+    "Institutional": 0.5,
+    "Anthropic": 0.3,
+    "Cultural": 0.25
+  },
   "serviceBaseUrl": "https://jmacura.ml/ws/"
 }