Skip to content

Commit

Permalink
Merge tag '3.31.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
markotoplak committed Dec 17, 2021
2 parents 7adf05a + 3e8830b commit 9de6c69
Show file tree
Hide file tree
Showing 191 changed files with 5,457 additions and 2,259 deletions.
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ Change Log
[next] - TBA
------------

[3.31.0] - 2021-12-17
--------------------
##### Enhancements
* oweditdomain: Indicate variables in error state ([#5732](../../pull/5732))
* Scatterplot: Use opacity for contrast ([#5684](../../pull/5684))
* Feature Constructor: Evaluate categorical variables to strings ([#5637](../../pull/5637))
* New widget: Group By ([#5541](../../pull/5541))
* Table lock: tests run with tables that are read-only by default ([#5381](../../pull/5381))
* config: sort example workflows ([#5600](../../pull/5600))

##### Bugfixes
* Paint Data: Fix ClearTool's issued commands ([#5718](../../pull/5718))
* pandas_compat: fix table_from_frames for "normal" dataframe ([#5652](../../pull/5652))
* pandas_compat: do not parse column of numbers (object dtype) to datetime ([#5681](../../pull/5681))
* HeatMap: Color gradient center value edit ([#5647](../../pull/5647))
* Distance Matrix: Fix crash on numeric meta vars as labels ([#5664](../../pull/5664))
* Fix running OWS with widgets with WebView in Orange.canvas.run ([#5657](../../pull/5657))
* main: Fix `--clear-widget-settings` parameter declaration ([#5619](../../pull/5619))


[3.30.2] - 2021-10-27
--------------------
##### Bugfixes
Expand All @@ -14,11 +34,13 @@ Change Log
* Variable: fix timezone when parsing time variable ([#5617](../../pull/5617))
* Require widget-base 4.15.1 and canvas-core 0.1.23 to fix some bugs/crashes


[3.30.1] - 2021-09-24
--------------------
##### Bugfixes
* OWTable: fix select whole rows regression ([#5605](../../pull/5605))


[3.30.0] - 2021-09-22
--------------------
##### Enhancements
Expand Down Expand Up @@ -46,16 +68,19 @@ Change Log
##### Bugfixes
* Create Class: fix incorrect value assignment


[3.29.2] - 2021-06-08
--------------------
##### Bugfixes
* Bump orange-canvas-core minimum version requirement ([#5472](../../pull/5472))
* owpca: fix component selection when dragging selection line ([#5469](../../pull/5469))
* Save File when workflow basedir is an empty string ([#5459](../../pull/5459))


[3.29.1] - 2021-05-31
--------------------


[3.29.0] - 2021-05-28
--------------------
##### Enhancements
Expand All @@ -80,6 +105,7 @@ Change Log
* Nomogram: Retain original compute_value ([#5382](../../pull/5382))
* Radviz VizRank: Implement on_selection_changed ([#5338](../../pull/5338))


[3.28.0] - 2021-03-05
--------------------
##### Enhancements
Expand Down Expand Up @@ -1604,7 +1630,8 @@ Change Log
* Initial version based on Python 1.5.2 and Qt 2.3


[next]: https://github.com/biolab/orange3/compare/3.30.2...HEAD
[next]: https://github.com/biolab/orange3/compare/3.31.0...HEAD
[3.31.0]: https://github.com/biolab/orange3/compare/3.30.2...3.31.0
[3.30.2]: https://github.com/biolab/orange3/compare/3.30.1...3.30.2
[3.30.1]: https://github.com/biolab/orange3/compare/3.30.0...3.30.1
[3.30.0]: https://github.com/biolab/orange3/compare/3.29.3...3.30.0
Expand Down
30 changes: 19 additions & 11 deletions Orange/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,13 @@ def __init__(self, cat_model, cat_features, domain):
self.cat_model = cat_model
self.cat_features = cat_features

def __call__(self, data, ret=Model.Value):
if isinstance(data, Table):
with data.force_unlocked(data.X):
return super().__call__(data, ret)
else:
return super().__call__(data, ret)

def predict(self, X):
if self.cat_features:
X = X.astype(str)
Expand Down Expand Up @@ -824,17 +831,18 @@ def __call__(self, data, progress_callback=None):
return m

def fit_storage(self, data: Table):
domain, X, Y, W = data.domain, data.X, data.Y.reshape(-1), None
if self.supports_weights and data.has_weights():
W = data.W.reshape(-1)
# pylint: disable=not-callable
clf = self.__wraps__(**self.params)
cat_features = [i for i, attr in enumerate(domain.attributes)
if attr.is_discrete]
if cat_features:
X = X.astype(str)
cat_model = clf.fit(X, Y, cat_features=cat_features, sample_weight=W)
return self.__returns__(cat_model, cat_features, domain)
with data.force_unlocked(data.X):
domain, X, Y, W = data.domain, data.X, data.Y.reshape(-1), None
if self.supports_weights and data.has_weights():
W = data.W.reshape(-1)
# pylint: disable=not-callable
clf = self.__wraps__(**self.params)
cat_features = [i for i, attr in enumerate(domain.attributes)
if attr.is_discrete]
if cat_features:
X = X.astype(str)
cat_model = clf.fit(X, Y, cat_features=cat_features, sample_weight=W)
return self.__returns__(cat_model, cat_features, domain)

def __getattr__(self, item):
try:
Expand Down

0 comments on commit 9de6c69

Please sign in to comment.