index.js 4.54 KB
Newer Older
zhanghaozhe committed
1 2
import React, { Component } from "react"
import "./index.scss"
zhanghaozhe committed
3 4 5 6 7

class InAction extends Component {
  state = {
    projects: [
      {
zhanghaozhe committed
8 9 10 11 12
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_1.png",
        title: " 基于KNN的电影推荐系统",
        detail:
          "基于Surprise库使用movielens数据集构建电影推荐系统。在此之前,你还将学习K近邻算法、协同过滤与推荐系统的本质。",
zhanghaozhe committed
13 14
      },
      {
zhanghaozhe committed
15 16 17 18 19
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_2.png",
        title: " 使用线性回归预测股票走势",
        detail:
          "基于Sklearn中的线性回归实现Google股票走势预测。在此之前,你还将学习线性回归算法的相关细节与对应的代码实战。",
zhanghaozhe committed
20 21
      },
      {
zhanghaozhe committed
22 23 24 25 26
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_3.png",
        title: " 基于LR的广告点击率预估",
        detail:
          "LR曾是各大互联网公司在CTR预估上使用的主流模型。它有着可解释性强、易于并行化、便于在线学习等不可替代的优势。",
zhanghaozhe committed
27 28
      },
      {
zhanghaozhe committed
29 30 31 32 33
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_4.png",
        title: "基于朴素贝叶斯的垃圾邮件过滤",
        detail:
          "文本分类是NLP领域较为常见的任务,本项目使用朴素贝叶斯对垃圾邮件和正常邮件进行分类,涉及分词和正则表达式的内容。",
zhanghaozhe committed
34 35
      },
      {
zhanghaozhe committed
36 37 38 39 40
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_5.png",
        title: " 基于决策树的用户流失分析预测",
        detail:
          "用户流失分析对于提升用户活跃度有重要的意义,本项目基于Sklearn的决策树算法实现流失用户预测,并对决策树进行可视化。",
zhanghaozhe committed
41 42
      },
      {
zhanghaozhe committed
43 44 45 46 47
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_6.png",
        title: " 利用随机森林评估特征重要性",
        detail:
          "分析特征重要性对于机器学习建模有重要的意义,本项目基于Sklearn中的随机森林算法评估UCI葡萄酒数据的特征重要性。",
zhanghaozhe committed
48 49
      },
      {
zhanghaozhe committed
50 51 52 53 54
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_7.png",
        title: " 基于K-means实现图像分割",
        detail:
          "基于Sklearn中的Kmeans算法实现图像分割,将一幅图像分解成互不相交区域的集合,本质上是一种像素聚类的过程。",
zhanghaozhe committed
55
      },
zhanghaozhe committed
56
      {
zhanghaozhe committed
57 58 59 60 61
        image:
          "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/mlCourse/m/project_8.png",
        title: "基于SVM的人脸识别",
        detail:
          "人脸识别是计算机视觉领域的一项重要技术,本项目基于Skeran中的SVM算法在Olivetti人脸数据集上进行简单的人脸分类。",
zhanghaozhe committed
62
      },
zhanghaozhe committed
63 64
    ],
    showAll: false,
zhanghaozhe committed
65
    initialShowCount: 8,
zhanghaozhe committed
66 67 68
  }

  render() {
zhanghaozhe committed
69
    const { showAll, initialShowCount } = this.state
zhanghaozhe committed
70 71

    return (
zhanghaozhe committed
72
      <div id={"in-action"}>
zhanghaozhe committed
73 74
        <h2> /  /  / </h2>
        <ul>
zhanghaozhe committed
75 76 77 78 79 80 81 82
          {this.state.projects.map((item, i) => {
            if (i >= initialShowCount && !showAll) {
              return null
            }
            return (
              <li key={i}>
                <div className={"project-image"}>
                  <img src={item.image} alt="" />
zhanghaozhe committed
83
                </div>
zhanghaozhe committed
84
                <div className={"des"}>
zhanghaozhe committed
85 86 87 88
                  <div className="title">
                    <span>{i + 1}</span>
                    <span>{item.title}</span>
                  </div>
zhanghaozhe committed
89
                  <p className={"detail"}>{item.detail}</p>
zhanghaozhe committed
90 91
                </div>
              </li>
zhanghaozhe committed
92 93
            )
          })}
zhanghaozhe committed
94
          {/*<li>
zhanghaozhe committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
            {
              !showAll
                ? <button onClick={() => {
                  this.setState({
                    showAll: true
                  })
                }}>
                  展开更多
                  <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/zhankai.png" alt=""/>
                </button>
                : <button onClick={() => {
                  this.setState({
                    showAll: false
                  })
                }}>
                  收起
                  <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/shouqi.png" alt=""/>
                </button>
            }
zhanghaozhe committed
114
          </li>*/}
zhanghaozhe committed
115 116
        </ul>
      </div>
zhanghaozhe committed
117
    )
zhanghaozhe committed
118 119 120
  }
}

zhanghaozhe committed
121
export default InAction