Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
7bd84605
Commit
7bd84605
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
applied bug fix as mentioned in
#74
parent
57b2a4b1
Branches
Branches containing commit
No related tags found
2 merge requests
!67
apply bug fix to dev too
,
!66
Resolve "BUG: OLS add constant has to be forced"
Pipeline
#31535
passed
5 years ago
Stage: test
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/model_modules/linear_model.py
+1
-1
1 addition, 1 deletion
src/model_modules/linear_model.py
test/test_model_modules/test_linear_model.py
+8
-0
8 additions, 0 deletions
test/test_model_modules/test_linear_model.py
with
9 additions
and
1 deletion
src/model_modules/linear_model.py
+
1
−
1
View file @
7bd84605
...
@@ -31,7 +31,7 @@ class OrdinaryLeastSquaredModel:
...
@@ -31,7 +31,7 @@ class OrdinaryLeastSquaredModel:
self
.
y
=
data_y
self
.
y
=
data_y
def
predict
(
self
,
data
):
def
predict
(
self
,
data
):
data
=
sm
.
add_constant
(
self
.
reshape_xarray_to_numpy
(
data
))
data
=
sm
.
add_constant
(
self
.
reshape_xarray_to_numpy
(
data
)
,
has_constant
=
"
add
"
)
return
np
.
atleast_2d
(
self
.
model
.
predict
(
data
))
return
np
.
atleast_2d
(
self
.
model
.
predict
(
data
))
@staticmethod
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
test/test_model_modules/test_linear_model.py
0 → 100644
+
8
−
0
View file @
7bd84605
from
src.model_modules.linear_model
import
OrdinaryLeastSquaredModel
class
TestOrdinaryLeastSquareModel
:
def
test_constant_input_variable
(
self
):
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment