关于人工智能:七篇深入理解机器学习和深度学习的读物推荐

3次阅读

共计 4281 个字符,预计需要花费 11 分钟才能阅读完成。

在这篇文章中将介绍 7 篇机器学习和深度学习的论文或者图书出版物,这些内容都论文极大地影响了我对该畛域的了解,如果你想深刻理解机器学习的内容,哪么举荐浏览。

Attention Is All You Need

在自然语言解决和序列建模畛域,Vaswani 等人的一篇论文《Attention Is All You Need》彻底改变了这一畛域。这篇开创性的论文介绍了 Transformer 模型,它仅依赖于留神机制来捕捉序列中元素之间的依赖关系。

Transformer 模型的注意力机制容许模型在进行预测时专一于输出序列的相干局部,从而在机器翻译、语言生成和其余基于序列的工作中取得令人印象粗浅的后果。

作者形容了注意力机制如何使模型可能逾越整个输出序列捕捉上下文信息,将长期依赖关系合成为更小、更易于治理的局部。

 import torch
 import torch.nn as nn
 
 # Implementation of the scaled dot-product attention mechanism
 class SelfAttention(nn.Module):
     def __init__(self, input_dim, hidden_dim):
         super(SelfAttention, self).__init__()
         self.query = nn.Linear(input_dim, hidden_dim)
         self.key = nn.Linear(input_dim, hidden_dim)
         self.value = nn.Linear(input_dim, hidden_dim)
         self.softmax = nn.Softmax(dim=-1)
     def forward(self, x):
         query = self.query(x)
         key = self.key(x)
         value = self.value(x)
         scores = torch.matmul(query, key.transpose(-2, -1))
         attention_weights = self.softmax(scores)
         attended_values = torch.matmul(attention_weights, value)
         return attended_values

这篇论文关上了一个充斥可能性的世界,然而他的外围代码就是这么简略。

The Elements of Statistical Learning

由 Trevor Hastie, Robert Tibshirani 和 Jerome Friedman 撰写的“the Elements of Statistical learning”。介绍了统计学习的基础知识,并提供了各种机器学习算法的全面概述。浏览这篇论文就像进入了一个暗藏的常识宝库,揭示了预测模型的外部工作原理。

从线性回归到反对向量机,从决策树到深度学习,《the Elements of Statistical learning》涵盖了所有内容。作者熟练地疏导读者通过建模揭开简单概念和算法的面纱。这篇论文不仅提供了必要的工具来建设精确的预测模型,而且还能够拓宽咱们对根底数学和实践的了解。

上面就是最简略的线性回归

 from sklearn.linear_model import LinearRegression
 
 # Linear regression model fitting
 model = LinearRegression()
 model.fit(X_train, y_train)
 # Predicting with the trained model
 y_pred = model.predict(X_test)

Deep Learning

这就是咱们常说的“花书”,Ian Goodfellow, Yoshua Bengio 和 Aaron Courville 的“Deep Learning”相对是必读的。这本全面的书提供了深度学习的深刻摸索,揭示了卷积神经网络,循环神经网络和生成模型的神秘。

深度学习曾经彻底改变了咱们解决简单问题的形式,如图像识别、自然语言解决和语音合成。这本书将带你踏上一段迷人的旅程“Deep Learning”使我可能开释神经网络的真正后劲,将我构建智能零碎的幻想变为事实。

上面就是应用 TF 实现的一个最简略的 MLP

 import tensorflow as tf
 from tensorflow.keras.models import Sequential
 from tensorflow.keras.layers import Dense
 
 # Creating a simple neural network using Keras
 model = Sequential()
 model.add(Dense(64, activation='relu', input_shape=(input_dim,)))
 model.add(Dense(1, activation='sigmoid'))
 # Compiling and training the model
 model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
 model.fit(X_train, y_train, epochs=10, batch_size=32)

A Few Useful Things to Know About Machine Learning for Time Series

工夫序列数据以其独特的特点和挑战在数据迷信畛域占有非凡的位置。Jean-Paul S. benzacrii 的《A Few Useful Things to Know About Machine Learning for Time Series》提供了对建模工夫相干数据的复杂性的贵重见解。这篇论文为我解决工夫序列问题打下了松软的根底,从预测股票价格到预测能源消耗。

作者强调了特色工程和畛域常识在工夫序列剖析中的重要性。理解季节性、趋势合成和自回归综合挪动均匀 (ARIMA) 框架对理解工夫模式和做出精确预测的摸索起到了重要作用。

 from statsmodels.tsa.arima.model import ARIMA
 
 # Creating and fitting an ARIMA model
 model = ARIMA(data, order=(p, d, q))
 model_fit = model.fit()
 # Making predictions with the fitted model
 predictions = model_fit.predict(start=start_date, end=end_date)

Latent Dirichlet Allocation

在无监督学习的广大畛域,David M. Blei, Andrew Y. Ng 和 Michael I. Jordan 的“Latent Dirichlet Allocation”是一篇根底论文。这格开创性的工作引入了一个弱小的生成概率模型,用于发现文档语料库中的潜在主题。

以下就是应用 sklearn 实现的 LDA 代码:

 from sklearn.decomposition import LatentDirichletAllocation
 
 # Creating and fitting an LDA model
 model = LatentDirichletAllocation(n_components=num_topics)
 model.fit(data)
 # Extracting topic proportions for a document
 topic_proportions = model.transform(document)

Playing Atari with Deep Reinforcement Learning

强化学习代表了人工智能畛域的另外一个钻研方向,其利用范畴从游戏到机器人。Volodymyr Mnih 等人的“Playing Atari with Deep Reinforcement Learning”介绍了一种将深度学习与强化学习相结合的办法.

gym 与 TF 联合也使得深度强化学习更加简略:

 import gym
 import numpy as np
 from tensorflow.keras.models import Sequential
 from tensorflow.keras.layers import Dense
 
 # Creating a Deep Q-Network for Atari game playing
 model = Sequential()
 model.add(Dense(64, activation='relu', input_shape=(input_dim,)))
 model.add(Dense(num_actions, activation='linear'))
 # Training the DQN agent using the Gym environment
 env = gym.make('Breakout-v0')
 state = env.reset()
 done = False
 while not done:
     action = np.argmax(model.predict(state))
     next_state, reward, done, info = env.step(action)
     state = next_state

The Visual Display of Quantitative Information

爱德华·r·塔夫特的《The Visual Display of Quantitative Information》。摸索了数据可视化的艺术,并为创立无效和信息丰盛的视觉显示提供了贵重的领导。Tufte 强调了通过视觉体现清晰沟通的重要性,并教咱们如何让数据为本人谈话。

Tufte“最大化数据墨水”通知咱们要打消不必要的凌乱,专一于以最纯正的模式出现数据。这一理念成为了可视化办法的基石。

 import matplotlib.pyplot as plt
 
 # Scatter plot using the 'matplotlib' library
 plt.scatter(x, y, c='blue', alpha=0.5)
 plt.title("Relationship between X and Y")
 plt.xlabel("X-axis")
 plt.ylabel("Y-axis")
 plt.show()

总结

以上就是我举荐的 7 篇入门级别的相干读物,这些内容粗浅地影响了咱们的数据分析、建模和可视化的了解和实际。

https://avoid.overfit.cn/post/2f27526433444e499d39d72b1372ad20

作者 araujogabe1

正文完
 0