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
  [MEGALEAK] HackTheBox ProLabs, Fortress, Endgame - Alchemy, 250 Flags, leak htb-bot htb-bot 106 42,248 10-31-2026, 07:33 PM
Last Post: aistax
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 383 138,768 10-31-2026, 11:47 AM
Last Post: thaytoiyeucoay30nam
  HTB PWN- Oxidized ROP macavitysworld 4 1,055 10-29-2026, 01:01 PM
Last Post: A1Raid3r
  HTB - code + titanic walkthrough | free tony_boom23 3 7,273 10-25-2026, 06:35 AM
Last Post: A1Raid3r
  HTB apt lab note zapot 14 35,545 10-03-2026, 08:09 PM
Last Post: whuuaa



 Users browsing this thread: 1 Guest(s)