Changeset 10220:b6e694facf69 in orange


Ignore:
Timestamp:
02/15/12 01:04:28 (2 years ago)
Author:
Janez Demšar <janez.demsar@…>
Branch:
default
Message:

Reenabled renaming of Orange classes (ticket #1086), added a script for checking
that all classes are named so that unpickle can reconstruct them.

Location:
source
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • source/orange/cls_orange.cpp

    r7674 r10220  
    3535 
    3636BASED_ON(Orange, ROOT) 
    37 DATASTRUCTURE(Orange, TPyOrange, orange_dict) 
     37DATASTRUCTURE(Orange - Orange.core.OrangeBase, TPyOrange, orange_dict) 
    3838RECOGNIZED_ATTRIBUTES(Orange, "name shortDescription description") 
    3939 
  • source/orange/lib_components.cpp

    r9107 r10220  
    13591359#include "distance_dtw.hpp" 
    13601360 
    1361 ABSTRACT(ExamplesDistance_Normalized - Orange.distances.ExamplesDistance_Normalized, ExamplesDistance) 
    1362 C_NAMED(ExamplesDistance_Hamming - Orange.distances.Hamming, ExamplesDistance, "()") 
    1363 C_NAMED(ExamplesDistance_Maximal - Orange.distances.Maximal, ExamplesDistance_Normalized, "()") 
    1364 C_NAMED(ExamplesDistance_Manhattan - Orange.distances.Manhattan, ExamplesDistance_Normalized, "()") 
    1365 C_NAMED(ExamplesDistance_Euclidean - Orange.distances.Euclidean, ExamplesDistance_Normalized, "()") 
    1366 C_NAMED(ExamplesDistance_Lp - Orange.distances.Lp, ExamplesDistance_Normalized, "()") 
    1367 C_NAMED(ExamplesDistance_Relief - Orange.distances.Relief, ExamplesDistance, "()") 
    1368 C_NAMED(ExamplesDistance_DTW - Orange.distances.DTW, ExamplesDistance_Normalized, "()") 
    1369  
    1370 C_CALL(ExamplesDistanceConstructor_Hamming - Orange.distances.HammingConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Hamming") 
    1371 C_CALL(ExamplesDistanceConstructor_Maximal - Orange.distances.MaximalConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Maximal") 
    1372 C_CALL(ExamplesDistanceConstructor_Manhattan - Orange.distances.ManhattanConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Manhattan") 
    1373 C_CALL(ExamplesDistanceConstructor_Euclidean - Orange.distances.EuclideanConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Euclidean") 
    1374 C_CALL(ExamplesDistanceConstructor_Lp - Orange.distances.LpConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Lp") 
    1375 C_CALL(ExamplesDistanceConstructor_Relief - Orange.distances.ReliefConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Relief") 
    1376 C_CALL(ExamplesDistanceConstructor_DTW - Orange.distances.DTWConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_DTW") 
    1377  
    1378  
    1379 PyObject *ExamplesDistanceConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distances.ExamplesDistanceConstructor, "<abstract>") 
     1361ABSTRACT(ExamplesDistance_Normalized - Orange.distance.DistanceNormalized, ExamplesDistance) 
     1362C_NAMED(ExamplesDistance_Hamming - Orange.distance.HammingDistance, ExamplesDistance, "()") 
     1363C_NAMED(ExamplesDistance_Maximal - Orange.distance.MaximalDistance, ExamplesDistance_Normalized, "()") 
     1364C_NAMED(ExamplesDistance_Manhattan - Orange.distance.ManhattanDistance, ExamplesDistance_Normalized, "()") 
     1365C_NAMED(ExamplesDistance_Euclidean - Orange.distance.EuclideanDistance, ExamplesDistance_Normalized, "()") 
     1366C_NAMED(ExamplesDistance_Lp, Distance_Normalized, "()") 
     1367C_NAMED(ExamplesDistance_Relief - Orange.distance.ReliefDistance, ExamplesDistance, "()") 
     1368C_NAMED(ExamplesDistance_DTW - Orange.distance.DTWDistance, ExamplesDistance_Normalized, "()") 
     1369 
     1370C_CALL(ExamplesDistanceConstructor_Hamming - Orange.distance.Hamming, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Hamming") 
     1371C_CALL(ExamplesDistanceConstructor_Maximal - Orange.distance.Maximal, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Maximal") 
     1372C_CALL(ExamplesDistanceConstructor_Manhattan - Orange.distance.Manhattan, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Manhattan") 
     1373C_CALL(ExamplesDistanceConstructor_Euclidean - Orange.distance.Euclidean, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Euclidean") 
     1374C_CALL(ExamplesDistanceConstructor_Lp, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Lp") 
     1375C_CALL(ExamplesDistanceConstructor_Relief - Orange.distance.Relief, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Relief") 
     1376C_CALL(ExamplesDistanceConstructor_DTW - Orange.distance.DTW, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_DTW") 
     1377 
     1378 
     1379PyObject *ExamplesDistanceConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distance.DistanceConstructor, "<abstract>") 
    13801380{ 
    13811381  if (type == (PyTypeObject *)&PyOrExamplesDistanceConstructor_Type) 
     
    13921392 
    13931393 
    1394 PyObject *ExamplesDistance_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distances.ExamplesDistance, "<abstract>") 
     1394PyObject *ExamplesDistance_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distance.Distance, "<abstract>") 
    13951395{ if (type == (PyTypeObject *)&PyOrExamplesDistance_Type) 
    13961396return setCallbackFunction(WrapNewOrange(mlnew TExamplesDistance_Python(), type), args); 
     
    15281528#include "nearest.hpp" 
    15291529 
    1530 ABSTRACT(FindNearest - Orange.core.FindNearest, Orange) 
     1530ABSTRACT(FindNearest, Orange) 
    15311531C_NAMED(FindNearest_BruteForce - Orange.classification.knn.FindNearest, FindNearest, "([distance=, distanceID=, includeSame=])") 
    15321532 
    1533 ABSTRACT(FindNearestConstructor - Orange.core.FindNearestConstructor, Orange) 
     1533ABSTRACT(FindNearestConstructor, Orange) 
    15341534C_CALL(FindNearestConstructor_BruteForce - Orange.classification.knn.FindNearestConstructor, FindNearestConstructor, "([examples[, weightID[, distanceID]], distanceConstructor=, includeSame=]) -/-> FindNearest") 
    15351535 
     
    20012001 
    20022002ABSTRACT(Imputer - Orange.feature.imputation.Imputer, Orange) 
    2003 C_NAMED(Imputer_asValue - Orange.feature.imputation.Imputer_asValue, Imputer, "() -> Imputer_asValue") 
    2004 C_NAMED(Imputer_model - Orange.feature.imputation.Imputer_model, Imputer, "() -> Imputer_model") 
    2005 C_NAMED(Imputer_random - Orange.feature.imputation.Imputer_random, Imputer, "() -> Imputer_random") 
    2006  
    2007 PyObject *Imputer_defaults_new(PyTypeObject *tpe, PyObject *args) BASED_ON(Imputer - Orange.feature.imputation.Imputer_defaults, "(domain | example) -> Imputer_defaults") 
     2003C_NAMED(Imputer_asValue - Orange.feature.imputation.AsValue, Imputer, "() -> Imputer_asValue") 
     2004C_NAMED(Imputer_model - Orange.feature.imputation.Model, Imputer, "() -> Imputer_model") 
     2005C_NAMED(Imputer_random - Orange.feature.imputation.Random, Imputer, "() -> Imputer_random") 
     2006 
     2007PyObject *Imputer_defaults_new(PyTypeObject *tpe, PyObject *args) BASED_ON(Imputer - Orange.feature.imputation.Defaults, "(domain | example) -> Imputer_defaults") 
    20082008{ 
    20092009    PyTRY 
     
    20302030 
    20312031 
    2032 ABSTRACT(ImputerConstructor - Orange.feature.imputation.ImputerConstructor, Orange) 
    2033 C_CALL(ImputerConstructor_average - Orange.feature.imputation.ImputerConstructor_average, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2034 C_CALL(ImputerConstructor_minimal - Orange.feature.imputation.ImputerConstructor_minimal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2035 C_CALL(ImputerConstructor_maximal - Orange.feature.imputation.ImputerConstructor_maximal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2036 C_CALL(ImputerConstructor_model - Orange.feature.imputation.ImputerConstructor_model, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2037 C_CALL(ImputerConstructor_asValue - Orange.feature.imputation.ImputerConstructor_asValue, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2038 C_CALL(ImputerConstructor_random - Orange.feature.imputation.ImputerConstructor_random, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2032ABSTRACT(ImputerConstructor - Orange.feature.imputation.Constructor, Orange) 
     2033C_CALL(ImputerConstructor_average - Orange.feature.imputation.AverageConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2034C_CALL(ImputerConstructor_minimal - Orange.feature.imputation.MinimalConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2035C_CALL(ImputerConstructor_maximal - Orange.feature.imputation.MaximalConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2036C_CALL(ImputerConstructor_model - Orange.feature.imputation.ModelConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2037C_CALL(ImputerConstructor_asValue - Orange.feature.imputation.AsValueConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2038C_CALL(ImputerConstructor_random - Orange.feature.imputation.RandomConstructor, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    20392039 
    20402040PyObject *Imputer_call(PyObject *self, PyObject *args, PyObject *keywords) 
     
    20812081#include "trindex.hpp" 
    20822082 
    2083 ABSTRACT(MakeRandomIndices - Orange.data.sample.MakeRandomIndices, Orange) 
    2084 C_CALL3(MakeRandomIndices2 - Orange.data.sample.MakeRandomIndices2, MakeRandomIndices2, MakeRandomIndices, "[n | gen [, p0]], [p0=, stratified=, randseed=] -/-> [int]") 
    2085 C_CALL3(MakeRandomIndicesMultiple - Orange.data.sample.MakeRandomIndicesMultiple, MakeRandomIndicesMultiple, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
    2086 C_CALL3(MakeRandomIndicesN - Orange.data.sample.MakeRandomIndicesN, MakeRandomIndicesN, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
    2087 C_CALL3(MakeRandomIndicesCV - Orange.data.sample.MakeRandomIndicesCV, MakeRandomIndicesCV, MakeRandomIndices, "[n | gen [, folds]], [folds=, stratified=, randseed=] -/-> [int]") 
     2083ABSTRACT(MakeRandomIndices - Orange.data.sample.SubsetIndices, Orange) 
     2084C_CALL3(MakeRandomIndices2 - Orange.data.sample.SubsetIndices2, MakeRandomIndices2, MakeRandomIndices, "[n | gen [, p0]], [p0=, stratified=, randseed=] -/-> [int]") 
     2085C_CALL3(MakeRandomIndicesMultiple - Orange.data.sample.SubsetIndicesMultiple, MakeRandomIndicesMultiple, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
     2086C_CALL3(MakeRandomIndicesN - Orange.data.sample.SubsetIndicesN, MakeRandomIndicesN, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
     2087C_CALL3(MakeRandomIndicesCV - Orange.data.sample.SubsetIndicesCV, MakeRandomIndicesCV, MakeRandomIndices, "[n | gen [, folds]], [folds=, stratified=, randseed=] -/-> [int]") 
    20882088 
    20892089 
     
    25832583#include "relief.hpp" 
    25842584 
    2585 BASED_ON(MeasureAttribute - Orange.feature.scoring.Measure, Orange) 
    2586 ABSTRACT(MeasureAttributeFromProbabilities - Orange.core.MeasureAttributeFromProbabilities, MeasureAttribute) 
     2585BASED_ON(MeasureAttribute - Orange.feature.scoring.Score, Orange) 
     2586ABSTRACT(MeasureAttributeFromProbabilities - Orange.feature.scoring.ScoreFromProbabilities, MeasureAttribute) 
    25872587 
    25882588C_CALL(MeasureAttribute_info - Orange.feature.scoring.InfoGain, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    25892589C_CALL(MeasureAttribute_gini - Orange.feature.scoring.Gini, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    25902590C_CALL(MeasureAttribute_gainRatio - Orange.feature.scoring.GainRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    2591 C_CALL(MeasureAttribute_gainRatioA - Orange.core.MeasureAttribute_gainRatioA, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    25922591C_CALL(MeasureAttribute_cost - Orange.feature.scoring.Cost, MeasureAttributeFromProbabilities, "(cost=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    25932592C_CALL(MeasureAttribute_relevance - Orange.feature.scoring.Relevance, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2594 C_CALL(MeasureAttribute_logOddsRatio - Orange.core.MeasureAttribute_logOddsRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2595 C_CALL(MeasureAttribute_chiSquare - Orange.feature.scoring.MeasureAttribute_chiSquare, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2593 
     2594C_CALL(MeasureAttribute_gainRatioA, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
     2595C_CALL(MeasureAttribute_logOddsRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2596C_CALL(MeasureAttribute_chiSquare, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    25962597 
    25972598C_CALL(MeasureAttribute_MSE - Orange.feature.scoring.MSE, MeasureAttribute, "(estimate=, m=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     
    26062607PYCLASSCONSTANT_FLOAT(MeasureAttribute, Rejected, ATTRIBUTE_REJECTED) 
    26072608 
    2608 PyObject *MeasureAttribute_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.feature.scoring.Measure, "<abstract>") 
     2609PyObject *MeasureAttribute_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.feature.scoring.Score, "<abstract>") 
    26092610{ if (type == (PyTypeObject *)&PyOrMeasureAttribute_Type) 
    26102611return setCallbackFunction(WrapNewOrange(mlnew TMeasureAttribute_Python(), type), args); 
     
    28752876#include "exampleclustering.hpp" 
    28762877 
    2877 ABSTRACT(GeneralExampleClustering - Orange.core.GeneralExampleClustering, Orange) 
     2878ABSTRACT(GeneralExampleClustering - Orange.feature.construction.functionDecomposition.GeneralExampleClustering, Orange) 
    28782879C_NAMED(ExampleCluster - Orange.clustering.ExampleCluster, Orange, "([left=, right=, distance=, centroid=])") 
    2879 C_NAMED(ExampleClusters - Orange.core.ExampleClusters, GeneralExampleClustering, "([root=, quality=]") 
     2880C_NAMED(ExampleClusters - Orange.feature.construction.functionDecomposition.ExampleClusters, GeneralExampleClustering, "([root=, quality=]") 
    28802881 
    28812882 
     
    35443545C_CALL3(HierarchicalClustering - Orange.clustering.hierarchical.HierarchicalClustering, HierarchicalClustering, Orange, "(linkage=)") 
    35453546 
    3546 C_CALL3(HierarchicalClusterOrdering - Orange.clustering.hierarchical.HierarchicalClusterOrdering, HierarchicalClusterOrdering, Orange, "(progressCallback=)") 
     3547C_CALL3(HierarchicalClusterOrdering, HierarchicalClusterOrdering, Orange, "(progressCallback=)") 
    35473548 
    35483549PyObject *HierarchicalClustering_call(PyObject *self, PyObject *args, PyObject *keywords) PYDOC("(distance matrix) -> HierarchicalCluster") 
     
    37413742#include "distancemap.hpp" 
    37423743 
    3743 C_NAMED(DistanceMapConstructor - Orange.distances.DistanceMapConstructor, Orange, "(distanceMatrix=, order=)") 
     3744C_NAMED(DistanceMapConstructor - Orange.distance.DistanceMapConstructor, Orange, "(distanceMatrix=, order=)") 
    37443745 
    37453746 
     
    37783779 
    37793780 
    3780 BASED_ON(DistanceMap - Orange.distances.DistanceMap, Orange) 
     3781BASED_ON(DistanceMap - Orange.distance.DistanceMap, Orange) 
    37813782 
    37823783PyObject *DistanceMap__reduce__(PyObject *self) 
     
    43444345 
    43454346 
    4346 ABSTRACT(Graph - Orange.network.Graph, Orange) 
     4347ABSTRACT(Graph, Orange) 
    43474348RECOGNIZED_ATTRIBUTES(Graph, "objects forceMapping force_mapping returnIndices return_indices objectsOnEdges object_on_edges") 
    43484349 
  • source/orange/lib_io.cpp

    r7715 r10220  
    4242 
    4343#include "filegen.hpp" 
    44 BASED_ON(FileExampleGenerator - Orange.data.io.FileExampleGenerator, ExampleGenerator) 
     44BASED_ON(FileExampleGenerator, ExampleGenerator) 
    4545 
    4646#include "tabdelim.hpp" 
     
    6565NO_PICKLE(BasketFeeder) 
    6666 
    67 BASED_ON(BasketFeeder - Orange.data.io.BasketFeeder, Orange) 
    68  
    69  
    70  
    71  
    72 PyObject *TabDelimExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.TabDelimExampleGenerator, "(examples[, use=domain|varlist])") 
     67BASED_ON(BasketFeeder, Orange) 
     68 
     69 
     70 
     71 
     72PyObject *TabDelimExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain|varlist])") 
    7373{ PyTRY 
    7474    char *fileName; 
     
    8989 
    9090 
    91 PyObject *BasketExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.BasketExampleGenerator, "(examples[, use=domain])") 
     91PyObject *BasketExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain])") 
    9292{ PyTRY 
    9393    char *fileName; 
     
    117117 
    118118 
    119 PyObject *C45ExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.C45ExampleGenerator, "(examples[, use=domain|varlist])") 
     119PyObject *C45ExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain|varlist])") 
    120120{ PyTRY 
    121121    char *stem; 
  • source/orange/lib_kernel.cpp

    r9935 r10220  
    124124PVarList PVarList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::P_FromArguments(arg); } 
    125125PyObject *VarList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_FromArguments(type, arg); } 
    126 PyObject *VarList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.data.variable.Variables, "(<list of Variable>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_new(type, arg, kwds); } 
     126PyObject *VarList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of Variable>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_new(type, arg, kwds); } 
    127127PyObject *VarList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_getitem(self, index); } 
    128128int       VarList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_setitem(self, index, item); } 
     
    238238} 
    239239 
    240 ABSTRACT(Variable - Orange.data.variable.Variable, Orange) 
    241 C_NAMED(EnumVariable - Orange.data.variable.Discrete, Variable, "([name=, values=, autoValues=, distributed=, getValueFrom=])") 
    242 C_NAMED(FloatVariable - Orange.data.variable.Continuous, Variable, "([name=, startValue=, endValue=, stepValue=, distributed=, getValueFrom=])") 
     240ABSTRACT(Variable - Orange.feature.Descriptor, Orange) 
     241C_NAMED(EnumVariable - Orange.feature.Discrete, Variable, "([name=, values=, autoValues=, distributed=, getValueFrom=])") 
     242C_NAMED(FloatVariable - Orange.feature.Continuous, Variable, "([name=, startValue=, endValue=, stepValue=, distributed=, getValueFrom=])") 
    243243 
    244244PyObject *PyVariable_MakeStatus_FromLong(long ok); 
     
    337337 
    338338#include "stringvars.hpp" 
    339 C_NAMED(StringVariable - Orange.data.variable.String, Variable, "([name=])") 
     339C_NAMED(StringVariable - Orange.feature.String, Variable, "([name=])") 
    340340 
    341341#include "pythonvars.hpp" 
    342 C_NAMED(PythonVariable - Orange.data.variable.Python, Variable, "([name=])") 
     342C_NAMED(PythonVariable - Orange.feature.Python, Variable, "([name=])") 
    343343 
    344344PyObject *PythonValue_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(SomeValue, "([object])") 
     
    878878 
    879879 
    880 PyObject *StringValue_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(SomeValue, "(string)") 
     880PyObject *StringValue_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(SomeValue - Orange.data.StringValue, "(string)") 
    881881{ char *s; 
    882882  if (!PyArg_ParseTuple(args, "s:StringValue", &s)) 
  • source/orange/lib_learner.cpp

    r8981 r10220  
    7171 
    7272#include "assoc.hpp" 
    73 C_CALL(AssociationLearner - Orange.classification.rules.AssociationLearner, Learner, "([examples] [, weight=, conf=, supp=, voteWeight=]) -/-> Classifier") 
    74 C_NAMED(AssociationClassifier - Orange.classification.rules.AssociationClassifier, ClassifierFD, "([rules=, voteWeight=])") 
     73C_CALL(AssociationLearner, Learner, "([examples] [, weight=, conf=, supp=, voteWeight=]) -/-> Classifier") 
     74C_NAMED(AssociationClassifier, ClassifierFD, "([rules=, voteWeight=])") 
    7575C_CALL3(AssociationRulesInducer - Orange.associate.AssociationRulesInducer, AssociationRulesInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
    7676C_CALL3(AssociationRulesSparseInducer - Orange.associate.AssociationRulesSparseInducer, AssociationRulesSparseInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
    77 C_CALL3(ItemsetsSparseInducer - Orange.associate.ItemsSparseInducer, ItemsetsSparseInducer, Orange, "([examples[, weightID]], support=]) -/-> AssociationRules") 
     77C_CALL3(ItemsetsSparseInducer - Orange.associate.ItemsetsSparseInducer, ItemsetsSparseInducer, Orange, "([examples[, weightID]], support=]) -/-> AssociationRules") 
    7878 
    7979BASED_ON(ItemsetNodeProxy - Orange.associate.ItemsetNodeProxy, Orange) 
     
    539539#include "callback.hpp" 
    540540 
    541 C_CALL(TreeLearner - Orange.core.TreeLearner, Learner, "([examples] [, weight=, split=, stop=, nodeLearner=, lookDownOnUnknown=]) -/-> Classifier") 
     541C_CALL(TreeLearner - Orange.classification.tree._TreeLearner, Learner, "([examples] [, weight=, split=, stop=, nodeLearner=, lookDownOnUnknown=]) -/-> Classifier") 
    542542 
    543543C_NAMED(TreeNode - Orange.classification.tree.Node, Orange, "([lookDownOnUnknown=, branchSelector=, nodeClassifier=, branches=, contingency=])") 
    544 C_NAMED(TreeClassifier - Orange.classification.tree.TreeClassifier, ClassifierFD, "([domain=, tree=, descender=])") 
     544C_NAMED(TreeClassifier - Orange.classification.tree._TreeClassifier, ClassifierFD, "([domain=, tree=, descender=])") 
    545545 
    546546C_NAMED(TreeStopCriteria_common - Orange.classification.tree.StopCriteria_common, TreeStopCriteria, "([maxMajority=, minExamples=])") 
     
    550550C_CALL(TreeSplitConstructor_Combined - Orange.classification.tree.SplitConstructor_Combined, TreeSplitConstructor, "([examples, [weight, domainContingency, apriorClass, candidates] [discreteTreeSplitConstructor=, continuousTreeSplitConstructor=]) -/-> (Classifier, descriptions, sizes, quality)") 
    551551 
    552 ABSTRACT(TreeSplitConstructor_Measure - Orange.classification.tree.SplitConstructor_Measure, TreeSplitConstructor) 
    553 C_CALL(TreeSplitConstructor_Attribute - Orange.classification.tree.SplitConstructor_Attribute, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     552ABSTRACT(TreeSplitConstructor_Measure - Orange.classification.tree.SplitConstructor_Score, TreeSplitConstructor) 
     553C_CALL(TreeSplitConstructor_Attribute - Orange.classification.tree.SplitConstructor_Feature, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    554554C_CALL(TreeSplitConstructor_ExhaustiveBinary - Orange.classification.tree.SplitConstructor_ExhaustiveBinary, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    555555C_CALL(TreeSplitConstructor_OneAgainstOthers - Orange.classification.tree.SplitConstructor_OneAgainstOthers, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     
    568568C_CALL(TreeExampleSplitter_UnknownsAsSelector - Orange.classification.tree.Splitter_UnknownsAsSelector, TreeExampleSplitter, "([branchIndex, node, examples[, weight]]) -/-> (ExampleGenerator, [list of weight ID's])") 
    569569 
    570 C_CALL(TreeDescender_UnknownToBranch - Orange.classification.tree.Descender_Unknown, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     570C_CALL(TreeDescender_UnknownToBranch - Orange.classification.tree.Descender_UnknownToBranch, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    571571C_CALL(TreeDescender_UnknownToCommonBranch - Orange.classification.tree.Descender_UnknownToCommonBranch, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    572572C_CALL(TreeDescender_UnknownToCommonSelector - Orange.classification.tree.Descender_UnknownToCommonSelector, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     
    901901#include "c4.5.hpp" 
    902902 
    903 C_CALL(C45Learner - Orange.classification.tree.C45Learner, Learner, "([examples] [, weight=, gainRatio=, subset=, batch=, probThresh=, minObjs=, window=, increment=, cf=, trials=]) -/-> Classifier") 
    904 C_NAMED(C45Classifier - Orange.classification.tree.C45Classifier, Classifier, "()") 
     903C_CALL(C45Learner - Orange.classification.tree._C45Learner, Learner, "([examples] [, weight=, gainRatio=, subset=, batch=, probThresh=, minObjs=, window=, increment=, cf=, trials=]) -/-> Classifier") 
     904C_NAMED(C45Classifier - Orange.classification.tree._C45Classifier, Classifier, "()") 
    905905 
    906906PyObject *C45Learner_command_line(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(line) -> None") 
     
    11851185 
    11861186#include "logistic.hpp" 
    1187 C_CALL(LogRegLearner - Orange.classification.logreg.LogRegLearner, Learner, "([examples[, weight=]]) -/-> Classifier") 
     1187C_CALL(LogRegLearner, Learner, "([examples[, weight=]]) -/-> Classifier") 
    11881188C_NAMED(LogRegClassifier - Orange.classification.logreg.LogRegClassifier, ClassifierFD, "([probabilities=])") 
    11891189 
     
    12581258/************ Linear **********/ 
    12591259#include "liblinear_interface.hpp" 
    1260 C_CALL(LinearLearner - Orange.classification.svm.LinearLearner, Learner, "([examples] -/-> Classifier)") 
     1260C_CALL(LinearLearner, Learner, "([examples] -/-> Classifier)") 
    12611261C_NAMED(LinearClassifier - Orange.classification.svm.LinearClassifier, ClassifierFD, " ") 
    12621262 
     
    12981298 
    12991299#include "libsvm_interface.hpp" 
    1300 C_CALL(SVMLearner - Orange.core.SVMLearner, Learner, "([examples] -/-> Classifier)") 
    1301 C_CALL(SVMLearnerSparse - Orange.core.SVMLearnerSparse, SVMLearner, "([examples] -/-> Classifier)") 
     1300C_CALL(SVMLearner - Orange.classification.svm._SVMLearner, Learner, "([examples] -/-> Classifier)") 
     1301C_CALL(SVMLearnerSparse - Orange.classification.svm._SVMLearnerSparse, SVMLearner, "([examples] -/-> Classifier)") 
    13021302C_NAMED(SVMClassifier - Orange.classification.svm.SVMClassifier, ClassifierFD," ") 
    13031303C_NAMED(SVMClassifierSparse - Orange.classification.svm.SVMClassifierSparse, SVMClassifier," ") 
     
    13451345} 
    13461346 
    1347 PyObject *KernelFunc_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.kernels.KernelFunc, "<abstract>") 
     1347PyObject *KernelFunc_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.svm.kernels.KernelFunc, "<abstract>") 
    13481348{ if (type == (PyTypeObject *)&PyOrKernelFunc_Type) 
    13491349    return setCallbackFunction(WrapNewOrange(mlnew TKernelFunc_Python(), type), args); 
     
    15131513#include "earth.hpp" 
    15141514 
    1515 C_CALL(EarthLearner - Orange.core.EarthLearner, Learner, "([examples], [weight=] -/-> Classifier)") 
    1516 C_NAMED(EarthClassifier - Orange.core.EarthClassifier, ClassifierFD, " ") 
     1515C_CALL(EarthLearner, Learner, "([examples], [weight=] -/-> Classifier)") 
     1516C_NAMED(EarthClassifier, ClassifierFD, " ") 
    15171517 
    15181518PyObject *EarthClassifier_formatEarth(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "() -> None") 
     
    15561556 
    15571557#include "bayes.hpp" 
    1558 C_CALL(BayesLearner - Orange.core.BayesLearner, Learner, "([examples], [weight=, estimate=] -/-> Classifier") 
    1559 C_NAMED(BayesClassifier - Orange.core.BayesClassifier, ClassifierFD, "([probabilities=])") 
     1558C_CALL(BayesLearner - Orange.classification.bayes._BayesLearner, Learner, "([examples], [weight=, estimate=] -/-> Classifier") 
     1559C_NAMED(BayesClassifier - Orange.classification.bayes._BayesClassifier, ClassifierFD, "([probabilities=])") 
    15601560 
    15611561PyObject *BayesClassifier_p(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(class, example) -> float") 
  • source/orange/lib_preprocess.cpp

    r7715 r10220  
    5353 
    5454ABSTRACT(Discretizer - Orange.feature.discretization.Discretizer, TransformValue) 
    55 C_NAMED(EquiDistDiscretizer - Orange.feature.discretization.EquiDistDiscretizer, Discretizer, "([numberOfIntervals=, firstCut=, step=])") 
     55C_NAMED(EquiDistDiscretizer - Orange.feature.discretization.EqualWidthDiscretizer, Discretizer, "([numberOfIntervals=, firstCut=, step=])") 
    5656C_NAMED(IntervalDiscretizer - Orange.feature.discretization.IntervalDiscretizer, Discretizer, "([points=])") 
    5757C_NAMED(ThresholdDiscretizer - Orange.feature.discretization.ThresholdDiscretizer, Discretizer, "([threshold=])") 
     
    5959 
    6060ABSTRACT(Discretization - Orange.feature.discretization.Discretization, Orange) 
    61 C_CALL (EquiDistDiscretization - Orange.feature.discretization.EquiDistDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
    62 C_CALL (   EquiNDiscretization - Orange.feature.discretization.EquiNDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
    63 C_CALL ( EntropyDiscretization - Orange.feature.discretization.EntropyDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
    64 C_CALL ( BiModalDiscretization - Orange.feature.discretization.BiModalDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
     61C_CALL (EquiDistDiscretization - Orange.feature.discretization.EqualWidth, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
     62C_CALL (   EquiNDiscretization - Orange.feature.discretization.EqualFreq, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
     63C_CALL ( EntropyDiscretization - Orange.feature.discretization.Entropy, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
     64C_CALL ( BiModalDiscretization - Orange.feature.discretization.BiModal, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
    6565 
    6666 
     
    120120C_NAMED(NormalizeContinuous, TransformValue, "([average=, span=])") 
    121121 
    122 C_NAMED(DomainContinuizer - Orange.feature.DomainContinuizer, Orange, "(domain|examples, convertClass=, invertClass=, zeroBased=, normalizeContinuous=, baseValueSelection=) -/-> Domain") 
     122C_NAMED(DomainContinuizer - Orange.data.continuization.DomainContinuizer, Orange, "(domain|examples, convertClass=, invertClass=, zeroBased=, normalizeContinuous=, baseValueSelection=) -/-> Domain") 
    123123 
    124124int getTargetClass(PVariable classVar, PyObject *pyval) 
     
    13971397#include "dist_clustering.hpp" 
    13981398 
    1399 ABSTRACT(ExampleDistConstructor - Orange.distances.ExampleDistConstructor, Orange) 
    1400 C_CALL(ExampleDistBySorting - Orange.distances.ExampleDistBySorting, ExampleDistConstructor, "([examples, bound-attrs[, weightID]]) -/-> ExampleDistVector") 
    1401 BASED_ON(ExampleDistVector - Orange.distances.ExampleDistVector, Orange) 
     1399ABSTRACT(ExampleDistConstructor, Orange) 
     1400C_CALL(ExampleDistBySorting, ExampleDistConstructor, "([examples, bound-attrs[, weightID]]) -/-> ExampleDistVector") 
     1401BASED_ON(ExampleDistVector, Orange) 
    14021402ABSTRACT(ClustersFromDistributions, Orange) 
    14031403C_CALL(ClustersFromDistributionsByAssessor, ClustersFromDistributions, "([example-dist-vector] [minProfitProportion=, distributionAssessor=, stopCriterion=]) -/-> DistClustering") 
  • source/pyxtract/pyxtract.py

    r9677 r10220  
    775775 
    776776 
     777def writeDisplayNames(filename, classdefs): 
     778  outfile = open("px/%s.new" % filename, "wt") 
     779  newfiles.append(filename) 
     780  for classname, fields in classdefs.items(): 
     781    if hasattr(fields, "displayname"): 
     782        outfile.write('%s\t%s\n' % (classname, fields.displayname)) 
     783 
     784 
    777785def writeAppendices(classdefs): 
    778786  filenamedef=re.compile(r"(?P<stem>.*)\.\w*$") 
     
    10871095    os.mkdir("px") 
    10881096  writeAppendices(classdefs) 
     1097  writeDisplayNames("displaynames", classdefs) 
    10891098  writeExterns() 
    10901099  writeInitialization(functions, constants) 
  • source/pyxtract/pyxtractstructures.py

    r8042 r10220  
    7878      print ("Warning: %s appears in different files (%s, %s)" % (typename, cds[typename].infile, parsedFile)) 
    7979    #Disable the name mapping 
    80 #  if displayname: 
    81 #      cds[typename].displayname = displayname 
     80  if displayname: 
     81      cds[typename].displayname = displayname 
Note: See TracChangeset for help on using the changeset viewer.