HTB - AI Space Challenge
by Th3B4h0z - Wednesday July 3, 2024 at 02:39 PM
#1
Let's discuss the AI Space Challenge.
Reply
#2
Perform MDS on the distance matrix.
Reply
#3
thanks , it works
Reply
#4
import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import MDS def main():     try:         distance_matrix = np.load('distance_matrix.npy')     except Exception as e:         print(f"Error loading distance matrix: {e}")         return     print(f"Distance matrix shape: {distance_matrix.shape}")     try:         mds = MDS(n_components=2, dissimilarity='precomputed', random_state=42)         points = mds.fit_transform(distance_matrix)     except Exception as e:         print(f"Error performing MDS: {e}")         return     plt.figure(figsize=(10, 8))     plt.scatter(points[:, 0], points[:, 1])     plt.title('MDS Projection of Distance Matrix')     plt.xlabel('MDS Dimension 1')     plt.ylabel('MDS Dimension 2')         for i, point in enumerate(points):         plt.annotate(str(i), (point[0], point[1]))     plt.show() if __name__ == "__main__":     main()
Reply
#5
after i run the code code export the img , but img is not clear to read how fix it
Ban reason: Compromised - Malware Logs (Permanent)
Reply
#6
(07-28-2024, 12:15 PM)Januka Wrote: after i run the code code export the img , but img is not clear to read how fix it

You can change font size here:

plt.annotate(str(i), (point[0], point[1]), fontsize=6)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 365 113,330 Yesterday, 07:30 PM
Last Post: N1GHTC0D3
  HTB Eloquia User and Root Flags - Insane Box 69646B 14 17,598 08-21-2026, 07:27 PM
Last Post: tangol
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 94 26,213 08-21-2026, 06:20 AM
Last Post: jamoski
  [FREE] HTB-ProLabs APTLABS Just Flags kewlsunny 25 19,489 08-15-2026, 06:06 PM
Last Post: m4573rx
  HTB - ALL Challenges you Stuck in osamy7593 3 17,644 08-15-2026, 01:58 AM
Last Post: 0xIDA



 Users browsing this thread: 1 Guest(s)