-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from janezd/polynomial-regression-output
Polynomial regression output
- Loading branch information
Showing
4 changed files
with
452 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.