DanielEven / Software-Project-Final-Project

Spectral clustring algorithm implementation.
1 stars 0 forks source link

Adding the C-API functions. #12

Closed DanielEven closed 2 years ago

DanielEven commented 2 years ago

Copied the kmeans code and added functions for the 2 module functions.

DanielEven commented 2 years ago

We still need to do:

@liammohr

DanielEven commented 2 years ago

I changes the location of these functions, do you agree ? @liammohr

DanielEven commented 2 years ago

Sorry for the typing mistake.

DanielEven commented 2 years ago

We also need to:

DanielEven commented 2 years ago

Don't we prefer to pass the sizes (n,k,num_mapped_vectors) through a global variable ? Because pass them many times and they are always staying the same, so we can initialze once and then use them globally.

@liammohr

DanielEven commented 2 years ago

The next step is to finish calculate requested (and modify create_k_eigenvectors_matrix in order to do that).

liammohr commented 2 years ago

The C-API works! I finished calculate_requested and adjusted create_k_eigenvectors_matrix. I also debugged the code for hours until I finally found all the bugs (hopefully), and it runs smoothly and outputs correct results for the blobs1 file. Two more things to do before merging: (additional to the ones listed above in this discussion)

(The output is mathematically correct, we just need to decide on the format)

liammohr commented 2 years ago

The C-API works! I finished calculate_requested and adjusted create_k_eigenvectors_matrix. I also debugged the code for hours until I finally found all the bugs (hopefully), and it runs smoothly and outputs correct results for the blobs1 file. Two more things to do before merging: (additional to the ones listed above in this discussion)

  • [ ] check what exactly to print for ddg input
  • [ ] check what format to print for jacobi input - vectors as row or columns

(The output is mathematically correct, we just need to decide on the format)

@DanielEven

DanielEven commented 2 years ago

Very good job! Amazing! Everything looks fine.

DanielEven commented 2 years ago

Also memory leak auto-testers are helpful๐Ÿ˜Ž๐Ÿ˜Ž

DanielEven commented 2 years ago

The C-API works! I finished calculate_requested and adjusted create_k_eigenvectors_matrix. I also debugged the code for hours until I finally found all the bugs (hopefully), and it runs smoothly and outputs correct results for the blobs1 file. Two more things to do before merging: (additional to the ones listed above in this discussion)

  • [ ] check what exactly to print for ddg input
  • [ ] check what format to print for jacobi input - vectors as row or columns

(The output is mathematically correct, we just need to decide on the format)

@DanielEven

We can talk and fix the 4 left tasks.

DanielEven commented 2 years ago

Great!๐Ÿ‘‘

DanielEven commented 2 years ago

I fixed the testers.

DanielEven commented 2 years ago

Please review what I wrote. @liammohr

DanielEven commented 2 years ago

And please:

DanielEven commented 2 years ago

The Failed tester is because we changed the epsilon from 10^-15 to 10^-5. In my opinion, the staff changed the pdf, but probably didn't match the expected results to it, so the results are for 10^-15 and then there are BAD DIFFs.

DanielEven commented 2 years ago

Also, valgrind discovered some memory leaks.

liammohr commented 2 years ago

We still need to:

DanielEven commented 2 years ago

We still need to:

  • [ ] change what our code does for goal=jacobi
  • [ ] figure out if we should print -0 or 0
  • [ ] figure out if there should be an empty line between the eigenvalues and the eigenvectors

๐Ÿ‘

DanielEven commented 2 years ago

The C-API works! I finished calculate_requested and adjusted create_k_eigenvectors_matrix. I also debugged the code for hours until I finally found all the bugs (hopefully), and it runs smoothly and outputs correct results for the blobs1 file. Two more things to do before merging: (additional to the ones listed above in this discussion)

  • [ ] check what exactly to print for ddg input
  • [ ] check what format to print for jacobi input - vectors as row or columns

(The output is mathematically correct, we just need to decide on the format)

We also need to check these 2.

liammohr commented 2 years ago

The C-API works! I finished calculate_requested and adjusted create_k_eigenvectors_matrix. I also debugged the code for hours until I finally found all the bugs (hopefully), and it runs smoothly and outputs correct results for the blobs1 file. Two more things to do before merging: (additional to the ones listed above in this discussion)

  • [ ] check what exactly to print for ddg input
  • [ ] check what format to print for jacobi input - vectors as row or columns

(The output is mathematically correct, we just need to decide on the format)

We also need to check these 2.

I think both of these issues were addressed in the forum so it shouldn't be a problem to fix them tomorrow.