wiki:Orange25

Version 4 (modified by mitar, 3 years ago) (diff)

Documentation

Described on the rst documentation page.

Notes

 EtherPad page

Conventions

Classification methods (learners) are objects named with method followed by Learner:

Orange.classification.rules.CN2Learner()

Things to check/fix later

Aliases in C code to make

  • Floating-point numbers and functions are formatted in a weird fashion when enumerating default function parameter values.
  • Base classes are determined inappropriately for our needs: for example, orange.RuleLearner is written (and linked) instead of its alias Orange.classification.rules.RuleLearner (or at least Orange.core.RuleLearner).

Refactoring tool orange2to25.py

In orange directory there is a orange2to25.py script

  • Use it like this (this will output a diff of proposed changes):
    python orange2to25.py myscripy.py
    
  • To overwrite the myscript.py (a backup will be saved in myscript.py.bak) use:
    python orange2to25.py -w myscripy.py
    
  • To use an aggressive name changer add the '-a' flag (will fix names in the global and local scope, e.g. it will replace ExampleTable (without the orange. prefix) with Orange.data.Table and import the appropriate package (Orange.data))
    python orange2to25.py -w -a myscripy.py
    
  • To write the changed script to a new file use '-o' argument
    python orange2to25.py -w -o mynewandimprovedscript.py myscript.py
    
  • For help type:
    python orange2to25.py --help
    

Adding mapped names and modules

Currently there are only a few MAPPING definitions in the both fixers available. Add all changed names and moved modules to the appropriate file:

  • Add other mapped names to orange/fixer/fix_changed_names.py in the MAPPING global variable (For instance .. "orange.ExampleTable":"Orange.data.Table", ...)
  • Add mapped modules to orange/fixer/fix_orange_imports.py in the MAPPING global variable (For instance ... "orngSVM": Orange.classification.svm", ...)

Still needs porting

  • orngIO
  • orngOutliers
  • orngCA
  • orngCI
  • orngEnviron -> Orange.misc.site (Podobno kot python site module, morda .conf)
  • orngAddOns -> Orange.misc.site
  • orngDimReduction, orngPCA -> Orange.projection.pca
  • orngInteract, orngInteractions
  • orngMCPrediction, orngMultiClass, orngMultivariatePrediciton
  • orngMySQL, orngSQL -> (Orange.data.io ?)
  • orngPade
  • orngProjectionPursuit
  • orngLinVis, orngLinVis,
  • orngScaleData, orngScaleLinProjData, orngScalePolyvizData, orngScaleScatterPlotData
  • orngVisFuncts, orngVizRank
  • orngMosaic
  • matutil, fileutil, (widgetParser??)
  • updateOrange
  • orngContingency, orngInteract, orngCRS, orng2Array, orngDimRed

Things that would be nice

  • replace all function constructors remaining with class itself (implementing the new method)