shuaizhou / multinomial_logistic.2.py
0 gustos
0 bifurcaciones
1 archivos
Última actividad 3 days ago
| 1 | import io |
| 2 | from typing import List, Tuple |
| 3 | |
| 4 | import numpy as np |
| 5 | import pandas as pd |
| 6 | from sklearn.linear_model import LinearRegression |
| 7 | |
| 8 | |
| 9 | def fit_exact_webtool_softmax( |
| 10 | x: pd.DataFrame, y: pd.DataFrame |
shuaizhou / multinomial_logistic.1.py
0 gustos
0 bifurcaciones
1 archivos
Última actividad 3 days ago
| 1 | import numpy as np |
| 2 | import pandas as pd |
| 3 | |
| 4 | def build_design_matrix(x: pd.DataFrame) -> np.ndarray: |
| 5 | """ |
| 6 | 在最前面加一列 1 作为截距项 |
| 7 | """ |
| 8 | X = x.to_numpy(dtype=float) |
| 9 | intercept = np.ones((X.shape[0], 1), dtype=float) |
| 10 | return np.hstack([intercept, X]) |
shuaizhou / ncbi_genome_download.sh
0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 month ago
| 1 | conda create -n ncbi_dl -y -c conda-forge ncbi-datasets-cli jq |
| 2 | |
| 3 | for f in batches/batch_*; do |
| 4 | base=$(basename "$f") |
| 5 | out="zips/${base}.zip" |
| 6 | |
| 7 | echo "Downloading $f -> $out" |
| 8 | datasets download genome accession --inputfile "$f" \ |
| 9 | --include genome,gff3,gbff \ |
| 10 | --filename "$out" |
Siguiente
Anterior