bootstrap练习


<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <!-- bootstrap css引入 -->
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <!-- jquery js引入 -->
        <script src="js/jquery.min.js"></script>
        <!-- bootstrap js引入 -->
        <script src="js/bootstrap.bundle.min.js"></script>
    </head>
    <body>
        <div class="container">
            <form>
              <div class="form-group">
                <label for="exampleInputEmail1">电子邮件地址</label>
                <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
                <small id="emailHelp" class="form-text text-muted">我们永远不会和别人分享你的电子邮件。</small>
              </div>
              <div class="form-group">
                <label for="exampleInputPassword1">密码</label>
                <input type="password" class="form-control" id="exampleInputPassword1">
              </div>
              <div class="form-group form-check">
                <input type="checkbox" class="form-check-input" id="exampleCheck1">
                <label class="form-check-label" for="exampleCheck1">记住我</label>
              </div>
              <button class="btn btn-primary" id="login">登录</button>
            </form>
        </div>
        <!-- 引入自定义js,写在最后的原因是希望等页面所有元素加载完之后再执行 -->
        <script src="js/login.js"></script>
    </body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
bootstrap是一种统计学方法,用于通过从原始数据集中进行有放回抽样来估计统计量的分布。它可以用于估计均值、方差、置信区间等。 在引用中提到了使用bootstrap来估计均值的差异。具体来说,可以使用bootstrap来估计联系变量(每周每个学生练习的小时数)的均值差异。 在引用中提到了使用bootstrap的百分位数来构建置信区间。具体来说,可以通过从bootstrap分布中选择与所需置信水平相对应的百分位数来构建置信区间。 以下是使用bootstrap估计均值差异和构建置信区间的示例代码: ```python import numpy as np # 原始数据集 data = [2, 4, 6, 8, 10] # bootstrap抽样次数 = 1000 # 用于存储bootstrap样本均值的数组 bootstrap_means = np.zeros(B) # 进行bootstrap抽样和计算样本均值 for i in range(B): bootstrap_sample = np.random.choice(data, size=len(data), replace=True) bootstrap_means[i] = np.mean(bootstrap_sample) # 估计均值差异 mean_difference = np.mean(bootstrap_means) - np.mean(data) # 构建置信区间 confidence_interval = np.percentile(bootstrap_means, [2.5, 97.5]) print("均值差异: ", mean_difference) print("置信区间: ", confidence_interval) ``` 这段代码首先定义了原始数据集`data`,然后使用bootstrap方法进行1000次抽样,并计算每个bootstrap样本的均值。最后,通过计算bootstrap样本均值的均值与原始数据集均值之间的差异来估计均值差异,并使用bootstrap样本均值的百分位数构建置信区间。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值