数学模型
文章平均质量分 66
Sheyueyu
私信回复消息不及时,有事联系邮箱sheyueyu@qq.com
展开
-
biogeme-nest_logit-cnblog
嵌套logit 进行交通方式选择原创 2022-10-04 20:09:37 · 1834 阅读 · 28 评论 -
【按区间进行分类】
import pandas as pd import numpy as np#导入数据df =pd.read_csv('./csv_data/households.csv')#按区间切分进行分组listBins = [0, 30000, 60000, 100000, 10000000]#设置切分后对应的标签listLabels= [1,2,3,4]#利用pd.cut进行数据离散化切分df['fenzu'] = pd.cut(df['income'],bins = listBins,原创 2022-04-10 12:12:18 · 1532 阅读 · 0 评论 -
MNL(使用自己的数据集)
1. 导入包import pandas as pdimport numpy as npfrom numpy import meanfrom numpy import stdfrom sklearn.datasets import make_classificationfrom sklearn.model_selection import cross_val_scorefrom sklearn.model_selection import RepeatedStratifiedKFoldfrom原创 2022-03-20 11:54:53 · 4191 阅读 · 2 评论 -
MNL(多项logit)
import sklearnimport pandas as pdfrom sklearn import datasetsfrom sklearn import linear_modelfrom sklearn import metricsfrom sklearn.model_selection import train_test_splitfrom sklearn.linear_model import LogisticRegression1. 生成数据n_samples:样本数原创 2022-03-20 11:54:06 · 5803 阅读 · 0 评论