Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Prolog mlpack Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
Prolog mlpack Library
Commits
d40647c5
Commit
d40647c5
authored
2 years ago
by
Jakhes
Browse files
Options
Downloads
Patches
Plain Diff
Adding linear_regression tests
parent
bf6366e8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/methods/linear_regression/linear_regression_test.pl
+249
-50
249 additions, 50 deletions
src/methods/linear_regression/linear_regression_test.pl
with
249 additions
and
50 deletions
src/methods/linear_regression/linear_regression_test.pl
+
249
−
50
View file @
d40647c5
...
@@ -7,82 +7,281 @@
...
@@ -7,82 +7,281 @@
:-
use_module
(
'../../helper_files/helper.pl'
).
:-
use_module
(
'../../helper_files/helper.pl'
).
reset_Model
:-
reset_Model
:-
initModelEmpty
(
1
).
linear_regression_initModel
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
0.0
,
1
).
:-
begin_tests
(
lists
).
reset_Model_WithWeights
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
%% train tests
test
(
correct_train
)
:-
%%
%% TESTING predicate linear_regression_initModel/5
%%
:-
begin_tests
(
linear_regression_initModel
).
%% Failure Tests
test
(
linear_regression_InitModel_Too_Few_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModel
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
],
0.0
,
1
).
test
(
linear_regression_InitModel_Too_Many_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModel
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
,
0
,
1
],
0.0
,
1
).
test
(
linear_regression_InitModel_Too_Many_Labelclasses
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModel
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
2
,
3
],
0.0
,
1
).
%% Successful Tests
test
(
linear_regression_InitModel_Normal_Use
)
:-
linear_regression_initModel
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
0.0
,
1
).
test
(
linear_regression_InitModel_CSV_Input
)
:-
open
(
'src/data_csv/iris2.csv'
,
read
,
File
),
take_csv_row
(
File
,
skipFirstRow
,
10
,
Data
),
linear_regression_initModel
(
Data
,
4
,
[
0
,
1
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
0
],
0.5
,
0
).
:-
end_tests
(
linear_regression_initModel
).
%%
%% TESTING predicate linear_regression_initModelWithWeights/6
%%
:-
begin_tests
(
linear_regression_initModelWithWeights
).
%% Failure Tests
test
(
linear_regression_InitModelWithWeights_Too_Few_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
test
(
linear_regression_InitModelWithWeights_Too_Many_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
test
(
linear_regression_InitModelWithWeights_Too_Many_Labelclasses
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
2
,
3
],
[
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
test
(
linear_regression_InitModelWithWeights_Too_Few_Weights
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.5
],
0.0
,
1
).
test
(
linear_regression_InitModelWithWeights_Too_Many_Weights
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
%% Successful Tests
test
(
linear_regression_InitModelWithWeights_Normal_Use
)
:-
linear_regression_initModelWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
0.0
,
1
).
test
(
linear_regression_InitModelWithWeights_CSV_Input
)
:-
open
(
'src/data_csv/iris2.csv'
,
read
,
File
),
take_csv_row
(
File
,
skipFirstRow
,
10
,
Data
),
linear_regression_initModelWithWeights
(
Data
,
4
,
[
0
,
1
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
0
],
[
0.2
,
0.1
,
0.2
,
0.5
,
0.2
,
0.4
,
1.2
,
0.7
,
2.1
,
0.1
],
0.5
,
0
).
:-
end_tests
(
linear_regression_initModelWithWeights
).
%%
%% TESTING predicate linear_regression_computeError/4
%%
:-
begin_tests
(
linear_regression_computeError
).
%% Failure Tests
test
(
linear_regression_ComputeError_Too_Few_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
linear_regression_computeError
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
],
_
).
test
(
linear_regression_ComputeError_Too_Many_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
linear_regression_computeError
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
,
0
,
1
],
_
).
test
(
linear_regression_ComputeError_Too_Many_Labelclasses
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
linear_regression_computeError
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
2
,
3
],
_
).
%% Successful Tests
test
(
linear_regression_ComputeError_Normal_Use
)
:-
reset_Model
,
linear_regression_computeError
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
Error
),
print
(
'\nError: '
),
print
(
Error
).
:-
end_tests
(
linear_regression_computeError
).
%%
%% TESTING predicate linear_regression_parameters/1
%%
:-
begin_tests
(
linear_regression_parameters
).
%% Failure Tests
%% Successful Tests
test
(
linear_regression_Parameters_Normal_Use
)
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_parameters
(
Parameters
),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
print
(
'\nParameters: '
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
print
(
Parameters
).
test
(
false_train
,
fail
)
:-
:-
end_tests
(
linear_regression_parameters
).
%%
%% TESTING predicate linear_regression_modifyParameters/1
%%
:-
begin_tests
(
linear_regression_modifyParameters
).
%% Failure Tests
test
(
linear_regression_ModifyParameters_Too_Few_Parameters
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([],
3
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_modifyParameters
([
3
,
4
]),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
linear_regression_parameters
(
Parameters
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
print
(
'\nParameters: '
),
test
(
false_train2
,
fail
)
:-
print
(
Parameters
).
test
(
linear_regression_ModifyParameters_Too_Many_Parameters
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([],
0
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_modifyParameters
([
1
,
2
,
1
,
2
,
3
,
4
]),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
linear_regression_parameters
(
Parameters
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
print
(
'\nParameters: '
),
test
(
false_train3
,
fail
)
:-
print
(
Parameters
).
test
(
linear_regression_ModifyParameters_Bad_Parameter_Value
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([
1
,
2
],
0
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_modifyParameters
([
1
,
2
,
-
3
,
4
]),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
linear_regression_parameters
(
Parameters
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
print
(
'\nParameters: '
),
test
(
false_train3
,
fail
)
:-
print
(
Parameters
).
%% Successful Tests
test
(
linear_regression_ModifyParameters_Normal_Use
)
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([
1
,
2
,
44
,
3
],
3
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_modifyParameters
([
1
,
2
,
3
,
4
]),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
linear_regression_parameters
(
Parameters
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
print
(
'\nParameters: '
),
test
(
false_train4
)
:-
print
(
Parameters
).
:-
end_tests
(
linear_regression_modifyParameters
).
%%
%% TESTING predicate linear_regression_predict/10
%%
:-
begin_tests
(
linear_regression_predict
).
%% Failure Tests
test
(
linear_regression_Predict_Diffrent_Dims_Than_Trained
)
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([
1
,
2
,
44
,
3
],
2
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_predict
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
4
,
_
).
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
).
%% Successful Tests
test
(
train
)
:-
test
(
linear_regression_Predict_Normal_Use
)
:-
reset_Model
,
reset_Model
,
convert_list_to_float_array
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
array
(
Xsize
,
Xrownum
,
X
)),
linear_regression_predict
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
Responses
),
convert_list_to_float_array
([
0.2
,
0.2
,
0.2
,
0.2
],
array
(
Ysize
,
Y
)),
print
(
'\nResponses: '
),
train
(
X
,
Xsize
,
Xrownum
,
Y
,
Ysize
,
1
,
0
),
print
(
Responses
).
predict
(
X
,
Xsize
,
Xrownum
,
Predic
,
PredicSize
),
convert_float_array_to_list
(
Predic
,
PredicSize
,
[
0.20000000298023224
,
0.20000000298023224
,
0.20000000298023224
,
0.20000000298023224
]).
test
(
linear_regression_Predict_Normal_Use
)
:-
reset_Model_WithWeights
,
linear_regression_predict
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
Responses
),
print
(
'\nResponses: '
),
print
(
Responses
).
:-
end_tests
(
linear_regression_predict
).
%%
%% TESTING predicate linear_regression_train/5
%%
:-
begin_tests
(
linear_regression_train
).
%% Failure Tests
test
(
linear_regression_Train_Too_Few_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
],
1
,
_
).
test
(
linear_regression_Train_Too_Many_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
,
0
,
1
],
1
,
_
).
test
(
linear_regression_Train_Too_Many_Labelclasses
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
2
,
3
],
1
,
_
).
%% Successful Tests
test
(
linear_regression_Train_Normal_Use
)
:-
linear_regression_train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
1
,
Error
),
print
(
'\nError: '
),
print
(
Error
).
test
(
linear_regression_Train_CSV_Input
)
:-
open
(
'src/data_csv/iris2.csv'
,
read
,
File
),
take_csv_row
(
File
,
skipFirstRow
,
10
,
Data
),
linear_regression_train
(
Data
,
4
,
[
0
,
1
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
0
],
0
,
Error
),
print
(
'\nError: '
),
print
(
Error
).
:-
end_tests
(
linear_regression_train
).
:-
end_tests
(
lists
).
%%
%%
%% TESTING predicate
predicate/10
%% TESTING predicate
linear_regression_trainWithWeights/6
%%
%%
:-
begin_tests
(
predicate
).
:-
begin_tests
(
linear_regression_trainWithWeights
).
%% Failure Tests
%% Failure Tests
test
(
testDescription
,
[
error
(
domain_error
(
'expectation'
,
culprit
),
_
)])
:-
test
(
linear_regression_TrainWithWeights_Too_Few_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model_No_Train
(
perceptron
),
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
1
,
_
).
train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
0
,
0
,
0
],
2
,
culprit
,
50
,
0.0001
,
_
).
test
(
linear_regression_TrainWithWeights_Too_Many_Labels
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
1
,
_
).
test
(
linear_regression_TrainWithWeights_Too_Many_Labelclasses
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
2
,
3
],
[
0.2
,
0.1
,
0.2
,
0.5
],
1
,
_
).
test
(
linear_regression_TrainWithWeights_Too_Few_Weights
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.5
],
1
,
_
).
test
(
testDescription2
,
[
error
(
_
,
system_error
(
'The values of the Label have to start at 0 and be >= 0 and < the given numClass!'
))])
:-
test
(
linear_regression_TrainWithWeights_Too_Many_Weights
,
[
error
(
_
,
system_error
(
'Error'
))])
:-
reset_Model_No_Train
(
perceptron
),
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.1
,
0.2
,
0.5
],
1
,
_
).
train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
2
],
2
,
perceptron
,
50
,
0.0001
,
_
).
%% Successful Tests
%% Successful Tests
test
(
testDescription3
,
[
true
(
Error
=:=
1
)])
:-
test
(
linear_regression_TrainWithWeights_Normal_Use
)
:-
reset_Model_No_Train
(
perceptron
),
linear_regression_trainWithWeights
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
1
,
0
,
1
],
[
0.2
,
0.1
,
0.2
,
0.5
],
1
,
Error
),
train
([
5.1
,
3.5
,
1.4
,
4.9
,
3.0
,
1.4
,
4.7
,
3.2
,
1.3
,
4.6
,
3.1
,
1.5
],
3
,
[
0
,
0
,
0
,
0
],
2
,
perceptron
,
50
,
0.0001
,
Error
).
print
(
'\nError: '
),
print
(
Error
).
test
(
testDescription4
,
[
true
(
Error
=:=
0.9797958971132711
)])
:-
test
(
linear_regression_TrainWithWeights_CSV_Input
)
:-
reset_Model_No_Train
(
perceptron
),
open
(
'src/data_csv/iris2.csv'
,
read
,
File
),
open
(
'src/data_csv/iris2.csv'
,
read
,
File
),
take_csv_row
(
File
,
skipFirstRow
,
10
,
Data
),
take_csv_row
(
File
,
skipFirstRow
,
10
,
Data
),
train
(
Data
,
4
,
[
0
,
1
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
0
],
2
,
perceptron
,
50
,
0.0001
,
Error
).
linear_regression_trainWithWeights
(
Data
,
4
,
[
0
,
1
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
0
],
[
0.2
,
0.1
,
0.2
,
0.5
,
0.2
,
0.4
,
1.2
,
0.7
,
2.1
,
0.1
],
0
,
Error
),
print
(
'\nError: '
),
print
(
Error
).
:-
end_tests
(
predicate
).
:-
end_tests
(
linear_regression_trainWithWeights
).
run_linear_regression_tests
:-
run_linear_regression_tests
:-
run_tests
.
run_tests
.
...
...
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