PerkinsFund commited on
Commit
ec55bb3
·
verified ·
1 Parent(s): 9620f35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md CHANGED
@@ -1,3 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
  tags:
 
1
+ # Traceix AI Security Telemetry
2
+
3
+ These files are uploaded monthly automatically by Traceix and provided as is under the CC BY 4.0 license. You can test the datasets simply by doing the following:
4
+
5
+ ```python
6
+ # do_dataset_publishing()
7
+ from datasets import load_dataset
8
+ import pandas as pd
9
+ from sklearn.linear_model import LogisticRegression
10
+ from sklearn.model_selection import train_test_split
11
+
12
+
13
+ # Load the Traceix telemetry dataset
14
+ ds = load_dataset(
15
+ "PerkinsFund/traceix-ai-security-telemetry",
16
+ data_files="traceix-telemetry-corpus-2025-12.jsonl", # Or whatever month you want
17
+ split="train",
18
+ )
19
+
20
+ # We will need to flatten nested JSON into columns
21
+ df = ds.to_pandas()
22
+ df_flat = pd.json_normalize(df.to_dict(orient="records"))
23
+
24
+ # Define the features and label based on schema
25
+ feature_cols = [
26
+ "decrypted_training_data.SizeOfCode",
27
+ "decrypted_training_data.SectionsMeanEntropy",
28
+ "decrypted_training_data.ImportsNb",
29
+ ]
30
+
31
+ label_col = "model_classification_info.identified_class"
32
+
33
+ # We don't have to but we will drop the rows with missing data
34
+ df_flat = df_flat.dropna(subset=feature_cols + [label_col])
35
+
36
+ X = df_flat[feature_cols].values
37
+ y = (df_flat[label_col] == "malicious").astype(int)
38
+
39
+ # Start the training and test split
40
+ X_train, X_test, y_train, y_test = train_test_split(
41
+ X, y, test_size=0.2, random_state=42
42
+ )
43
+
44
+ # Test the basic file classifier
45
+ clf = LogisticRegression(max_iter=1000)
46
+ clf.fit(X_train, y_train)
47
+
48
+ print("Test accuracy:", clf.score(X_test, y_test))
49
+ ```
50
+
51
  ---
52
  license: cc-by-4.0
53
  tags: