Commits

Miha Stajdohar committed baeaabc

Moved some files around.

Comments (0)

Files changed (1)

examples/projections/projections.py

+import os.path
+import _modelmaps as mm
+from time import time
+from Orange.orng import orngVizRank as vr
+
+ROOT = "/home/miha/work/res/modelmaps"
+#ROOT = "/Network/Servers/xgridcontroller.private/lab/mihas/modelmaps"
+ROOT = "C:\\Users\\Miha\\work\\res\\modelmaps"
+DATASET = "zoo"
+N = 5000
+
+build_map = mm.BuildModelMap(os.path.join(ROOT, "tab", "%s%s" % (DATASET, ".tab")))
+
+nfeatures = len(build_map.data_d.domain.features)
+features = mm.get_feature_subsets(build_map.data_d.domain, N)
+
+max_nfeatures_scatterplot = (nfeatures ** 2 - nfeatures) / 2
+features_scatterplot = mm.get_feature_subsets_scatterplot(build_map.data_d.domain, max_nfeatures_scatterplot)
+
+models = []
+models.extend([build_map.build_projection_model(f, vr.LINEAR_PROJECTION) for f in features])
+models.extend([build_map.build_projection_model(f, vr.RADVIZ) for f in features])
+models.extend([build_map.build_projection_model(f, vr.POLYVIZ) for f in features])
+models.extend([build_map.build_projection_model(attrs, vr.SCATTERPLOT) for attrs in features_scatterplot])
+
+table = build_map.build_model_data(models)
+smx = build_map.build_model_matrix(models, mm.distance_prob)
+
+build_map.save(os.path.join(ROOT, "_projections_", "projections_%s_%d_WIN" % (DATASET, N)), smx=smx, table=table)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.