Ignore:
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • .hgtags

    r10334 r10392  
    223f3a4091cb9fc891e33546efa4722952c914b2b7 2.5a1 
    33bbad2239ee0c9e4f0d18f41ea8b0a4948f25592f 2.5a3 
     4fee33477516a95932e7c1e2859127f9c009d861e 2.5a4 
  • Orange/__init__.py

    r10348 r10391  
    11from __future__ import absolute_import 
    2 __version__ = "2.5a3" 
     2__version__ = "2.5a4" 
    33 
    44from . import orange 
  • Orange/clustering/hierarchical.py

    r10237 r10393  
    104104-------------- 
    105105 
    106 .. autofunction:: dendrogram_draw 
     106.. autofunction:: dendrogram_draw(file, cluster, attr_cluster=None, labels=None, data=None, width=None, height=None, tree_height=None, heatmap_width=None, text_width=None,  spacing=2, cluster_colors={}, color_palette=ColorPalette([(255, 0, 0), (0, 255, 0)]), maxv=None, minv=None, gamma=None, format=None) 
    107107 
    108108.. rubric:: Example 
     
    985985    """ A class for drawing dendrograms. 
    986986     
    987     ``dendrogram_draw`` function is a more convenient interface 
    988     to the functionality provided by this class and. 
     987    :obj:`dendrogram_draw` function is a more convenient interface 
     988    to the functionality provided by this class. 
    989989         
    990990    Example:: 
     
    11341134         
    11351135         
    1136 def dendrogram_draw(file, cluster, attr_cluster = None, labels=None, data=None, 
     1136def dendrogram_draw(file, cluster, attr_cluster=None, labels=None, data=None, 
    11371137                    width=None, height=None, tree_height=None, 
    11381138                    heatmap_width=None, text_width=None,  spacing=2, 
    1139                     cluster_colors={}, color_palette=ColorPalette([(255, 0, 0), (0, 255, 0)]), 
    1140                     maxv=None, minv=None, gamma=None, 
    1141                     format=None): 
     1139                    cluster_colors={}, 
     1140                    color_palette=ColorPalette([(255, 0, 0), (0, 255, 0)]), 
     1141                    maxv=None, minv=None, gamma=None, format=None): 
    11421142    """ Plot the dendrogram to ``file``. 
    11431143     
  • Orange/clustering/kmeans.py

    r9994 r10393  
    99 
    1010 
    11 .. autoclass:: Orange.clustering.kmeans.Clustering 
    12    :members: 
     11.. autoclass:: Orange.clustering.kmeans.Clustering(data=None, centroids=3, maxiters=None, minscorechange=None, stopchanges=0, nstart=1, initialization=init_random, distance=Orange.distance.Euclidean, scoring=score_distance_to_centroids, inner_callback=None, outer_callback=None) 
     12    :members: 
     13    :exclude-members: __init__ 
     14 
     15    .. automethod:: __init__(data=None, centroids=3, maxiters=None, minscorechange=None, stopchanges=0, nstart=1, initialization=init_random, distance=Orange.distance.Euclidean, scoring=score_distance_to_centroids, inner_callback=None, outer_callback=None) 
     16 
    1317 
    1418Examples 
     
    394398                 stopchanges=0, nstart=1, initialization=init_random, 
    395399                 distance=Orange.distance.Euclidean, 
    396                  scoring=score_distance_to_centroids, inner_callback = None, 
    397                  outer_callback = None): 
    398         """ 
    399         :param data: Data instances to be clustered. If not None, clustering will be executed immediately after initialization unless initialize_only=True. 
    400         :type data: :class:`orange.ExampleTable` or None 
     400                 scoring=score_distance_to_centroids, inner_callback=None, 
     401                 outer_callback=None): 
     402        """ 
     403        :param data: Data instances to be clustered. If not None, clustering will be executed immediately after initialization unless ``initialize_only=True``. 
     404        :type data: :class:`~Orange.data.Table` or None 
    401405        :param centroids: either specify a number of clusters or provide a list of examples that will serve as clustering centroids. 
    402         :type centroids: integer or a list of :class:`orange.Example` 
     406        :type centroids: :obj:`int` or :obj:`list` of :class:`~Orange.data.Instance` 
    403407        :param nstart: If greater than one, nstart runs of the clustering algorithm will be executed, returning the clustering with the best (lowest) score. 
    404         :type nstart: integer 
     408        :type nstart: int 
    405409        :param distance: an example distance constructor, which measures the distance between two instances. 
    406         :type distance: :class:`Orange.distance.DistanceConstructor` 
    407         :param initialization: a function to select centroids given data instances, k and a example distance function. This module implements different approaches (:func:`init_random`, :func:`init_diversity`, :class:`init_hclustering`).  
     410        :type distance: :class:`~Orange.distance.DistanceConstructor` 
     411        :param initialization: a function to select centroids given data instances, k and a example distance function. This module implements different approaches (:obj:`init_random`, :obj:`init_diversity`, :obj:`init_hclustering`).  
    408412        :param scoring: a function that takes clustering object and returns the clustering score. It could be used, for instance, in procedure that repeats the clustering nstart times, returning the clustering with the lowest score. 
    409413        :param inner_callback: invoked after every clustering iteration. 
  • Orange/evaluation/reliability.py

    r9936 r10393  
    584584     
    585585    :param bagv: Instance of Bagging Variance estimator. 
    586     :type bagv: :class:`Orange.evaluation.reliability.BaggingVariance` 
     586    :type bagv: :class:`BaggingVariance` 
    587587     
    588588    :param cnk: Instance of CNK estimator. 
    589     :type cnk: :class:`Orange.evaluation.reliability.CNeighbours` 
     589    :type cnk: :class:`CNeighbours` 
    590590     
    591591    :rtype: :class:`Orange.evaluation.reliability.BaggingVarianceCNeighboursClassifier` 
     
    659659    :param box_learner: Learner we want to wrap into a reliability estimation 
    660660        classifier. 
    661     :type box_learner: learner 
     661    :type box_learner: :obj:`~Orange.classification.Learner` 
    662662     
    663663    :param estimators: List of different reliability estimation methods we 
    664664                       want to use on the chosen learner. 
    665     :type estimators: list of reliability estimators 
     665    :type estimators: :obj:`list` of reliability estimators 
    666666     
    667667    :param name: Name of this reliability learner 
     
    671671    """ 
    672672    def __init__(self, box_learner, name="Reliability estimation", 
    673                  estimators = [SensitivityAnalysis(), 
    674                                LocalCrossValidation(), 
    675                                BaggingVarianceCNeighbours(), 
    676                                Mahalanobis(), 
    677                                MahalanobisToCenter() 
    678                                ], 
     673                 estimators=[SensitivityAnalysis(), 
     674                             LocalCrossValidation(), 
     675                             BaggingVarianceCNeighbours(), 
     676                             Mahalanobis(), 
     677                             MahalanobisToCenter()], 
    679678                 **kwds): 
    680679        self.__dict__.update(kwds) 
     
    691690        :type instances: Orange.data.Table 
    692691        :param weight: Id of meta attribute with weights of instances 
    693         :type weight: integer 
     692        :type weight: int 
    694693        :rtype: :class:`Orange.evaluation.reliability.Classifier` 
    695694        """ 
  • Orange/preprocess/__init__.py

    r10238 r10393  
    11""" 
    2 .. autoclass:: Preprocessor_discretizeEntropy 
     2.. autoclass:: Preprocessor_discretizeEntropy(method=Orange.feature.discretization.Entropy()) 
    33 
    44.. autoclass:: Preprocessor_removeContinuous 
     
    1010.. autoclass:: Preprocessor_impute 
    1111 
    12 .. autoclass:: Preprocessor_featureSelection 
     12.. autoclass:: Preprocessor_featureSelection(measure=Orange.feature.scoring.Relief(), filter=None, limit=10) 
    1313 
    1414.. autofunction:: bestP 
     
    156156 
    157157import orange 
     158import Orange 
    158159from Orange.misc import _orange__new__, _orange__reduce__ 
    159160 
     
    168169    __reduce__ = _orange__reduce__ 
    169170     
    170     def __init__(self, method=orange.EntropyDiscretization()): 
     171    def __init__(self, method=Orange.feature.discretization.Entropy()): 
    171172        self.method = method 
    172         assert(isinstance(method, orange.EntropyDiscretization)) 
     173        assert(isinstance(method, Orange.feature.discretization.Entropy)) 
    173174         
    174175    def __call__(self, data, wightId=0): 
     
    274275    bestP = staticmethod(bestP) 
    275276     
    276     def __init__(self, measure=orange.MeasureAttribute_relief(), filter=None, limit=10): 
     277    def __init__(self, measure=Orange.feature.scoring.Relief(), filter=None, limit=10): 
    277278        self.measure = measure 
    278279        self.filter = filter if filter is not None else self.bestN 
  • Orange/projection/mds.py

    r10194 r10393  
    1717.. autoclass:: Orange.projection.mds.MDS 
    1818   :members: 
    19    :exclude-members: Torgerson, get_distance, get_stress 
     19   :exclude-members: Torgerson, get_distance, get_stress, calc_stress, run 
     20 
     21   .. automethod:: calc_stress(stress_func=SgnRelStress) 
     22   .. automethod:: run(iter, stress_func=SgnRelStress, eps=1e-3, progress_callback=None) 
    2023 
    2124Stress functions 
  • docs/reference/rst/Orange.data.discretization.rst

    r10050 r10393  
    6969.. .. autoclass:: Orange.feature.discretization.DiscretizedLearner_Class 
    7070 
    71 .. autoclass:: DiscretizeTable 
     71.. autoclass:: DiscretizeTable(features=None, discretize_class=False, method=EqualFreq(n=3), clean=True) 
    7272 
    7373.. A chapter on `feature subset selection <../ofb/o_fss.htm>`_ in Orange 
  • docs/reference/rst/Orange.evaluation.reliability.rst

    r9683 r10393  
    6666------------------------------------ 
    6767 
    68 .. autoclass:: BaggingVarianceCNeighbours 
     68.. autoclass:: BaggingVarianceCNeighbours(bagv=BaggingVariance(), cnk=CNeighbours()) 
    6969 
    7070Mahalanobis distance 
     
    8181=============================== 
    8282 
    83 .. autoclass:: Learner 
     83.. autoclass:: Learner(box_learner, name="Reliability estimation", estimators=[SensitivityAnalysis(), LocalCrossValidation(), BaggingVarianceCNeighbours(), Mahalanobis(), MahalanobisToCenter()], **kwds) 
    8484    :members: 
    8585 
  • docs/reference/rst/Orange.feature.scoring.rst

    r10170 r10393  
    422422   :members: 
    423423 
    424 .. autofunction:: Orange.feature.scoring.score_all 
     424.. autofunction:: Orange.feature.scoring.score_all(data, score=Relief(k=20, m=50)) 
    425425 
    426426.. rubric:: Bibliography 
  • docs/reference/rst/Orange.regression.mean.rst

    r10388 r10393  
    88 
    99Accuracy of a regressor is often compared with the accuracy achieved 
    10 by always predicting the averag value. The "learning algorithm" 
     10by always predicting the average value. The "learning algorithm" 
    1111computes the average and represents it with a regressor of type 
    1212:obj:`Orange.classification.ConstantClassifier`. 
  • setup.py

    r10383 r10391  
    553553 
    554554 
    555 default_version = "2.5a3" 
     555default_version = "2.5a4" 
    556556############################################ 
    557557# Try to get the hg revision. Do 
  • source/orange/libsvm_interface.cpp

    r9389 r10389  
    2323 
    2424#include "libsvm_interface.ppp" 
    25  
    26 #include "slist.hpp" 
    2725 
    2826// Defined in svm.cpp. If new svm or kernel types are added this should be updated. 
  • source/orange/libsvm_interface.hpp

    r9187 r10389  
    4747#include "examples.hpp" 
    4848#include "distance.hpp" 
    49 #include "slist.hpp" 
    5049 
    5150#include "libsvm/svm.h" 
  • source/orange/slist.hpp

    r6531 r10390  
    103103  { 
    104104    ensure(sizeof(unsigned short)); 
    105     (unsigned short &)*bufptr = c; 
     105    memcpy((void *) bufptr, (void *) &c, sizeof(unsigned short)); 
    106106    bufptr += sizeof(unsigned short); 
    107107  } 
     
    110110  { 
    111111    ensure(sizeof(int)); 
    112     (int &)*bufptr = c; 
     112    memcpy((void *) bufptr, (void *) &c, sizeof(int)); 
    113113    bufptr += sizeof(int); 
    114114  } 
     
    117117  { 
    118118    ensure(sizeof(long)); 
    119     (long &)*bufptr = c; 
     119    memcpy((void *) bufptr, (void *) &c, sizeof(long)); 
    120120    bufptr += sizeof(long); 
    121121  } 
     
    124124  { 
    125125    ensure(sizeof(float)); 
    126     (float &)*bufptr = c; 
     126    memcpy((void *) bufptr, (void *) &c, sizeof(float)); 
    127127    bufptr += sizeof(float); 
    128128  } 
     
    131131  { 
    132132    ensure(sizeof(double)); 
    133     (double &)*bufptr = c; 
     133    memcpy((void *) bufptr, (void *) &c, sizeof(float)); 
    134134    bufptr += sizeof(double); 
    135135  } 
     
    140140    ensure((size + 1) * sizeof(int)); 
    141141 
    142     int *&buff = (int *&)bufptr; 
    143     *buff++ = size; 
    144     for(vector<int>::const_iterator vi = v.begin(); size--; *buff++ = *vi++); 
     142    memcpy((void *) bufptr, (void *)&size, sizeof(int)); 
     143    bufptr += sizeof(int); 
     144    if (size > 0) 
     145    { 
     146        // This is legal as &v[0] is guaranteed to point to a 
     147        // contiguous memory block 
     148        memcpy((void *) bufptr, (void *) &v[0], size * sizeof(int)); 
     149        bufptr += sizeof(int) * size; 
     150    } 
    145151  } 
    146152 
     
    150156    ensure(sizeof(int) + size * sizeof(float)); 
    151157 
    152     (int &)*bufptr = size; 
    153     bufptr += sizeof(int); 
    154  
    155     float *&buff = (float *&)bufptr; 
    156     for(vector<float>::const_iterator vi = v.begin(); size--; *buff++ = *vi++); 
    157   } 
    158  
     158    memcpy((void *) bufptr, (void *)&size, sizeof(int)); 
     159    bufptr += sizeof(int); 
     160    if (size > 0) 
     161    { 
     162        // This is legal as &v[0] is guaranteed to point to a 
     163        // contiguous memory block 
     164        memcpy((void *) bufptr, (void *) &v[0], size * sizeof(float)); 
     165        bufptr += sizeof(float) * size; 
     166    } 
     167  } 
    159168 
    160169  inline void writeBuf(const void *abuf, size_t size) 
     
    165174  } 
    166175 
    167  
    168176  inline char readChar() 
    169177  {  
Note: See TracChangeset for help on using the changeset viewer.