- 博客(6)
- 收藏
- 关注
原创 MapReduce课程实验
创建一个文件"words.txt",上传到hdfs代码:public class CreateFile {public static void main(String[] args) throws Exception { //设置一个配置 服务器所在 信息 Configuration conf = new Configuration(); // linux 上的 hdfs 访问 地址 conf.set("fs.defaultFS", "hdfs://master:8020");
2022-04-21 15:57:45 2109
原创 电商经销年度消费业务分析
import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsfrom sklearn.preprocessing import LabelEncoderfrom sklearn.preprocessing import Normalizerfrom sklearn.cluster import KMeansfrom sklearn.metrics import silhouet
2022-04-21 14:44:56 174
原创 一元回归线性下降算法
思想:使损失函数MSE最小,拟合出的函数越准确案例:假设你是一家餐厅的老板,考虑开一家分店,根据该城市的人口预测利润import pandas as pdimport numpy as npdf = pd.read_csv(‘data.txt’, header=None)print(df)取所有的人口转成数组x = np.array(df.iloc[:, 0])print(x)取所有的利润转成数组y = np.array(df.iloc[:, 1])print(y)样本量N = l
2022-04-21 14:43:30 1598
原创 喜好程度预测
import pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import StandardScalerfrom sklearn.neighbors import KNeighborsClassifierdf = pd.read_csv(‘datatest.csv’, names=[‘出行’, ‘游戏时间’, ‘冰激凌’, ‘配对结果’])print(df)取所有
2022-04-21 14:42:07 2764
原创 泰坦尼克号乘客获救预测
import pandas as pdimport seaborn as snsimport matplotlib.pyplot as pltfrom sklearn.preprocessing import LabelEncoderfrom sklearn.model_selection import train_test_splitfrom sklearn.ensemble import RandomForestClassifierfrom sklearn.model_selection i
2022-04-21 14:39:01 1221
原创 房屋价格预测
import pandas as pdimport matplotlib.pyplot as pltimport numpy as np读取数据train = pd.read_csv(‘train.csv’)test = pd.read_csv(‘test.csv’)print(train.shape)print(test.shape)查看数据类型和描述print(train.info())print(train.describe())统计每列Null的占比print((train.
2022-04-21 14:37:56 121
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人