Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 92349594 authored by hhakim's avatar hhakim
Browse files

Minor change in backend argument documentation of palm4msa and hierarchical.

parent 881d32d0
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%> - 'squaremat' to use pre-defined parameters typically used to factorize a Hadamard square matrix of order a power of two (see matfaust.demo.hadamard). %> - 'squaremat' to use pre-defined parameters typically used to factorize a Hadamard square matrix of order a power of two (see matfaust.demo.hadamard).
%> - {'rectmat', j, k, s} to use pre-defined parameters used for instance in factorization of the MEG matrix which is a rectangular matrix of size m*n such that m < n (see matfaust.demo.bsl); j is the number of factors, k the sparsity of the main factor's columns, and s the sparsity of rows for all other factors except the residuum (that is the first factor here because the factorization is made toward the left -- is_side_fact_left == true, cf. matfaust.factparams.ParamsHierarchical). %> - {'rectmat', j, k, s} to use pre-defined parameters used for instance in factorization of the MEG matrix which is a rectangular matrix of size m*n such that m < n (see matfaust.demo.bsl); j is the number of factors, k the sparsity of the main factor's columns, and s the sparsity of rows for all other factors except the residuum (that is the first factor here because the factorization is made toward the left -- is_side_fact_left == true, cf. matfaust.factparams.ParamsHierarchical).
%> </br>The residuum has a sparsity of P*rho^(num_facts-1). <br/> By default, rho == .8 and P = 1.4. It's possible to set custom values with for example p == { 'rectmat', j, k, s, 'rho', .4, 'P', .7}. <br/>The sparsity is here the number of non-zero elements. %> </br>The residuum has a sparsity of P*rho^(num_facts-1). <br/> By default, rho == .8 and P = 1.4. It's possible to set custom values with for example p == { 'rectmat', j, k, s, 'rho', .4, 'P', .7}. <br/>The sparsity is here the number of non-zero elements.
%> @param 'backend',int (optional) the backend (the C++ implementation) chosen. Must be 2016 (the default) or 2020 (which should be quicker for certain configurations - e.g. factorizing a Hadamard matrix). %> @param 'backend',int (optional) the backend to use (the C++ implementation). Must be 2016 (the default) or 2020 (which should be faster for most of the factorizations).
%> @param 'gpu', bool (optional) set to true to execute the algorithm using the GPU implementation. This option is only available when backend==2020. %> @param 'gpu', bool (optional) set to true to execute the algorithm using the GPU implementation. This option is only available when backend==2020.
%> %>
%> @note - The fully defined parameters (ParamsHierarchical instance) used/generated by the function are available in the return result (so one can consult what precisely mean the simplified parameterizations and possibly adjust the attributes to factorize again). %> @note - The fully defined parameters (ParamsHierarchical instance) used/generated by the function are available in the return result (so one can consult what precisely mean the simplified parameterizations and possibly adjust the attributes to factorize again).
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%> %>
%> @param M the dense matrix to factorize. %> @param M the dense matrix to factorize.
%> @param p the matfaust.factparams.ParamsPalm4MSA instance to define the algorithm parameters. %> @param p the matfaust.factparams.ParamsPalm4MSA instance to define the algorithm parameters.
%> @param 'backend',int (optional) the backend (the C++ implementation) chosen. Must be 2016 (the default) or 2020 (which should be quicker for certain configurations - e.g. factorizing a Hadamard matrix). %> @param 'backend',int (optional) the backend to use (the C++ implementation). Must be 2016 (the default) or 2020 (which should be faster for most of the factorizations).
%> @param 'gpu', bool (optional) set to true to execute the algorithm using the GPU implementation. This option is only available when backend==2020. %> @param 'gpu', bool (optional) set to true to execute the algorithm using the GPU implementation. This option is only available when backend==2020.
%> %>
%> @retval F the Faust object result of the factorization. %> @retval F the Faust object result of the factorization.
......
...@@ -477,6 +477,8 @@ def palm4msa(M, p, ret_lambda=False, backend=2016, on_gpu=False): ...@@ -477,6 +477,8 @@ def palm4msa(M, p, ret_lambda=False, backend=2016, on_gpu=False):
M: the numpy array to factorize. M: the numpy array to factorize.
p: the The pyfaust.factparams.ParamsPalm4MSA instance to define the algorithm parameters. p: the The pyfaust.factparams.ParamsPalm4MSA instance to define the algorithm parameters.
ret_lambda: set to True to ask the function to return the scale factor (False by default). ret_lambda: set to True to ask the function to return the scale factor (False by default).
backend: the C++ implementation to use (default to 2016, 2020 backend
should be faster for most of the factorizations).
on_gpu: if True the GPU implementation is executed (this option applies only to 2020 backend). on_gpu: if True the GPU implementation is executed (this option applies only to 2020 backend).
Returns: Returns:
...@@ -677,8 +679,7 @@ def hierarchical(M, p, ret_lambda=False, ret_params=False, backend=2016, ...@@ -677,8 +679,7 @@ def hierarchical(M, p, ret_lambda=False, ret_params=False, backend=2016,
pyfaust.factparams.ParamsHierarchical and pyfaust.factparams.ParamsHierarchicalRectMat). pyfaust.factparams.ParamsHierarchical and pyfaust.factparams.ParamsHierarchicalRectMat).
<br/>The residuum has a sparsity of P*rho^(num_facts-1). <br/> By default, rho == .8 and P = 1.4. It's possible to set custom values with for example p == ( ['rectmat', j, k, s], {'rho':.4, 'P':.7 }). <br/>The sparsity is here the number of non-zero elements. <br/>The residuum has a sparsity of P*rho^(num_facts-1). <br/> By default, rho == .8 and P = 1.4. It's possible to set custom values with for example p == ( ['rectmat', j, k, s], {'rho':.4, 'P':.7 }). <br/>The sparsity is here the number of non-zero elements.
backend: the C++ implementation to use (default to 2016, 2020 backend backend: the C++ implementation to use (default to 2016, 2020 backend
should be faster for certain configurations - e.g. factorizing a should be faster for most of the factorizations).
Hadamard matrix).
on_gpu: if True the GPU implementation is executed (this option applies only to 2020 backend). on_gpu: if True the GPU implementation is executed (this option applies only to 2020 backend).
ret_lambda: set to True to ask the function to return the scale factor (False by default). ret_lambda: set to True to ask the function to return the scale factor (False by default).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment