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
096c4827
Commit
096c4827
authored
Sep 05, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert the change
parent
e1b3b50e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
.travis.yml
.travis.yml
+1
-0
linearmodel.py
alphamind/model/linearmodel.py
+4
-1
No files found.
.travis.yml
View file @
096c4827
...
@@ -42,6 +42,7 @@ install:
...
@@ -42,6 +42,7 @@ install:
-
pip install cvxpy
-
pip install cvxpy
-
pip install simpleutils
-
pip install simpleutils
-
pip install coveralls
-
pip install coveralls
-
pip install finance-python
script
:
script
:
-
export NUMBA_DISABLE_JIT=1
-
export NUMBA_DISABLE_JIT=1
-
export LD_LIBRARY_PATH="$PWD/libs/lib/linux:$LD_LIBRARY_PATH"
-
export LD_LIBRARY_PATH="$PWD/libs/lib/linux:$LD_LIBRARY_PATH"
...
...
alphamind/model/linearmodel.py
View file @
096c4827
...
@@ -10,6 +10,7 @@ import numpy as np
...
@@ -10,6 +10,7 @@ import numpy as np
from
distutils.version
import
LooseVersion
from
distutils.version
import
LooseVersion
from
sklearn
import
__version__
as
sklearn_version
from
sklearn
import
__version__
as
sklearn_version
from
sklearn.linear_model
import
LinearRegression
as
LinearRegressionImpl
from
sklearn.linear_model
import
LinearRegression
as
LinearRegressionImpl
from
PyFin.api
import
pyFinAssert
from
alphamind.model.modelbase
import
ModelBase
from
alphamind.model.modelbase
import
ModelBase
from
alphamind.utilities
import
alpha_logger
from
alphamind.utilities
import
alpha_logger
...
@@ -21,7 +22,9 @@ class ConstLinearModel(ModelBase):
...
@@ -21,7 +22,9 @@ class ConstLinearModel(ModelBase):
weights
:
np
.
ndarray
=
None
):
weights
:
np
.
ndarray
=
None
):
super
()
.
__init__
(
features
)
super
()
.
__init__
(
features
)
if
features
is
not
None
and
weights
is
not
None
:
if
features
is
not
None
and
weights
is
not
None
:
assert
len
(
features
)
==
len
(
weights
),
"length of features is not equal to length of weights"
pyFinAssert
(
len
(
features
)
==
len
(
weights
),
ValueError
,
"length of features is not equal to length of weights"
)
self
.
weights
=
np
.
array
(
weights
)
.
flatten
()
self
.
weights
=
np
.
array
(
weights
)
.
flatten
()
def
fit
(
self
,
x
:
np
.
ndarray
,
y
:
np
.
ndarray
):
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