Skip to content

Commit

Permalink
Merge pull request #150 from janezd/polynomial-regression-output
Browse files Browse the repository at this point in the history
Polynomial regression output
  • Loading branch information
PrimozGodec committed Dec 2, 2022
2 parents a6cdd84 + 0fd91e7 commit 69d8120
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 162 deletions.
2 changes: 1 addition & 1 deletion doc/widgets/polynomial-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ To observe different results, change **Linear Regression** to any other regressi

![](images/polyregressiontree1.png)

![](images/polynomial-regression-tree-exp1.png)
![](images/polynomial-regression-tree-exp1.png)
17 changes: 17 additions & 0 deletions orangecontrib/educational/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from Orange.data import Table


# Remove this when we require Orange 3.34
if not hasattr(Table, "get_column"):
import scipy.sparse as sp
import numpy as np

def get_column(self, column):
col, _ = self.get_column_view(column)
if sp.issparse(col):
col = col.toarray().reshape(-1)
if self.domain[column].is_primitive():
col = col.astype(np.float64)
return col

Table.get_column = get_column

0 comments on commit 69d8120

Please sign in to comment.