Advertisement
whoeverest

Orange TODOs

Mar 29th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.80 KB | None | 0 0
  1. Searching 3771 files for "TODO" (case sensitive)
  2.  
  3. /orange/pylintrc:
  4. 129
  5. 130 # List of note tags to take in consideration, separated by a comma.
  6. 131: notes=FIXME,XXX,TODO
  7. 132
  8. 133
  9.  
  10. /orange/Orange/OrangeCanvas/orngCanvas.pyw:
  11. 106 self.menuItemShowWidgetToolbar)
  12. 107
  13. 108: # TODO: Move other actions currently defined elsewhere
  14. 109
  15. 110 self.setStatusBar(MyStatusBar(self))
  16. ...
  17. 852 anyDone = False
  18. 853 for r in Orange.misc.addons.available_repositories:
  19. 854: #TODO: # Should show some progress (and enable cancellation)
  20. 855 try:
  21. 856 if r.refreshdata(force=True):
  22.  
  23. /orange/Orange/OrangeCanvas/orngDlgs.py:
  24. 374 outType = self.outWidget.instance.getOutputType(outName)
  25. 375 inType = self.inWidget.instance.getInputType(inName)
  26. 376: if not issubclass(outType, inType) and not issubclass(inType, outType): return 0 #TODO check this with signalManager.canConnect
  27. 377
  28. 378 inSignal = None
  29. ...
  30. 901 import Orange.misc.addons
  31. 902 try:
  32. 903: repo = Orange.misc.addons.OrangeAddOnRepository(dlg.name, dlg.url) #TODO: This can take some time - inform the user!
  33. 904 self.repositories.append(repo)
  34. 905 except Exception, e:
  35. ...
  36. 921 repo.name, repo.url = dlg.name, dlg.url
  37. 922 if oldurl != repo.url:
  38. 923: repo.refreshdata(force=True) #TODO: This can take some time - inform the user!
  39. 924 except Exception, e:
  40. 925 repo.name, repo.url = oldname, oldurl
  41. ...
  42. 949 def reloadRepos(self):
  43. 950 # Reload add-on list for all repositories.
  44. 951: # TODO: This can take some time - show some progress to user!
  45. 952 for repo in self.repositories:
  46. 953 try:
  47. ...
  48. 1243 selectedRepository = self.getRepoFromItem(self.tree.currentItem())
  49. 1244 selectedAddOnId = self.getAddOnIdFromItem(self.tree.currentItem())
  50. 1245: #TODO: Save the next repository selection too, in case the current one was deleted
  51. 1246
  52. 1247 # Clear the tree
  53.  
  54. /orange/Orange/OrangeCanvas/orngSignalManager.py:
  55. 304
  56. 305 def canConnect(self, widgetFrom, widgetTo, dynamic=True):
  57. 306: # TODO: This should be retrieved from orngRegistry.WidgetDescription
  58. 307 outsignals = [OutputSignal(*tt) for tt in widgetFrom.outputs]
  59. 308 insignals = [InputSignal(*tt) for tt in widgetTo.inputs]
  60.  
  61. /orange/Orange/OrangeCanvas/orngView.py:
  62. 333 # we must check if we have really connected some output to input
  63. 334 if start and end and start != end:
  64. 335: if self.doc.signalManager.signalProcessingInProgress: # TODO: Remove this check when signal manager handles out of sync signals
  65. 336 QMessageBox.information( self, "Orange Canvas", "Unable to connect widgets while signal processing is in progress. Please wait.")
  66. 337 else:
  67.  
  68. /orange/Orange/OrangeWidgets/OWBaseWidget.py:
  69. 994
  70. 995 """
  71. 996: ## TODO: make this thread safe
  72. 997
  73. 998 async.connect(async, SIGNAL("finished(PyQt_PyObject, QString)"), self.asyncFinished)
  74.  
  75. /orange/Orange/OrangeWidgets/OWContexts.py:
  76. 275
  77. 276 if not flags & self.List:
  78. 277: # TODO: is setattr supposed to check that we do not assign values that are optional and do not exist?
  79. 278 # is context cloning's filter enough to get rid of such attributes?
  80. 279 setattr(widget, name, value[0])
  81. ...
  82. 374 potentiallyFilled += len(selected)
  83. 375 for i in selected:
  84. 376: # TODO: shouldn't we check the attribute type here, too? or should we change self.saveLow for these field types then?
  85. 377 if (not flags & self.ExcludeOrdinaryAttributes and value[i] in attributes
  86. 378 or flags & self.IncludeMetaAttributes and value[i] in metas):
  87.  
  88. /orange/Orange/OrangeWidgets/OWGUI.py:
  89. 895
  90. 896 if source != self:
  91. 897: setattr(source.widget, source.ogLabels, [item for item in allSourceItems if item not in selectedItems]) # TODO: optimize this code. use the fact that the selectedItemIndices is a sorted list
  92. 898 setattr(self.widget, self.ogLabels, allDestItems[:index] + selectedItems + allDestItems[index:])
  93. 899 setattr(source.widget, source.ogValue, []) # clear selection in the source widget
  94. ...
  95. 1995 if have_ratio:
  96. 1996 # The text is raised 3 pixels above the bar.
  97. 1997: text_rect = rect.adjusted(4, 1, -4, -4) # TODO: Style dependent margins?
  98. 1998 else:
  99. 1999 text_rect = rect.adjusted(4, 4, -4, -4)
  100. ....
  101. 2006 qApp.style().drawPrimitive(QStyle.PE_PanelItemViewItem, option, painter)
  102. 2007
  103. 2008: # TODO: Check ForegroundRole.
  104. 2009 if option.state & QStyle.State_Selected:
  105. 2010 color = option.palette.highlightedText().color()
  106. ....
  107. 2161 space = style.pixelMetric(pm_spacing, option, button)
  108. 2162 width = style.pixelMetric(pm_indicator_width, option, button)
  109. 2163: style_correction = {"macintosh (aqua)": -2, "macintosh(aqua)": -2, "plastique": 1, "cde": 1, "motif": 1} #TODO: add other styles (Maybe load corrections from .cfg file?)
  110. 2164 return space + width + style_correction.get(str(qApp.style().objectName()).lower(), 0)
  111. 2165
  112.  
  113. /orange/Orange/OrangeWidgets/Classify/OWNomogram.py:
  114. 118 self.CICheck, self.CILabel = OWGUI.checkWithSpin(layoutBox, self, 'Confidence intervals (%):', min=1, max=99, step = 1, checked='confidence_check', value='confidence_percent', checkCallback=self.showNomogram, spinCallback = self.showNomogram)
  115. 119
  116. 120: self.histogramCheck, self.histogramLabel = OWGUI.checkWithSpin(layoutBox, self, 'Show histogram, size', min=1, max=30, checked='histogram', value='histogram_size', step = 1, tooltip='-(TODO)-', checkCallback=self.showNomogram, spinCallback = self.showNomogram)
  117. 121
  118. 122 OWGUI.separator(layoutBox)
  119.  
  120. /orange/Orange/OrangeWidgets/Data/OWDataDomain.py:
  121. 129 return vars, item_data
  122. 130 else:
  123. 131: #TODO: get vars from orange.Variable.getExisting
  124. 132 return None, None
  125. 133
  126.  
  127. /orange/Orange/OrangeWidgets/Data/OWEditDomain.py:
  128. 346
  129. 347 class ContinuousVariableEditor(VariableEditor):
  130. 348: #TODO: enable editing of number_of_decimals, scientific format ...
  131. 349 pass
  132. 350
  133. ...
  134. 639
  135. 640 # Assumes getmetas().items() order has not changed.
  136. 641: # TODO: store metaids in set_data method
  137. 642 for (mid, _), new in zip(self.input_domain.getmetas().items(),
  138. 643 new_metas):
  139.  
  140. /orange/Orange/OrangeWidgets/Data/OWPythonScript.py:
  141. 347 b = w.addAction(action)
  142. 348 b.setPopupMode(QToolButton.InstantPopup)
  143. 349: ## TODO: set the space for the indicator
  144. 350
  145. 351 w.layout().setSpacing(1)
  146.  
  147. /orange/Orange/OrangeWidgets/Data/OWRank.py:
  148. 512 except Exception, ex:
  149. 513 self.warning(measure_index, "Error evaluating %r: %r" % (meas, str(ex)))
  150. 514: # TODO: store exception message (for widget info or item tooltip)
  151. 515 if meas == "Log Odds Ratio" and s is not None:
  152. 516 if s == -999999:
  153.  
  154. /orange/Orange/OrangeWidgets/Prototypes/OWCorrelations.py:
  155. 399 vars = [self.cont_vars[i], self.cont_vars[j]]
  156. 400 else:
  157. 401: # TODO: Clear graph
  158. 402 vars = None
  159. 403 self.selected_vars = vars
  160.  
  161. /orange/Orange/OrangeWidgets/Prototypes/OWModelMap.py:
  162. 513 self.set_graph(self.graph)
  163. 514 self.set_items_distance_matrix(self.graph_matrix)
  164. 515: # TODO clickedAttLstBox -> setLabelText(["attributes"]
  165. 516
  166. 517 for i, ex in enumerate(self.graph.items()):
  167.  
  168. /orange/Orange/OrangeWidgets/Unsupervised/OWModelMapQt.py:
  169. 525 self.set_graph(self.graph, ModelCurve)
  170. 526 self.set_items_distance_matrix(self.graph_matrix)
  171. 527: # TODO clickedAttLstBox -> setLabelText(["attributes"]
  172. 528
  173. 529 nodes = self.networkCanvas.networkCurve.nodes()
  174.  
  175. /orange/Orange/OrangeWidgets/Unsupervised/OWNxAnalysis.py:
  176. 97 ("number_weakly_connected_components", False, "Number of weakly connected components", GRAPHLEVEL, nx.number_weakly_connected_components),
  177. 98 ("number_attracting_components", False, "Number of attracting components", GRAPHLEVEL, nx.number_attracting_components),
  178. 99: # TODO: input parameters
  179. 100 #("max_flow", False, "Maximum flow", GRAPHLEVEL, nx.max_flow),
  180. 101 #("min_cut", False, "Minimum cut", GRAPHLEVEL, nx.min_cut),
  181.  
  182. /orange/Orange/OrangeWidgets/Unsupervised/OWNxExplorer.py:
  183. 1526
  184. 1527 def setAutoSendAttributes(self):
  185. 1528: print 'TODO setAutoSendAttributes'
  186. 1529 #if self.autoSendAttributes:
  187. 1530 # self.networkCanvas.callbackSelectVertex = self.sendAttSelectionList
  188.  
  189. /orange/Orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py:
  190. 370
  191. 371 def setAutoSendAttributes(self):
  192. 372: print 'TODO setAutoSendAttributes'
  193. 373 #if self.autoSendAttributes:
  194. 374 # self.networkCanvas.callbackSelectVertex = self.sendAttSelectionList
  195.  
  196. /orange/Orange/OrangeWidgets/Visualize/OWMultiCorrespondenceAnalysis.py:
  197. 166 for attr, labels in groups:
  198. 167 labels = list(labels)
  199. 168: advance = len(labels) # TODO add shape for each attribute and colors for each value
  200. 169 self.graph.addCurve(attr.name, brushColor=colors[attr],
  201. 170 penColor=colors[attr], size=self.pointSize,
  202.  
  203. /orange/Orange/OrangeWidgets/Visualize Qt/OWLinProj3DPlot.py:
  204. 273
  205. 274 def getSelectionsAsExampleTables(self, attrList, useAnchorData=1, addProjectedPositions=0):
  206. 275: return (None, None) # TODO: this is disabled for now
  207. 276
  208. 277 if not self.have_data:
  209.  
  210. /orange/Orange/OrangeWidgets/Visualize Qt/OWNxCanvas3D.py:
  211. 14
  212. 15 class Node3D(orangeqt.Node3D):
  213. 16: # TODO: __slot__
  214. 17 def __init__(self, index, x=None, y=None, z=None):
  215. 18 orangeqt.Node3D.__init__(self, index, 0, Qt.blue, 5)
  216. ..
  217. 426
  218. 427 def set_graph(self, graph, curve=None, items=None, links=None):
  219. 428: # TODO: clear previous nodes and edges?
  220. 429
  221. 430 if graph is None:
  222. ...
  223. 520 def fragviz_callback(self, a, b, mds, mds_refresh, components, progress_callback):
  224. 521 """Refresh the UI when running MDS on network components."""
  225. 522: # TODO
  226. 523 if not self.mdsStep % mds_refresh:
  227. 524 rotationOnly = False
  228.  
  229. /orange/Orange/OrangeWidgets/Visualize Qt/OWScatterPlot3D.py:
  230. 58 def nicenum(x, round):
  231. 59 if x <= 0.:
  232. 60: return x # TODO: what to do in such cases?
  233. 61 expv = floor(log10(x))
  234. 62 f = x / pow(10., expv)
  235. ..
  236. 81 range = nicenum(max_value-min_value, False)
  237. 82 d = nicenum(range / float(num_ticks-1), True)
  238. 83: if d <= 0.: # TODO
  239. 84 return numpy.arange(min_value, max_value, (max_value-min_value)/num_ticks), 1
  240. 85 plot_min = floor(min_value / d) * d
  241. ..
  242. 278 glMultMatrixd(numpy.array(self.model.data(), dtype=float))
  243. 279
  244. 280: # TODO: line stipple with shaders?
  245. 281 self.qglColor(self._theme.axis_values_color)
  246. 282 glEnable(GL_LINE_STIPPLE)
  247. ...
  248. 456 cam_in_space = self.camera * self.camera_distance
  249. 457
  250. 458: # TODO: the code below is horrible and should be simplified
  251. 459 planes = [self.axis_plane_xy, self.axis_plane_yz,
  252. 460 self.axis_plane_xy_back, self.axis_plane_yz_right]
  253. ...
  254. 814 return
  255. 815
  256. 816: selected = None#selected = self.plot.get_selected_indices() # TODO: crash
  257. 817 if selected == None or len(selected) != len(self.data):
  258. 818 return
  259.  
  260. /orange/Orange/OrangeWidgets/plot/owaxis.py:
  261. 166 else:
  262. 167 title_pos = title_pos - (v.p2() - v.p1())*offset
  263. 168: ## TODO: Move it according to self.label_pos
  264. 169 self.title_item.setVisible(self.show_title)
  265. 170 self.title_item.setRotation(-self.graph_line.angle())
  266.  
  267. /orange/Orange/OrangeWidgets/plot/owopenglrenderer.py:
  268. 84 glBufferData(GL_ARRAY_BUFFER, data, usage)
  269. 85
  270. 86: vertex_size = sum(attribute[0]*4 for attribute in format_description) # TODO: sizeof(type)
  271. 87 self._num_vertices = len(data) / (vertex_size / 4)
  272. 88 current_size = 0
  273. ..
  274. 102
  275. 103 def __del__(self):
  276. 104: # TODO
  277. 105 pass
  278. 106
  279.  
  280. /orange/Orange/OrangeWidgets/plot/owplot.py:
  281. 883
  282. 884 def removeAllSelections(self):
  283. 885: ## TODO
  284. 886 pass
  285. 887
  286. ...
  287. 932 self.title_item = QGraphicsTextItem(self.mainTitle, scene=self.scene())
  288. 933 title_size = self.title_item.boundingRect().size()
  289. 934: ## TODO: Check if the title is too big
  290. 935 self.title_item.setPos( graph_rect.width()/2 - title_size.width()/2, self.title_margin/2 - title_size.height()/2 )
  291. 936 graph_rect.setTop(graph_rect.top() + self.title_margin)
  292. ...
  293. 1112
  294. 1113 def update_filled_symbols(self):
  295. 1114: ## TODO: Implement this in Curve.cpp
  296. 1115 pass
  297. 1116
  298. ....
  299. 1445 r |= QRectF(axis.data_line.p1(), axis.data_line.p2())
  300. 1446 ## We leave a 5% margin on each side so the graph doesn't look overcrowded
  301. 1447: ## TODO: Perhaps change this from a fixed percentage to always round to a round number
  302. 1448 dx = r.width()/20.0
  303. 1449 dy = r.height()/20.0
  304.  
  305. /orange/Orange/OrangeWidgets/plot/owplot3d.py:
  306. 108 glDisable(GL_DEPTH_TEST)
  307. 109 glDisable(GL_BLEND)
  308. 110: offset = QPointF(0, 15) # TODO
  309. 111
  310. 112 for category in self.items:
  311. ...
  312. 353 glDepthFunc(GL_LESS)
  313. 354 glEnable(GL_DEPTH_TEST)
  314. 355: glEnable(GL_LINE_SMOOTH) # TODO
  315. 356 glDisable(GL_CULL_FACE)
  316. 357 glEnable(GL_MULTISAMPLE)
  317. 358
  318. 359: # TODO: check hardware for OpenGL 3.x+ support
  319. 360
  320. 361 self.renderer = OWOpenGLRenderer()
  321. ...
  322. 655 label = example[self.label_index]
  323. 656 x, y, z = self.map_to_plot(QVector3D(x, y, z))
  324. 657: # TODO
  325. 658 #if isinstance(label, str):
  326. 659 #self.renderText(x,y,z, label, font=self._theme.labels_font)
  327. ...
  328. 820 self.generating_program.setUniformValue('num_colors', len(colors))
  329. 821 self.generating_program.setUniformValue('num_symbols_used', num_symbols_used)
  330. 822: # TODO: colors is list of QColor
  331. 823 glUniform3fv(glGetUniformLocation(self.generating_program.programId(), 'colors'),
  332. 824 len(colors), numpy.array(colors, 'f').ravel())
  333. ...
  334. 1247
  335. 1248 if __name__ == "__main__":
  336. 1249: # TODO
  337. 1250 pass
  338. 1251
  339.  
  340. /orange/Orange/classification/rules.py:
  341. 724
  342. 725 # compute extreme distributions
  343. 726: # TODO: why evd and evd_this????
  344. 727 if self.rule_finder.evaluator.optimismReduction > 0 and not self.evd:
  345. 728 self.evd_this = self.evd_creator.computeEVD(examples, weight_id, target_class=0, progress=progress)
  346.  
  347. /orange/Orange/classification/tree.py:
  348. 1394
  349. 1395 """
  350. 1396: TODO C++ aliases
  351. 1397
  352. 1398 SplitConstructor.discrete/continuous_split_constructor -> SplitConstructor.discrete
  353.  
  354. /orange/Orange/classification/svm/__init__.py:
  355. 443 return classifier
  356. 444
  357. 445: #TODO: Unified way to get attr weights for linear SVMs.
  358. 446
  359. 447 def get_linear_svm_weights(classifier, sum=True):
  360.  
  361. /orange/Orange/clustering/consensus.py:
  362. 52 addones(c, cluster)
  363. 53
  364. 54: #TODO what to do if two samples did not appear at all?
  365. 55 #numpy prints a warning and sets "nan"
  366. 56 print appear
  367.  
  368. /orange/Orange/clustering/mixture.py:
  369. 227 diff = self.data - means[j]
  370. 228 diff = numpy.asmatrix(diff)
  371. 229: for i in range(len(self.data)): # TODO: speed up
  372. 230 cov += self.probs[i, j] * diff[i].T * diff[i]
  373. 231
  374. ...
  375. 369 means = mixture.means[:, axis]
  376. 370
  377. 371: covariances = [cov[axis,:][:, axis] for cov in mixture.covariances] # TODO: Need the whole marginal distribution.
  378. 372
  379. 373 gmm = GMModel(weights, means, covariances)
  380.  
  381. /orange/Orange/data/io.py:
  382. 596 file = as_open_file(file, "rb")
  383. 597 snifer = csv.Sniffer()
  384. 598: sample = file.read(5 * 2 ** 20) # max 5MB sample TODO: What if this is not enough. Try with a bigger sample
  385. 599 dialect = snifer.sniff(sample)
  386. 600
  387. ...
  388. 712 # Process undefined variables now that we can deduce their type
  389. 713 for ind, var_def in undefined_vars:
  390. 714: values = var_def.values - set(["?", ""]) # TODO: Other unknown strings?
  391. 715 values = sorted(values)
  392. 716 if isinstance(var_def, _disc_placeholder):
  393. ...
  394. 835 [("m", v) for v in metas]:
  395. 836
  396. 837: labels = ["{0}={1}".format(*t) for t in var.attributes.items()] # TODO escape spaces
  397. 838 var_attr_cells.append(" ".join([spec] if spec else [] + labels))
  398. 839
  399. ...
  400. 988
  401. 989 """
  402. 990: prefix, filename = prefixed_name.split(":", 1) #TODO: windows drive letters.
  403. 991 paths = search_paths(prefix)
  404. 992 if paths:
  405.  
  406. /orange/Orange/ensemble/boosting.py:
  407. 136 votes[int(c(instance))] += e
  408. 137 index = Orange.misc.selection.select_best_index(votes)
  409. 138: # TODO
  410. 139 value = Orange.data.Value(self.class_var, index)
  411. 140 if result_type == orange.GetValue:
  412.  
  413. /orange/Orange/ensemble/forest.py:
  414. 392 Return a number of instances which are classified correctly.
  415. 393 """
  416. 394: #TODO How to accomodate regression?
  417. 395 return sum(1 for el in oob if el.getclass() == classifier(el))
  418. 396
  419. ...
  420. 407 ex[attr] = oob[perm[index]][attr]
  421. 408 return ex
  422. 409: #TODO How to accomodate regression?
  423. 410 return sum(1 for i in range(len(oob)) if oob[i].getclass() == classifier(shuffle_ex(i)))
  424. 411
  425.  
  426. /orange/Orange/feature/scoring.py:
  427. 88 """
  428. 89 import numpy
  429. 90: from orngContingency import Entropy #TODO: Move to new hierarchy
  430. 91 if attr in data.domain: # if we receive attr as string we have to convert to variable
  431. 92 attr = data.domain[attr]
  432.  
  433. /orange/Orange/misc/addons.py:
  434. 873 add-on's directory.
  435. 874 """
  436. 875: #TODO This might be redefined in orngConfiguration.
  437. 876 return os.path.join(self.directory, "doc")
  438. 877
  439. ...
  440. 1527 if refresh:
  441. 1528 for r in available_repositories:
  442. 1529: #TODO: # Should show some progress (and enable cancellation)
  443. 1530 try:
  444. 1531 r.refreshdata(force=False)
  445.  
  446. /orange/Orange/misc/environ.py:
  447. 256
  448. 257 # Create the directories if missing
  449. 258: # TODO: This are not needed if using orange without the GUI
  450. 259
  451. 260 _directories_to_create = ["application_dir", "orange_settings_dir",
  452.  
  453. /orange/Orange/misc/testing.py:
  454. 462 s = pickle.dumps(self.measure)
  455. 463 measure = pickle.loads(s)
  456. 464: # TODO: make sure measure computes the same scores as measure
  457. 465
  458. 466
  459.  
  460. /orange/Orange/multitarget/tree.py:
  461. 85 # Types of classes allowed
  462. 86 self.handles_discrete = True
  463. 87: ## TODO: for discrete classes with >2 values entropy should be used
  464. 88 ## instead of variance
  465. 89 self.handles_continuous = True
  466.  
  467. /orange/Orange/network/network.py:
  468. 164 return G
  469. 165
  470. 166: ### TODO: OVERRIDE METHODS THAT CHANGE GRAPH STRUCTURE, add warning prints
  471. 167
  472. 168 def items_vars(self):
  473. ...
  474. 206 G.set_items(items)
  475. 207 return G
  476. 208: # TODO: _links
  477. 209
  478. 210 __doc__ += _get_doc(nx.Graph.__doc__)
  479.  
  480. /orange/Orange/orng/orngProjectionPursuit.py:
  481. 44 self.dim = dim
  482. 45 if type(data) == orange.ExampleTable:
  483. 46: self.dataNP = data.toNumpy()[0] # TODO: check if conversion of discrete values works ok
  484. 47 else:
  485. 48 self.dataNP = data
  486.  
  487. /orange/Orange/projection/linear.py:
  488. 1: #TODO: eliminate create_pls_projection (transform into a class)
  489. 2: #TODO: Projector as a preprocessor
  490. 3
  491. 4 import Orange
  492. .
  493. 310 if not attr_indices: return
  494. 311
  495. 312: if self.implementation == FAST_IMPLEMENTATION and not hasattr(self, '_use_3D'): # TODO
  496. 313 return self.optimize_fast_separation(steps, single_step, distances)
  497. 314
  498.  
  499. /orange/Orange/projection/mds.py:
  500. 157 ravg = numpy.sum(d, axis=1)/(self.n+0.0) # row sum
  501. 158 tavg = numpy.sum(cavg)/(self.n+0.0) # total sum
  502. 159: # TODO: optimize
  503. 160 for i in xrange(self.n):
  504. 161 for j in xrange(self.k):
  505.  
  506. /orange/Orange/regression/earth.py:
  507. 140 (default: 0.001).
  508. 141 :type thresh: float
  509. 142: :param min_span: TODO.
  510. 143 :param new_var_penalty: Penalty for introducing a new variable
  511. 144 in the model during the forward pass (default: 0).
  512. ...
  513. 982 if attr is not None and data is not None:
  514. 983 self.__init__(**kwargs)
  515. 984: # TODO: Should raise a warning, about caching
  516. 985 return self.__call__(attr, data, weight_id)
  517. 986 elif not attr and not data:
  518. ...
  519. 1050 if attr is not None and data is not None:
  520. 1051 self.__init__(**kwargs)
  521. 1052: # TODO: Should raise a warning, about caching
  522. 1053 return self.__call__(attr, data, weight_id)
  523. 1054 elif not attr and not data:
  524. ....
  525. 1158 #
  526. 1159 # bx_used = bx[:, best_set]
  527. 1160: # subsets, rss_per_subset = subsets_selection_xtx(bx_used, y) # TODO: Use leaps like library
  528. 1161 # gcv_per_subset = [gcv(rss, bx.shape[0], i + self.penalty * (i - 1) / 2.0) \
  529. 1162 # for i, rss in enumerate(rss_per_subset, 1)]
  530.  
  531. /orange/Orange/regression/linear.py:
  532. 261 else:
  533. 262 cov = pinv(dot(dot(X.T, W), X) + self.ridge_lambda * numpy.eye(m))
  534. 263: # TODO: find inferential properties of the estimators
  535. 264 compute_stats = False
  536. 265 D = dot(dot(cov, X.T), W)
  537.  
  538. /orange/Orange/testing/unit/tests/test_bayes.py:
  539. 1 from Orange.misc import testing
  540. 2
  541. 3: # TODO: test different prob estimators
  542. 4 @testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
  543. 5 class TestNaiveBayes(testing.LearnerTestCase):
  544.  
  545. /orange/Orange/testing/unit/tests/test_io.py:
  546. 20 def test_io_on(self, name):
  547. 21 table = Orange.data.Table(name)
  548. 22: for ext in ["tab", "svm", "arff"]: # TODO: add R, and C50
  549. 23 filename = name + "." + ext
  550. 24 try:
  551.  
  552. /orange/Orange/testing/unit/tests/test_measures.py:
  553. 20
  554. 21
  555. 22: # TODO: Relevance, Cost
  556. 23
  557. 24 @datasets_driven(datasets=testing.CLASSIFICATION_DATASETS,
  558.  
  559. /orange/Orange/testing/unit/tests/test_tree.py:
  560. 8 from Orange.regression import tree as rtree
  561. 9 from Orange.feature import scoring
  562. 10: # TODO: test different split_constructors, descenders, measures, stop criteria...
  563. 11
  564. 12 @datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
  565.  
  566. /orange/build/lib.linux-i686-2.6/Orange/OrangeCanvas/orngCanvas.pyw:
  567. 106 self.menuItemShowWidgetToolbar)
  568. 107
  569. 108: # TODO: Move other actions currently defined elsewhere
  570. 109
  571. 110 self.setStatusBar(MyStatusBar(self))
  572. ...
  573. 852 anyDone = False
  574. 853 for r in Orange.misc.addons.available_repositories:
  575. 854: #TODO: # Should show some progress (and enable cancellation)
  576. 855 try:
  577. 856 if r.refreshdata(force=True):
  578.  
  579. /orange/build/lib.linux-i686-2.6/Orange/OrangeCanvas/orngDlgs.py:
  580. 374 outType = self.outWidget.instance.getOutputType(outName)
  581. 375 inType = self.inWidget.instance.getInputType(inName)
  582. 376: if not issubclass(outType, inType) and not issubclass(inType, outType): return 0 #TODO check this with signalManager.canConnect
  583. 377
  584. 378 inSignal = None
  585. ...
  586. 901 import Orange.misc.addons
  587. 902 try:
  588. 903: repo = Orange.misc.addons.OrangeAddOnRepository(dlg.name, dlg.url) #TODO: This can take some time - inform the user!
  589. 904 self.repositories.append(repo)
  590. 905 except Exception, e:
  591. ...
  592. 921 repo.name, repo.url = dlg.name, dlg.url
  593. 922 if oldurl != repo.url:
  594. 923: repo.refreshdata(force=True) #TODO: This can take some time - inform the user!
  595. 924 except Exception, e:
  596. 925 repo.name, repo.url = oldname, oldurl
  597. ...
  598. 949 def reloadRepos(self):
  599. 950 # Reload add-on list for all repositories.
  600. 951: # TODO: This can take some time - show some progress to user!
  601. 952 for repo in self.repositories:
  602. 953 try:
  603. ...
  604. 1243 selectedRepository = self.getRepoFromItem(self.tree.currentItem())
  605. 1244 selectedAddOnId = self.getAddOnIdFromItem(self.tree.currentItem())
  606. 1245: #TODO: Save the next repository selection too, in case the current one was deleted
  607. 1246
  608. 1247 # Clear the tree
  609.  
  610. /orange/build/lib.linux-i686-2.6/Orange/OrangeCanvas/orngSignalManager.py:
  611. 304
  612. 305 def canConnect(self, widgetFrom, widgetTo, dynamic=True):
  613. 306: # TODO: This should be retrieved from orngRegistry.WidgetDescription
  614. 307 outsignals = [OutputSignal(*tt) for tt in widgetFrom.outputs]
  615. 308 insignals = [InputSignal(*tt) for tt in widgetTo.inputs]
  616.  
  617. /orange/build/lib.linux-i686-2.6/Orange/OrangeCanvas/orngView.py:
  618. 333 # we must check if we have really connected some output to input
  619. 334 if start and end and start != end:
  620. 335: if self.doc.signalManager.signalProcessingInProgress: # TODO: Remove this check when signal manager handles out of sync signals
  621. 336 QMessageBox.information( self, "Orange Canvas", "Unable to connect widgets while signal processing is in progress. Please wait.")
  622. 337 else:
  623.  
  624. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/OWBaseWidget.py:
  625. 994
  626. 995 """
  627. 996: ## TODO: make this thread safe
  628. 997
  629. 998 async.connect(async, SIGNAL("finished(PyQt_PyObject, QString)"), self.asyncFinished)
  630.  
  631. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/OWContexts.py:
  632. 275
  633. 276 if not flags & self.List:
  634. 277: # TODO: is setattr supposed to check that we do not assign values that are optional and do not exist?
  635. 278 # is context cloning's filter enough to get rid of such attributes?
  636. 279 setattr(widget, name, value[0])
  637. ...
  638. 374 potentiallyFilled += len(selected)
  639. 375 for i in selected:
  640. 376: # TODO: shouldn't we check the attribute type here, too? or should we change self.saveLow for these field types then?
  641. 377 if (not flags & self.ExcludeOrdinaryAttributes and value[i] in attributes
  642. 378 or flags & self.IncludeMetaAttributes and value[i] in metas):
  643.  
  644. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/OWGUI.py:
  645. 895
  646. 896 if source != self:
  647. 897: setattr(source.widget, source.ogLabels, [item for item in allSourceItems if item not in selectedItems]) # TODO: optimize this code. use the fact that the selectedItemIndices is a sorted list
  648. 898 setattr(self.widget, self.ogLabels, allDestItems[:index] + selectedItems + allDestItems[index:])
  649. 899 setattr(source.widget, source.ogValue, []) # clear selection in the source widget
  650. ...
  651. 1995 if have_ratio:
  652. 1996 # The text is raised 3 pixels above the bar.
  653. 1997: text_rect = rect.adjusted(4, 1, -4, -4) # TODO: Style dependent margins?
  654. 1998 else:
  655. 1999 text_rect = rect.adjusted(4, 4, -4, -4)
  656. ....
  657. 2006 qApp.style().drawPrimitive(QStyle.PE_PanelItemViewItem, option, painter)
  658. 2007
  659. 2008: # TODO: Check ForegroundRole.
  660. 2009 if option.state & QStyle.State_Selected:
  661. 2010 color = option.palette.highlightedText().color()
  662. ....
  663. 2161 space = style.pixelMetric(pm_spacing, option, button)
  664. 2162 width = style.pixelMetric(pm_indicator_width, option, button)
  665. 2163: style_correction = {"macintosh (aqua)": -2, "macintosh(aqua)": -2, "plastique": 1, "cde": 1, "motif": 1} #TODO: add other styles (Maybe load corrections from .cfg file?)
  666. 2164 return space + width + style_correction.get(str(qApp.style().objectName()).lower(), 0)
  667. 2165
  668.  
  669. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Classify/OWNomogram.py:
  670. 118 self.CICheck, self.CILabel = OWGUI.checkWithSpin(layoutBox, self, 'Confidence intervals (%):', min=1, max=99, step = 1, checked='confidence_check', value='confidence_percent', checkCallback=self.showNomogram, spinCallback = self.showNomogram)
  671. 119
  672. 120: self.histogramCheck, self.histogramLabel = OWGUI.checkWithSpin(layoutBox, self, 'Show histogram, size', min=1, max=30, checked='histogram', value='histogram_size', step = 1, tooltip='-(TODO)-', checkCallback=self.showNomogram, spinCallback = self.showNomogram)
  673. 121
  674. 122 OWGUI.separator(layoutBox)
  675.  
  676. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Data/OWDataDomain.py:
  677. 129 return vars, item_data
  678. 130 else:
  679. 131: #TODO: get vars from orange.Variable.getExisting
  680. 132 return None, None
  681. 133
  682.  
  683. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Data/OWEditDomain.py:
  684. 346
  685. 347 class ContinuousVariableEditor(VariableEditor):
  686. 348: #TODO: enable editing of number_of_decimals, scientific format ...
  687. 349 pass
  688. 350
  689. ...
  690. 639
  691. 640 # Assumes getmetas().items() order has not changed.
  692. 641: # TODO: store metaids in set_data method
  693. 642 for (mid, _), new in zip(self.input_domain.getmetas().items(),
  694. 643 new_metas):
  695.  
  696. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Data/OWPythonScript.py:
  697. 347 b = w.addAction(action)
  698. 348 b.setPopupMode(QToolButton.InstantPopup)
  699. 349: ## TODO: set the space for the indicator
  700. 350
  701. 351 w.layout().setSpacing(1)
  702.  
  703. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Data/OWRank.py:
  704. 512 except Exception, ex:
  705. 513 self.warning(measure_index, "Error evaluating %r: %r" % (meas, str(ex)))
  706. 514: # TODO: store exception message (for widget info or item tooltip)
  707. 515 if meas == "Log Odds Ratio" and s is not None:
  708. 516 if s == -999999:
  709.  
  710. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Prototypes/OWCorrelations.py:
  711. 399 vars = [self.cont_vars[i], self.cont_vars[j]]
  712. 400 else:
  713. 401: # TODO: Clear graph
  714. 402 vars = None
  715. 403 self.selected_vars = vars
  716.  
  717. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Prototypes/OWModelMap.py:
  718. 513 self.set_graph(self.graph)
  719. 514 self.set_items_distance_matrix(self.graph_matrix)
  720. 515: # TODO clickedAttLstBox -> setLabelText(["attributes"]
  721. 516
  722. 517 for i, ex in enumerate(self.graph.items()):
  723.  
  724. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Unsupervised/OWModelMapQt.py:
  725. 525 self.set_graph(self.graph, ModelCurve)
  726. 526 self.set_items_distance_matrix(self.graph_matrix)
  727. 527: # TODO clickedAttLstBox -> setLabelText(["attributes"]
  728. 528
  729. 529 nodes = self.networkCanvas.networkCurve.nodes()
  730.  
  731. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Unsupervised/OWNxAnalysis.py:
  732. 97 ("number_weakly_connected_components", False, "Number of weakly connected components", GRAPHLEVEL, nx.number_weakly_connected_components),
  733. 98 ("number_attracting_components", False, "Number of attracting components", GRAPHLEVEL, nx.number_attracting_components),
  734. 99: # TODO: input parameters
  735. 100 #("max_flow", False, "Maximum flow", GRAPHLEVEL, nx.max_flow),
  736. 101 #("min_cut", False, "Minimum cut", GRAPHLEVEL, nx.min_cut),
  737.  
  738. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Unsupervised/OWNxExplorer.py:
  739. 1526
  740. 1527 def setAutoSendAttributes(self):
  741. 1528: print 'TODO setAutoSendAttributes'
  742. 1529 #if self.autoSendAttributes:
  743. 1530 # self.networkCanvas.callbackSelectVertex = self.sendAttSelectionList
  744.  
  745. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py:
  746. 370
  747. 371 def setAutoSendAttributes(self):
  748. 372: print 'TODO setAutoSendAttributes'
  749. 373 #if self.autoSendAttributes:
  750. 374 # self.networkCanvas.callbackSelectVertex = self.sendAttSelectionList
  751.  
  752. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Visualize/OWMultiCorrespondenceAnalysis.py:
  753. 166 for attr, labels in groups:
  754. 167 labels = list(labels)
  755. 168: advance = len(labels) # TODO add shape for each attribute and colors for each value
  756. 169 self.graph.addCurve(attr.name, brushColor=colors[attr],
  757. 170 penColor=colors[attr], size=self.pointSize,
  758.  
  759. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Visualize Qt/OWLinProj3DPlot.py:
  760. 273
  761. 274 def getSelectionsAsExampleTables(self, attrList, useAnchorData=1, addProjectedPositions=0):
  762. 275: return (None, None) # TODO: this is disabled for now
  763. 276
  764. 277 if not self.have_data:
  765.  
  766. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Visualize Qt/OWNxCanvas3D.py:
  767. 14
  768. 15 class Node3D(orangeqt.Node3D):
  769. 16: # TODO: __slot__
  770. 17 def __init__(self, index, x=None, y=None, z=None):
  771. 18 orangeqt.Node3D.__init__(self, index, 0, Qt.blue, 5)
  772. ..
  773. 426
  774. 427 def set_graph(self, graph, curve=None, items=None, links=None):
  775. 428: # TODO: clear previous nodes and edges?
  776. 429
  777. 430 if graph is None:
  778. ...
  779. 520 def fragviz_callback(self, a, b, mds, mds_refresh, components, progress_callback):
  780. 521 """Refresh the UI when running MDS on network components."""
  781. 522: # TODO
  782. 523 if not self.mdsStep % mds_refresh:
  783. 524 rotationOnly = False
  784.  
  785. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/Visualize Qt/OWScatterPlot3D.py:
  786. 58 def nicenum(x, round):
  787. 59 if x <= 0.:
  788. 60: return x # TODO: what to do in such cases?
  789. 61 expv = floor(log10(x))
  790. 62 f = x / pow(10., expv)
  791. ..
  792. 81 range = nicenum(max_value-min_value, False)
  793. 82 d = nicenum(range / float(num_ticks-1), True)
  794. 83: if d <= 0.: # TODO
  795. 84 return numpy.arange(min_value, max_value, (max_value-min_value)/num_ticks), 1
  796. 85 plot_min = floor(min_value / d) * d
  797. ..
  798. 278 glMultMatrixd(numpy.array(self.model.data(), dtype=float))
  799. 279
  800. 280: # TODO: line stipple with shaders?
  801. 281 self.qglColor(self._theme.axis_values_color)
  802. 282 glEnable(GL_LINE_STIPPLE)
  803. ...
  804. 456 cam_in_space = self.camera * self.camera_distance
  805. 457
  806. 458: # TODO: the code below is horrible and should be simplified
  807. 459 planes = [self.axis_plane_xy, self.axis_plane_yz,
  808. 460 self.axis_plane_xy_back, self.axis_plane_yz_right]
  809. ...
  810. 814 return
  811. 815
  812. 816: selected = None#selected = self.plot.get_selected_indices() # TODO: crash
  813. 817 if selected == None or len(selected) != len(self.data):
  814. 818 return
  815.  
  816. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/plot/owaxis.py:
  817. 166 else:
  818. 167 title_pos = title_pos - (v.p2() - v.p1())*offset
  819. 168: ## TODO: Move it according to self.label_pos
  820. 169 self.title_item.setVisible(self.show_title)
  821. 170 self.title_item.setRotation(-self.graph_line.angle())
  822.  
  823. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/plot/owopenglrenderer.py:
  824. 84 glBufferData(GL_ARRAY_BUFFER, data, usage)
  825. 85
  826. 86: vertex_size = sum(attribute[0]*4 for attribute in format_description) # TODO: sizeof(type)
  827. 87 self._num_vertices = len(data) / (vertex_size / 4)
  828. 88 current_size = 0
  829. ..
  830. 102
  831. 103 def __del__(self):
  832. 104: # TODO
  833. 105 pass
  834. 106
  835.  
  836. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/plot/owplot.py:
  837. 883
  838. 884 def removeAllSelections(self):
  839. 885: ## TODO
  840. 886 pass
  841. 887
  842. ...
  843. 932 self.title_item = QGraphicsTextItem(self.mainTitle, scene=self.scene())
  844. 933 title_size = self.title_item.boundingRect().size()
  845. 934: ## TODO: Check if the title is too big
  846. 935 self.title_item.setPos( graph_rect.width()/2 - title_size.width()/2, self.title_margin/2 - title_size.height()/2 )
  847. 936 graph_rect.setTop(graph_rect.top() + self.title_margin)
  848. ...
  849. 1112
  850. 1113 def update_filled_symbols(self):
  851. 1114: ## TODO: Implement this in Curve.cpp
  852. 1115 pass
  853. 1116
  854. ....
  855. 1445 r |= QRectF(axis.data_line.p1(), axis.data_line.p2())
  856. 1446 ## We leave a 5% margin on each side so the graph doesn't look overcrowded
  857. 1447: ## TODO: Perhaps change this from a fixed percentage to always round to a round number
  858. 1448 dx = r.width()/20.0
  859. 1449 dy = r.height()/20.0
  860.  
  861. /orange/build/lib.linux-i686-2.6/Orange/OrangeWidgets/plot/owplot3d.py:
  862. 108 glDisable(GL_DEPTH_TEST)
  863. 109 glDisable(GL_BLEND)
  864. 110: offset = QPointF(0, 15) # TODO
  865. 111
  866. 112 for category in self.items:
  867. ...
  868. 353 glDepthFunc(GL_LESS)
  869. 354 glEnable(GL_DEPTH_TEST)
  870. 355: glEnable(GL_LINE_SMOOTH) # TODO
  871. 356 glDisable(GL_CULL_FACE)
  872. 357 glEnable(GL_MULTISAMPLE)
  873. 358
  874. 359: # TODO: check hardware for OpenGL 3.x+ support
  875. 360
  876. 361 self.renderer = OWOpenGLRenderer()
  877. ...
  878. 655 label = example[self.label_index]
  879. 656 x, y, z = self.map_to_plot(QVector3D(x, y, z))
  880. 657: # TODO
  881. 658 #if isinstance(label, str):
  882. 659 #self.renderText(x,y,z, label, font=self._theme.labels_font)
  883. ...
  884. 820 self.generating_program.setUniformValue('num_colors', len(colors))
  885. 821 self.generating_program.setUniformValue('num_symbols_used', num_symbols_used)
  886. 822: # TODO: colors is list of QColor
  887. 823 glUniform3fv(glGetUniformLocation(self.generating_program.programId(), 'colors'),
  888. 824 len(colors), numpy.array(colors, 'f').ravel())
  889. ...
  890. 1247
  891. 1248 if __name__ == "__main__":
  892. 1249: # TODO
  893. 1250 pass
  894. 1251
  895.  
  896. /orange/build/lib.linux-i686-2.6/Orange/classification/rules.py:
  897. 724
  898. 725 # compute extreme distributions
  899. 726: # TODO: why evd and evd_this????
  900. 727 if self.rule_finder.evaluator.optimismReduction > 0 and not self.evd:
  901. 728 self.evd_this = self.evd_creator.computeEVD(examples, weight_id, target_class=0, progress=progress)
  902.  
  903. /orange/build/lib.linux-i686-2.6/Orange/classification/tree.py:
  904. 1394
  905. 1395 """
  906. 1396: TODO C++ aliases
  907. 1397
  908. 1398 SplitConstructor.discrete/continuous_split_constructor -> SplitConstructor.discrete
  909.  
  910. /orange/build/lib.linux-i686-2.6/Orange/classification/svm/__init__.py:
  911. 443 return classifier
  912. 444
  913. 445: #TODO: Unified way to get attr weights for linear SVMs.
  914. 446
  915. 447 def get_linear_svm_weights(classifier, sum=True):
  916.  
  917. /orange/build/lib.linux-i686-2.6/Orange/clustering/consensus.py:
  918. 52 addones(c, cluster)
  919. 53
  920. 54: #TODO what to do if two samples did not appear at all?
  921. 55 #numpy prints a warning and sets "nan"
  922. 56 print appear
  923.  
  924. /orange/build/lib.linux-i686-2.6/Orange/clustering/mixture.py:
  925. 227 diff = self.data - means[j]
  926. 228 diff = numpy.asmatrix(diff)
  927. 229: for i in range(len(self.data)): # TODO: speed up
  928. 230 cov += self.probs[i, j] * diff[i].T * diff[i]
  929. 231
  930. ...
  931. 369 means = mixture.means[:, axis]
  932. 370
  933. 371: covariances = [cov[axis,:][:, axis] for cov in mixture.covariances] # TODO: Need the whole marginal distribution.
  934. 372
  935. 373 gmm = GMModel(weights, means, covariances)
  936.  
  937. /orange/build/lib.linux-i686-2.6/Orange/data/io.py:
  938. 596 file = as_open_file(file, "rb")
  939. 597 snifer = csv.Sniffer()
  940. 598: sample = file.read(5 * 2 ** 20) # max 5MB sample TODO: What if this is not enough. Try with a bigger sample
  941. 599 dialect = snifer.sniff(sample)
  942. 600
  943. ...
  944. 712 # Process undefined variables now that we can deduce their type
  945. 713 for ind, var_def in undefined_vars:
  946. 714: values = var_def.values - set(["?", ""]) # TODO: Other unknown strings?
  947. 715 values = sorted(values)
  948. 716 if isinstance(var_def, _disc_placeholder):
  949. ...
  950. 835 [("m", v) for v in metas]:
  951. 836
  952. 837: labels = ["{0}={1}".format(*t) for t in var.attributes.items()] # TODO escape spaces
  953. 838 var_attr_cells.append(" ".join([spec] if spec else [] + labels))
  954. 839
  955. ...
  956. 988
  957. 989 """
  958. 990: prefix, filename = prefixed_name.split(":", 1) #TODO: windows drive letters.
  959. 991 paths = search_paths(prefix)
  960. 992 if paths:
  961.  
  962. /orange/build/lib.linux-i686-2.6/Orange/ensemble/boosting.py:
  963. 136 votes[int(c(instance))] += e
  964. 137 index = Orange.misc.selection.select_best_index(votes)
  965. 138: # TODO
  966. 139 value = Orange.data.Value(self.class_var, index)
  967. 140 if result_type == orange.GetValue:
  968.  
  969. /orange/build/lib.linux-i686-2.6/Orange/ensemble/forest.py:
  970. 392 Return a number of instances which are classified correctly.
  971. 393 """
  972. 394: #TODO How to accomodate regression?
  973. 395 return sum(1 for el in oob if el.getclass() == classifier(el))
  974. 396
  975. ...
  976. 407 ex[attr] = oob[perm[index]][attr]
  977. 408 return ex
  978. 409: #TODO How to accomodate regression?
  979. 410 return sum(1 for i in range(len(oob)) if oob[i].getclass() == classifier(shuffle_ex(i)))
  980. 411
  981.  
  982. /orange/build/lib.linux-i686-2.6/Orange/feature/scoring.py:
  983. 88 """
  984. 89 import numpy
  985. 90: from orngContingency import Entropy #TODO: Move to new hierarchy
  986. 91 if attr in data.domain: # if we receive attr as string we have to convert to variable
  987. 92 attr = data.domain[attr]
  988.  
  989. /orange/build/lib.linux-i686-2.6/Orange/misc/addons.py:
  990. 873 add-on's directory.
  991. 874 """
  992. 875: #TODO This might be redefined in orngConfiguration.
  993. 876 return os.path.join(self.directory, "doc")
  994. 877
  995. ...
  996. 1527 if refresh:
  997. 1528 for r in available_repositories:
  998. 1529: #TODO: # Should show some progress (and enable cancellation)
  999. 1530 try:
  1000. 1531 r.refreshdata(force=False)
  1001.  
  1002. /orange/build/lib.linux-i686-2.6/Orange/misc/environ.py:
  1003. 256
  1004. 257 # Create the directories if missing
  1005. 258: # TODO: This are not needed if using orange without the GUI
  1006. 259
  1007. 260 _directories_to_create = ["application_dir", "orange_settings_dir",
  1008.  
  1009. /orange/build/lib.linux-i686-2.6/Orange/misc/testing.py:
  1010. 462 s = pickle.dumps(self.measure)
  1011. 463 measure = pickle.loads(s)
  1012. 464: # TODO: make sure measure computes the same scores as measure
  1013. 465
  1014. 466
  1015.  
  1016. /orange/build/lib.linux-i686-2.6/Orange/multitarget/tree.py:
  1017. 85 # Types of classes allowed
  1018. 86 self.handles_discrete = True
  1019. 87: ## TODO: for discrete classes with >2 values entropy should be used
  1020. 88 ## instead of variance
  1021. 89 self.handles_continuous = True
  1022.  
  1023. /orange/build/lib.linux-i686-2.6/Orange/network/network.py:
  1024. 164 return G
  1025. 165
  1026. 166: ### TODO: OVERRIDE METHODS THAT CHANGE GRAPH STRUCTURE, add warning prints
  1027. 167
  1028. 168 def items_vars(self):
  1029. ...
  1030. 206 G.set_items(items)
  1031. 207 return G
  1032. 208: # TODO: _links
  1033. 209
  1034. 210 __doc__ += _get_doc(nx.Graph.__doc__)
  1035.  
  1036. /orange/build/lib.linux-i686-2.6/Orange/orng/orngProjectionPursuit.py:
  1037. 44 self.dim = dim
  1038. 45 if type(data) == orange.ExampleTable:
  1039. 46: self.dataNP = data.toNumpy()[0] # TODO: check if conversion of discrete values works ok
  1040. 47 else:
  1041. 48 self.dataNP = data
  1042.  
  1043. /orange/build/lib.linux-i686-2.6/Orange/projection/linear.py:
  1044. 1: #TODO: eliminate create_pls_projection (transform into a class)
  1045. 2: #TODO: Projector as a preprocessor
  1046. 3
  1047. 4 import Orange
  1048. .
  1049. 310 if not attr_indices: return
  1050. 311
  1051. 312: if self.implementation == FAST_IMPLEMENTATION and not hasattr(self, '_use_3D'): # TODO
  1052. 313 return self.optimize_fast_separation(steps, single_step, distances)
  1053. 314
  1054.  
  1055. /orange/build/lib.linux-i686-2.6/Orange/projection/mds.py:
  1056. 157 ravg = numpy.sum(d, axis=1)/(self.n+0.0) # row sum
  1057. 158 tavg = numpy.sum(cavg)/(self.n+0.0) # total sum
  1058. 159: # TODO: optimize
  1059. 160 for i in xrange(self.n):
  1060. 161 for j in xrange(self.k):
  1061.  
  1062. /orange/build/lib.linux-i686-2.6/Orange/regression/earth.py:
  1063. 140 (default: 0.001).
  1064. 141 :type thresh: float
  1065. 142: :param min_span: TODO.
  1066. 143 :param new_var_penalty: Penalty for introducing a new variable
  1067. 144 in the model during the forward pass (default: 0).
  1068. ...
  1069. 982 if attr is not None and data is not None:
  1070. 983 self.__init__(**kwargs)
  1071. 984: # TODO: Should raise a warning, about caching
  1072. 985 return self.__call__(attr, data, weight_id)
  1073. 986 elif not attr and not data:
  1074. ...
  1075. 1050 if attr is not None and data is not None:
  1076. 1051 self.__init__(**kwargs)
  1077. 1052: # TODO: Should raise a warning, about caching
  1078. 1053 return self.__call__(attr, data, weight_id)
  1079. 1054 elif not attr and not data:
  1080. ....
  1081. 1158 #
  1082. 1159 # bx_used = bx[:, best_set]
  1083. 1160: # subsets, rss_per_subset = subsets_selection_xtx(bx_used, y) # TODO: Use leaps like library
  1084. 1161 # gcv_per_subset = [gcv(rss, bx.shape[0], i + self.penalty * (i - 1) / 2.0) \
  1085. 1162 # for i, rss in enumerate(rss_per_subset, 1)]
  1086.  
  1087. /orange/build/lib.linux-i686-2.6/Orange/regression/linear.py:
  1088. 261 else:
  1089. 262 cov = pinv(dot(dot(X.T, W), X) + self.ridge_lambda * numpy.eye(m))
  1090. 263: # TODO: find inferential properties of the estimators
  1091. 264 compute_stats = False
  1092. 265 D = dot(dot(cov, X.T), W)
  1093.  
  1094. /orange/build/lib.linux-i686-2.6/Orange/testing/unit/tests/test_bayes.py:
  1095. 1 from Orange.misc import testing
  1096. 2
  1097. 3: # TODO: test different prob estimators
  1098. 4 @testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
  1099. 5 class TestNaiveBayes(testing.LearnerTestCase):
  1100.  
  1101. /orange/build/lib.linux-i686-2.6/Orange/testing/unit/tests/test_io.py:
  1102. 20 def test_io_on(self, name):
  1103. 21 table = Orange.data.Table(name)
  1104. 22: for ext in ["tab", "svm", "arff"]: # TODO: add R, and C50
  1105. 23 filename = name + "." + ext
  1106. 24 try:
  1107.  
  1108. /orange/build/lib.linux-i686-2.6/Orange/testing/unit/tests/test_measures.py:
  1109. 20
  1110. 21
  1111. 22: # TODO: Relevance, Cost
  1112. 23
  1113. 24 @datasets_driven(datasets=testing.CLASSIFICATION_DATASETS,
  1114.  
  1115. /orange/build/lib.linux-i686-2.6/Orange/testing/unit/tests/test_tree.py:
  1116. 8 from Orange.regression import tree as rtree
  1117. 9 from Orange.feature import scoring
  1118. 10: # TODO: test different split_constructors, descenders, measures, stop criteria...
  1119. 11
  1120. 12 @datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
  1121.  
  1122. /orange/docs/extend-widgets/rst/OrangeWidgets.plot.rst:
  1123. 14 OrangeWidgets.plot.owpoint
  1124. 15 OrangeWidgets.plot.owlegend
  1125. 16: .. OrangeWidgets.plot.owaxis TODO: add file
  1126. 17
  1127.  
  1128. /orange/docs/reference/rst/Orange.classification.tree.rst:
  1129. 1397
  1130. 1398 """
  1131. 1399: TODO C++ aliases
  1132. 1400
  1133. 1401 SplitConstructor.discrete/continuous_split_constructor -> SplitConstructor.discrete
  1134.  
  1135. /orange/docs/reference/rst/Orange.feature.descriptor.rst:
  1136. 238 and can be used as a descriptor for attributes that contain arbitrary Python
  1137. 239 values. Since this is an advanced topic, PythonVariables are described on a
  1138. 240: separate page. !!TODO!!
  1139. 241
  1140. 242
  1141.  
  1142. /orange/docs/reference/rst/Orange.feature.scoring.rst:
  1143. 202 classification cost for approximately 0.083 per instance.
  1144. 203
  1145. 204: .. comment opposite error - is this term correct? TODO
  1146. 205
  1147. 206 .. index::
  1148.  
  1149. /orange/docs/reference/rst/code/tree3.py:
  1150. 4 # Category: modelling
  1151. 5 # Uses: iris.tab
  1152. 6: # Referenced: TODO
  1153. 7
  1154. 8 import Orange
  1155.  
  1156. /orange/docs/reference/rst/code/tree_c45.py:
  1157. 3 # Classes: C45Learner, C45Classifier
  1158. 4 # Uses: iris
  1159. 5: # Referenced: TODO
  1160. 6
  1161. 7 import Orange
  1162.  
  1163. /orange/install-scripts/addon-pack/pack-addons.sh:
  1164. 8 # first, so the contents must be a SVN checkout.
  1165. 9 # The packing only occurs if the addon.txt has been changed!
  1166. 10: # TODO: Pack the binary parts too!
  1167. 11 #
  1168. 12
  1169.  
  1170. /orange/install-scripts/mac/bundle-build-hg.sh:
  1171. 55 ./bundle-inject-pypi.sh distribute-0.6.24 http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz $REPOS_DIR ${TMP_BUNDLE_DIR}/Orange.app
  1172. 56
  1173. 57: # TODO: from here on we could use easy_install to install pip and then use that
  1174. 58 echo "Installing suds library"
  1175. 59 echo "+++++++++++++++++++++++"
  1176.  
  1177. /orange/install-scripts/mac/bundle-daily-build-hg.sh:
  1178. 27
  1179. 28
  1180. 29: # TODO: Should be called only on a daily build server and not if building locally
  1181. 30 /Users/ailabc/mount-dirs.sh
  1182. 31
  1183.  
  1184. /orange/install-scripts/mac/bundle-daily-build.sh:
  1185. 171 fi
  1186. 172
  1187. 173: # TODO: Should be called only on a daily build server and not if building locally
  1188. 174 /Users/ailabc/mount-dirs.sh
  1189. 175
  1190. ...
  1191. 290 fi
  1192. 291
  1193. 292: # TODO: Should be called only on a daily build server and not if building locally
  1194. 293 /Users/ailabc/mount-dirs.sh
  1195. 294
  1196.  
  1197. /orange/install-scripts/mac/fink-daily-build-packages.sh:
  1198. 185 fink $FINK_ARGS cleanup --all
  1199. 186
  1200. 187: # TODO: Should be called only on a daily build server and not if building locally
  1201. 188 /Users/ailabc/mount-dirs.sh
  1202. 189
  1203.  
  1204. /orange/install-scripts/mac/fink-daily-build.sh:
  1205. 367 fink $FINK_ARGS cleanup --all
  1206. 368
  1207. 369: # TODO: Should be called only on a daily build server and not if building locally
  1208. 370 /Users/ailabc/mount-dirs.sh
  1209. 371
  1210.  
  1211. /orange/install-scripts/mac/fink/matplotlib-py.info:
  1212. 96 <<
  1213. 97 License: OSI-Approved
  1214. 98: DocFiles: README.txt license/*LICENSE* TODO INTERACTIVE INSTALL CHANGELOG KNOWN_BUGS
  1215. 99 # API_CHANGES
  1216. 100 Description: Pure python 2D plotting with a Matlab syntax
  1217.  
  1218. /orange/install-scripts/mac/fink/orange-bioinformatics-gui-svn-py.info:
  1219. 103 now run:
  1220. 104
  1221. 105: $PYTHON TODO/PATH/TO/SCRIPT.py
  1222. 106 EOMSG
  1223. 107 <<
  1224.  
  1225. /orange/install-scripts/mac/fink/orange-gui-hg-py.info:
  1226. 131
  1227. 132 # Register dataset path
  1228. 133: # TODO: this should be done by setup.py install and using global orangerc.cfg file
  1229. 134 echo "datasetsPath=\"%p/share/doc/orange-svn-py%type_pkg[python]/datasets/\"" > %i/lib/python%type_raw[python]/site-packages/Orange/orng/orngConfiguration.py
  1230. 135
  1231.  
  1232. /orange/install-scripts/orngServer/orngServerFilesServer.py:
  1233. 329 shutil.copyfileobj(data.file, fupl, 1024*8) #copy with buffer
  1234. 330 fupl.close()
  1235. 331: #print "transfer successful?" #TODO check this - MD5?
  1236. 332
  1237. 333: #TODO is there any difference in those files?
  1238. 334
  1239. 335 fupl = open(fi.fname + ".uploading", 'rb')
  1240.  
  1241. /orange/source/orange/earth.cpp:
  1242. 1 // This code is derived from code in the Rational Fortran file dmarss.r which is
  1243. 2 // part of the R and S mda package by Hastie and Tibshirani.
  1244. 3: // Comments containing "TODO" mark known issues
  1245. 4 //
  1246. 5 // See the R earth documentation for descriptions of the principal data structures.
  1247. .
  1248. 75 - Changed EvalSubsetsUsingXtX to return an error code if lin. dep. terms in bx
  1249. 76
  1250. 77: - TODO: Move global vars inside the functions using them (most are local)
  1251. 78 */
  1252. 79
  1253. ..
  1254. 702 // values of inverse(bx'bx). We assume that R is created from a full rank X.
  1255. 703 //
  1256. 704: // TODO This could be simplified
  1257. 705
  1258. 706 static void CalcDiags(
  1259. ...
  1260. 1558 RssDelta /= NewVarAdjust;
  1261. 1559
  1262. 1560: // TODO HastieTibs code had an extra test here, seems unnecessary
  1263. 1561 // !(iCase > 0 && x_(ix0,iPred) == x_(xOrder_(iCase-1,iPred),iPred))
  1264. 1562
  1265. ....
  1266. 1612
  1267. 1613 // init bxOrth[,nTerms] and bxOrthMean[nTerms] for the candidate term
  1268. 1614: // TODO look into *pIsNewForm handling here, it's confusing
  1269. 1615
  1270. 1616 InitBxOrthCol(bxOrth, bxOrthCenteredT, bxOrthMean, pIsNewForm,
  1271. ....
  1272. 1646 // This function now selects a predictor, and a knot for that predictor.
  1273. 1647 //
  1274. 1648: // TODO These functions have a ridiculous number of parameters, I know.
  1275. 1649 //
  1276. 1650: // TODO A note on the comparison against ALMOST_ZERO below:
  1277. 1651 // It's not a clean solution but seems to work ok.
  1278. 1652 // It was added after we saw different results on different
  1279. ....
  1280. 2159 // increment nTerms by 2 but don't set the flag in FullSet.
  1281. 2160 //
  1282. 2161: // TODO feature: add option to prescale x and y
  1283. 2162
  1284. 2163 static void ForwardPass(
  1285. ....
  1286. 2814 //-----------------------------------------------------------------------------
  1287. 2815 // print a string representing the earth expresssion, one term per line
  1288. 2816: // TODO spacing is not quite right and is overly complicated
  1289. 2817
  1290. 2818 #if STANDALONE
  1291. ....
  1292. 3070 }
  1293. 3071
  1294. 3072: // TODO: Check for classVar, assert all attributes are continuous
  1295. 3073
  1296. 3074 // num_preds = 1;
  1297. ....
  1298. 3212 std::string TEarthClassifier::format_earth(){
  1299. 3213 FormatEarth(_best_set, _dirs, _cuts, _betas, num_preds, 1, num_terms, max_terms, 3, 0.0);
  1300. 3214: // TODO: FormatEarth to a string.
  1301. 3215 return "";
  1302. 3216 }
  1303.  
  1304. /orange/source/orange/hclust.cpp:
  1305. 753 mapping.begin() + right_left.last);
  1306. 754
  1307. 755: // TODO: precompute the scores for m and k in an array and use a simpler
  1308. 756 // comparison function
  1309. 757 std::sort(m_ordered.begin(), m_ordered.end(), CompareByScores(M, left, u));
  1310. ...
  1311. 863 }
  1312. 864 if (callback)
  1313. 865: // TODO: count the number of already processed nodes.
  1314. 866 callback->operator()(0.0, PHierarchicalCluster(&cluster));
  1315. 867 }
  1316.  
  1317. /orange/source/orange/logfit.cpp:
  1318. 141 beta_se=mlnew TAttributedFloatList(enum_attributes);
  1319. 142
  1320. 143: //TODO: obstaja konstruktor, ki pretvori iz navadnega arraya?
  1321. 144 for (i=0; i<input.k+1; i++) {
  1322. 145 beta->push_back(O.beta[i]);
  1323.  
  1324. /orange/source/orange/logistic.cpp:
  1325. 29 {}
  1326. 30
  1327. 31: // TODO: najdi pametno mesto za naslednji dve funkciji
  1328. 32 // compute waldZ statistic from beta and beta_se
  1329. 33 PAttributedFloatList TLogRegLearner::computeWaldZ(PAttributedFloatList &beta, PAttributedFloatList &beta_se)
  1330. ..
  1331. 53 }
  1332. 54 double p = exp(-0.5*zt);
  1333. 55: // TODO: PI, kje najdes to konstano
  1334. 56 p *= sqrt(2*zt/3.141592);
  1335. 57
  1336. 58 double t=p;
  1337. 59 int a=3;
  1338. 60: // TODO: poglej kaj je to 0.0000...1 ?
  1339. 61 for (; t>0.0000000001*p; a=a+2) {
  1340. 62 t*=zt/a;
  1341.  
  1342. /orange/source/orange/logistic.hpp:
  1343. 34 #include "transval.hpp"
  1344. 35
  1345. 36: // TODO: add other includings
  1346. 37
  1347. 38
  1348.  
  1349. /orange/source/orangeom/graph_layout.cpp:
  1350. 98 {
  1351. 99 vector<int> neighbours;
  1352. 100: /* network->getNeighbours(i, neighbours); TODO: FIX! */
  1353. 101
  1354. 102 QueueVertex *vertex = new QueueVertex();
  1355. ...
  1356. 665 links[0].push_back(nodes_map[u]);
  1357. 666 links[1].push_back(nodes_map[v]);
  1358. 667: weights.push_back(1); // TODO: compute weight
  1359. 668 nLinks++;
  1360. 669 }
  1361.  
  1362. /orange/source/orangeom/network.cpp:
  1363. 394 nodes[i]->parent->childs.erase(it);
  1364. 395
  1365. 396: // TODO: erase meta-nodes with 1 or 0 childs
  1366. 397 }
  1367. 398 }
  1368.  
  1369. /orange/source/orangeqt/canvas3d.cpp:
  1370. 287 {
  1371. 288 //setToolTip(tooltip);
  1372. 289: //TODO
  1373. 290 }
  1374. 291
  1375.  
  1376. /orange/source/orangeqt/networkcurve.cpp:
  1377. 508 {
  1378. 509 m_arrows = arrows;
  1379. 510: // TODO: Update the QGraphicsItem element, add arrows
  1380. 511 }
  1381. 512
  1382. ...
  1383. 549 if (m_show_component_distances)
  1384. 550 {
  1385. 551: // TODO: move code from Python to C++
  1386. 552 }
  1387. 553 }
  1388.  
  1389. /orange/source/orangeqt/point.cpp:
  1390. 389 QPixmap image(QSize(size, size));
  1391. 390
  1392. 391: // TODO: Create fils with actual images, preferably SVG so they are scalable
  1393. 392 // image.load(filename);
  1394. 393 return image;
  1395.  
  1396. /orange/source/orangeqt/types.sip:
  1397. 461 PyTuple_SET_ITEM(t, 2, PyFloat_FromDouble((double)(sipCpp->third)));
  1398. 462
  1399. 463: // TODO: any DECREF needed?
  1400. 464
  1401. 465 return t;
  1402. ...
  1403. 469 if (sipIsErr == NULL)
  1404. 470 {
  1405. 471: // TODO
  1406. 472 return 1;
  1407. 473 }
  1408.  
  1409. 218 matches across 126 files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement