more support for learning

This commit is contained in:
Vítor Santos Costa
2008-11-26 09:56:55 +00:00
parent 58d4442883
commit 902dafa906
6 changed files with 14 additions and 13 deletions

View File

@@ -68,15 +68,15 @@ soften_sample(T0,T) :-
soften_sample(no,T,T).
soften_sample(m_estimate(M), T0, T) :-
matrix_agg_cols(T0,+,Cols),matrix:matrix_to_list(Cols), writeln(Cols),
matrix_agg_cols(T0,+,Cols),
matrix_op_to_all(Cols, *, M, R),
matrix_op_to_cols(T0,+,R,T).
matrix_op_to_cols(T0,R,+,T).
soften_sample(auto_m, T0,T) :-
matrix_agg_cols(T0,+,Cols),matrix:matrix_to_list(Cols), writeln(Cols),
matrix_agg_cols(T0,+,Cols),
matrix_sum(Cols,TotM),
M is sqrt(TotM),
matrix_op_to_all(Cols, *, M, R),
matrix_op_to_cols(T0,+,R,T).
matrix_op_to_cols(T0,R,+,T).
soften_sample(laplace,T0,T) :-
matrix_op_to_all(T0, +, 1, T).