sibirica / spider_discrete Goto Github PK
View Code? Open in Web Editor NEWGeneralized sparse regression for continuous and discrete data
License: GNU General Public License v3.0
Generalized sparse regression for continuous and discrete data
License: GNU General Public License v3.0
In library.py
class Equation
special method eq
, we have the following code:
for coeff, ot in zip(self.coeffs, other.coeffs):
if term != ot:
return False
In this scope term
is undefined.
As of commit e16af7af4181dee8b6d77be4094c0257a8402758 the the following code poses a problem:
for coord, domain_min, i in zip(pt_pos, domain.min_corner, range(self.n_dimensions)):
However, the variable i
is already in use by the for
loop in:
for i in self.domain_neighbors[domain, t]:
On continuous/library.py (Line 790 post pull merge) and discrete/library.py (Line 1021 post pull merge), the class TermSum is called with two arguments:
return TermSum(self.term_list + other.term_list, self.coeffs + other.coeffs)
However, this class initialization is defined with two arguments:
class TermSum(Equation): def __init__(self, term_list):
If the purpose is taking a list of unkeyed arguments a possible change is to re-write the class' init as:
def __init__(self, *term_list)
In library.Observable (in both continuous and discrete cases) attempting to compare an Observable with an object of another instance raises a ValueError exception.
As per Python Documentation "passing arguments of the wrong type [...] should result in a TypeError" rather than a ValueError Exception.
The classes ConstantTerm
and TermSum
are missing a call to init of their super class in both the continuous and discrete files.
In process_library_terms.py
class SRDataset
method make_library_matrices
(Lines 272-274 in discrete and 318-320 in continuous post pull merge), the code attempts the following iteration:
nt = len(term.obs_list)
space_orders = [[0] * len(dshape) for i in nt]
canon_obs_dims = [[None] * i.cgp.rank for i in nt]
From the definition, nt
is type Int
, which cannot be iterated. The second line can be solved by replacing nt
with range(nt)
. However, this solution does not work for the third line, as this would imply i
is an Int
, which does not have the cgp
attribute.
As of commit 337db77bc839d47a64535dd73d49a7016017c8d6 the construct_from_string()
function defined in the discrete/utils.py
file attempts to call itself with one missing positional argument obs_dict
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.