示例
public class Server {public static void main(String[] args) throws InterruptedException {// todo 创建两个 eventGroup boss 接受客户端的连接, 底层就是一个死循环, 不断的监听事件 处理事件// new NioEventLoopGroup(1); todo 入参1 表示设置boss设置为1个线程,…
线性回归模型
线性回归(Linear Regression)是利用称为线性回归方程的最小平方函数对一个或多个自变量和因变量之间关系进行建模的一种回归分析。 可以直接使用sklearn建立线性模型:
from sklearn.linear_model import LinearRegression
model LinearRegression(n…
1 读取数据
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings(ignore)note: 将整型变量的类型尽量压缩,逐步判断并转化为int8,int16,int32,int64
def reduce_mem_usage(df):""" iterate through all the columns …