mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-05 02:48:37 +01:00
n_state
This commit is contained in:
parent
7a44c8bf64
commit
04caf1930c
@ -4,7 +4,7 @@ type t
|
|||||||
|
|
||||||
let make
|
let make
|
||||||
?guess
|
?guess
|
||||||
?(n_states=8)
|
?(n_states=1)
|
||||||
?(n_iter=10)
|
?(n_iter=10)
|
||||||
?(threshold=1.e-6)
|
?(threshold=1.e-6)
|
||||||
diagonal
|
diagonal
|
||||||
@ -37,7 +37,7 @@ let make
|
|||||||
)
|
)
|
||||||
|> Util.normalize
|
|> Util.normalize
|
||||||
in
|
in
|
||||||
List.init m (fun i -> random_vector i)
|
List.init m (fun i -> random_vector (i+1))
|
||||||
in
|
in
|
||||||
|
|
||||||
let pick_new u =
|
let pick_new u =
|
||||||
@ -73,7 +73,7 @@ let make
|
|||||||
matrix_prod (
|
matrix_prod (
|
||||||
u_new_ortho
|
u_new_ortho
|
||||||
|> Mat.of_col_vecs_list
|
|> Mat.of_col_vecs_list
|
||||||
|> Matrix.sparse_of_mat )
|
|> Matrix.dense_of_mat )
|
||||||
|> Matrix.to_mat
|
|> Matrix.to_mat
|
||||||
|> Mat.to_col_vecs_list
|
|> Mat.to_col_vecs_list
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user