Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
bbee3fc7
Commit
bbee3fc7
authored
Sep 05, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dependency on pyfin in tests
parent
b17ff59f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
linearmodel.py
alphamind/model/linearmodel.py
+1
-2
No files found.
alphamind/model/linearmodel.py
View file @
bbee3fc7
...
...
@@ -10,7 +10,6 @@ import numpy as np
from
distutils.version
import
LooseVersion
from
sklearn
import
__version__
as
sklearn_version
from
sklearn.linear_model
import
LinearRegression
as
LinearRegressionImpl
from
PyFin.api
import
pyFinAssert
from
alphamind.model.modelbase
import
ModelBase
from
alphamind.utilities
import
alpha_logger
...
...
@@ -22,7 +21,7 @@ class ConstLinearModel(ModelBase):
weights
:
np
.
ndarray
=
None
):
super
()
.
__init__
(
features
)
if
features
is
not
None
and
weights
is
not
None
:
pyFinAssert
(
len
(
features
)
==
len
(
weights
),
ValueError
,
"length of features is not equal to length of weights"
)
assert
len
(
features
)
==
len
(
weights
),
"length of features is not equal to length of weights"
self
.
weights
=
np
.
array
(
weights
)
.
flatten
()
def
fit
(
self
,
x
:
np
.
ndarray
,
y
:
np
.
ndarray
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment