![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java学习
DeniuHe
加油!
展开
-
Python:将MNIST数据PCA降维到87维,并另存为arff格式
import numpy as npimport copyimport pandas as pdfrom sklearn import datasetsfrom sklearn.decomposition import PCAfrom sklearn.preprocessing import StandardScalerMNIST = datasets.fetch_mldata('...原创 2019-11-29 16:22:42 · 560 阅读 · 0 评论 -
Java:求开根号,向下取整,将double转化为int型
package classifier;public class getSqrt { public static void main(String[] args){ double a = 15; System.out.println(Math.sqrt(a)); System.out.println(Math.floor(Math.sqr...原创 2019-11-24 12:03:13 · 2758 阅读 · 0 评论 -
Java:将csv文件转化为arff文件
package classifier;import weka.core.Instances;import weka.core.converters.ConverterUtils.DataSource;import weka.core.converters.ArffSaver;import java.util.Random;import java.io.File;public cl...原创 2019-11-24 11:20:24 · 791 阅读 · 0 评论 -
Python:将sklearn自带数据转存为CSV文件
import numpy as npimport pandas as pdfrom sklearn import datasetsX,y = datasets.load_breast_cancer(return_X_y=True)y = np.vstack(y)print(X.shape)print(y.shape)data = np.hstack((X,y))print(da...原创 2019-11-23 20:40:57 · 2211 阅读 · 0 评论