Skip to content

Commit

Permalink
docs: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
f-aguzzi committed Jun 4, 2024
1 parent 57a3497 commit c919596
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions examples/knn_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"# Perform preliminary data fusion\n",
"lldf_settings = LLDFSettings(output=GraphMode.NONE)\n",
"qepas_table = Table(\n",
" file_path=\"tests/qepas.xlsx\",\n",
" file_path=\"qepas.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"snv\"\n",
")\n",
"rt_table = Table(\n",
" file_path=\"tests/rt.xlsx\",\n",
" file_path=\"rt.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"none\"\n",
")\n",
Expand Down Expand Up @@ -3366,7 +3366,7 @@
")\n",
"\n",
"# Initialize and run the PCA class\n",
"knn = KNN(fused_data=lldf.fused_data, settings=knn_settings)\n",
"knn = KNN(settings=knn_settings, data=lldf.fused_data)\n",
"knn.knn()"
]
},
Expand Down
8 changes: 4 additions & 4 deletions examples/pca_lda_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"# Perform preliminary data fusion\n",
"lldf_settings = LLDFSettings(output=GraphMode.NONE)\n",
"qepas_table = Table(\n",
" file_path=\"tests/qepas.xlsx\",\n",
" file_path=\"qepas.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"snv\"\n",
")\n",
"rt_table = Table(\n",
" file_path=\"tests/rt.xlsx\",\n",
" file_path=\"rt.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"none\"\n",
")\n",
Expand Down Expand Up @@ -107,7 +107,7 @@
")\n",
"\n",
"# Initialize and run the PCA class\n",
"pca = PCA(lldf.fused_data, pca_settings)\n",
"pca = PCA(pca_settings, lldf.fused_data)\n",
"pca.pca()\n",
"\n",
"# Print the number of components and the statistics\n",
Expand Down Expand Up @@ -140,7 +140,7 @@
")\n",
"\n",
"# Initialize and run the LDA class\n",
"lda = LDA(lldf.fused_data, settings)\n",
"lda = LDA(settings, lldf.fused_data)\n",
"lda.lda()"
]
},
Expand Down
14 changes: 8 additions & 6 deletions examples/pca_lr_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"# Perform preliminary data fusion\n",
"lldf_settings = LLDFSettings(output=GraphMode.NONE)\n",
"qepas_table = Table(\n",
" file_path=\"tests/qepas.xlsx\",\n",
" file_path=\"qepas.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"snv\"\n",
")\n",
"rt_table = Table(\n",
" file_path=\"tests/rt.xlsx\",\n",
" file_path=\"rt.xlsx\",\n",
" sheet_name=\"Sheet1\",\n",
" preprocessing=\"none\"\n",
")\n",
Expand Down Expand Up @@ -25531,12 +25531,15 @@
")\n",
"\n",
"# Initialize and run the PCA class\n",
"pca = PCA(lldf.fused_data, pca_settings)\n",
"pca = PCA(pca_settings, lldf.fused_data)\n",
"pca.pca()\n",
"\n",
"# Print the number of components and the statistics\n",
"print(f\"\\nNumber of components: {pca.components}\\n\")\n",
"pca.pca_stats()"
"pca.pca_stats()\n",
"\n",
"# Get the data out of PCA\n",
"pca_data = pca.export_data()"
]
},
{
Expand Down Expand Up @@ -50065,8 +50068,7 @@
"# Initialize and run the LDA class\n",
"lr = LR(\n",
" settings=settings,\n",
" array_scores=pca.array_scores, # use the data from PCA\n",
" y=lldf.fused_data.y\n",
" data=pca_data # use the data from PCA\n",
")\n",
"lr.lr()"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/plsda_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18114,7 +18114,7 @@
")\n",
"\n",
"# Initialize and run the PLSDA class\n",
"plsda = PLSDA(fused_data=lldf.fused_data, settings=plsda_settings)\n",
"plsda = PLSDA(settings=plsda_settings, data=lldf.fused_data)\n",
"plsda.plsda()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/svm_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@
")\n",
"\n",
"# Initialize and run the SVM class\n",
"svm = SVM(fused_data=lldf.fused_data, settings=svm_settings)\n",
"svm = SVM(settings=svm_settings, data=lldf.fused_data)\n",
"svm.svm()"
]
},
Expand Down

0 comments on commit c919596

Please sign in to comment.