miguelriemoliveira / OptimizationUtils

A set of utilities for using the python scipy optimizer functions
GNU General Public License v3.0
6 stars 0 forks source link

Printing and writing the sparse matrix after computation #48

Closed eupedrosa closed 5 years ago

eupedrosa commented 5 years ago

Is there are reason for this piece of code

print('Sparsity matrix:')
data_frame = pandas.DataFrame(self.sparse_matrix.toarray(), self.residuals, params)
print(data_frame)
data_frame.to_csv('sparse_matrix.csv')

found the computeSparseMatrix function, rather then for debugging?

miguelriemoliveira commented 5 years ago

Hi @eupedrosa,

Thanks for the input.

debugging only. It is a pretty print.

We have a flag verbose but it refers more to the prints which are printed in loops during the optimization.

You may comment of put under the verbose if you preffer.

eupedrosa commented 5 years ago

I will create a printSparseMatrix() function. I will omit the creation of the csv file. In my opinion it does not make sense to a have a print function creating a file.

miguelriemoliveira commented 5 years ago

Great. Thanks.

Great to have you on-board. This code is gonna look a lot better after a couple of months :)

eupedrosa commented 5 years ago

I will do my best to help :wink: