fix: conflict
This commit is contained in:
commit
2e6f716245
@ -14,7 +14,7 @@ def read_data(filename):
|
|||||||
y.append(int(numbers[-1]))
|
y.append(int(numbers[-1]))
|
||||||
return x, y
|
return x, y
|
||||||
|
|
||||||
def format(features):
|
def form(features):
|
||||||
'''
|
'''
|
||||||
change to LIBSVM format
|
change to LIBSVM format
|
||||||
'''
|
'''
|
||||||
@ -60,7 +60,7 @@ def transform(features):
|
|||||||
|
|
||||||
x, y = read_data(FILENAME)
|
x, y = read_data(FILENAME)
|
||||||
x = transform(x)
|
x = transform(x)
|
||||||
x = format(x)
|
x = form(x)
|
||||||
prob = problem(y, x)
|
prob = problem(y, x)
|
||||||
lambda_powers = [-6, -4, -2, 0, 2]
|
lambda_powers = [-6, -4, -2, 0, 2]
|
||||||
|
|
||||||
@ -78,6 +78,7 @@ for lambda_power in lambda_powers:
|
|||||||
|
|
||||||
ans, min_err = None, 1
|
ans, min_err = None, 1
|
||||||
for i in results:
|
for i in results:
|
||||||
|
print(i['error'])
|
||||||
if i['error'] <= min_err:
|
if i['error'] <= min_err:
|
||||||
min_err = i['error']
|
min_err = i['error']
|
||||||
ans = i
|
ans = i
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user