本段 581 题 | 来源:fullstack + general + design | 知识点:数据工程与数据科学/AI
1. 什么是数据流图(Data Flow Diagram,DFD)?
- 知识点: 数据工程与数据科学/AI / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: DFD, Data Flow Diagram, System Design)
- 类型: technical | 难度: easy | 子类型:
- 分类: general
- id: 6960cc690e32007ea0d32021 | 官方: 是 | 付费: 否
答案:
核心答案数据流图(Data Flow Diagram,DFD)用于描述系统或组织内部的数据流动:数据从一个过程/实体流向另一个过程/实体,并标注来源、目的地及过程中的转换。常用于系统分析与设计,帮助可视化理解数据如何在系统中流转。
2. Business Analyst(业务分析师,BA) 和 Data Analyst(数据分析师) 有什么区别?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: business-analysis, data-analytics;标签: business-analyst, comparison, roles)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 6967574efa809e6d38a7e7c7 | 官方: 是 | 付费: 否
答案:
答案Data Analyst(数据分析师) 更偏向数据处理(Data Processing)、建模(Modeling)与洞察(Insights)输出;Business Analyst(业务分析师) 更关注“组织应该做什么”,把业务目标(Business Objectives)、流程(Processes)与需求(Requirements)拆解清楚,并与技术团队协作落地。两者都会用数据,但 BA(业务分析师) 的核心在需求与价值闭环而非仅分析报表。
3. 什么是数据可视化(Data Visualization)?对 BA(业务分析师) 的价值是什么?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: data-visualization, powerbi, tableau, business-analysis;标签: business-analyst, storytelling, visualization)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 6967574efa809e6d38a7e7d3 | 官方: 是 | 付费: 否
答案:
答案数据可视化(Data Visualization) 是把复杂数据转成直观图形(如折线、散点、时间序列等),帮助利益相关方快速理解现状、趋势与异常。对 BA(业务分析师) 来说,可视化能把“分析结论”讲清楚,推动共识与决策,并提升需求优先级讨论的效率。
4. 什么是 BI(Business Intelligence)工具?BA(业务分析师) 常用哪些 BI(Business Intelligence)工具?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: business-intelligence, powerbi, cognos, sap-businessobjects;标签: BI, business-analyst, reporting)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 6967574efa809e6d38a7e7d6 | 官方: 是 | 付费: 否
答案:
答案BI(Business Intelligence,商业智能)工具用于数据报表(Reporting)、分析(Analytics)与可交互仪表盘(Interactive Dashboards),帮助组织基于事实做决策。BA(业务分析师) 常见工具包括 Microsoft Power BI、IBM Cognos、SAP BusinessObjects 等,用于制作指标体系(Metric Systems)、管理报表口径(Reporting Standards)、向业务方持续输出洞察(Insights)。
5. 什么是 Business Analytics Projects(商业分析项目)?
- 知识点: 数据工程与数据科学/AI (主题: business-analytics, statistics, predictive-modeling;标签: business-analyst, business-analytics, definition, projects)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69675a97fa809e6d38a88e74 | 官方: 是 | 付费: 否
答案:
答案商业分析项目(Business Analytics Projects) 是企业内部围绕数据开展的一系列分析活动,目标是用统计(Statistics)、数学建模(Mathematical Modeling)、预测(Prediction)等方法回顾历史表现、评估当前运营,并提炼可执行洞察(Actionable Insights),支持更好的数据驱动决策(Data-Driven Decision Making)。它通常服务于流程优化(Process Optimization)、产品与服务改进、机会发现与市场竞争优势获取。
6. 作为初学者,如何选择并启动一个商业分析项目(Business Analytics Project)?
- 知识点: 数据工程与数据科学/AI (主题: business-analytics, data-visualization, reporting;标签: beginner, business-analyst, business-analytics, how-to, projects, workflow)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69675a9dfa809e6d38a8936f | 官方: 是 | 付费: 否
答案:
答案建议从“小而聚焦”的业务问题开始:明确目标指标(如销量、转化率、离职率)、确认数据来源与口径、做最小可行分析(描述统计+可视化),再逐步加入建模(Modeling)与预测(Prediction)。优先选有公开数据集且能讲清楚业务价值的主题,最终用一份可读的报告/仪表盘展示“问题→方法→结论→建议→下一步”,方便在求职中呈现能力。
7. 什么是初级业务分析师(Junior Business Analyst)?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: business-analysis, requirements, data-analysis;标签: Junior BA, Role)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696760e9fa809e6d38a954da | 官方: 是 | 付费: 否
答案:
答案初级业务分析师(Junior Business Analyst) 通常在销售、市场、客服等业务部门协助收集并分析市场与行业数据,支持产品/项目满足客户需求。其核心工作以数据与需求为导向:跟随资深分析师参与项目,汇总系统信息、评估项目对业务结果的影响,向产研提供反馈,并在需要时参与测试计划(Test Plans)与测试脚本(Test Scripts)的编写与执行。
8. 训练CNN(Convolutional Neural Network,卷积神经网络)时,可以对输入进行旋转、平移、缩放等预处理提高模型泛化能力。这么说是对,还是不对?(正确答案:对)
- 知识点: 数据工程与数据科学/AI (主题: cnn, data-augmentation;标签: CNN, 数据增强, 泛化能力)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69687b05bc0b9904d6b3c640 | 官方: 是 | 付费: 否
答案:
答案对。
扩充数据(Data Augmentation) 是提高泛化能力(Generalization)常用的方式,对数据的平移、旋转等是对CNN(Convolutional Neural Network,卷积神经网络)训练数据的扩充的操作方式。
9. 下列哪一项在神经网络(Neural Network)中引入了非线性(Nonlinearity)?(正确:B)
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, activation-functions, relu;标签: 非线性, ReLU, 激活函数)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69687b05bc0b9904d6b3c648 | 官方: 是 | 付费: 否
答案:
答案A. 随机梯度下降(Stochastic Gradient Descent, SGD);
B. 修正线性单元(Rectified Linear Unit, ReLU);
C. 卷积函数(Convolution Function);
D. 以上都不正确
(正确:B)
“线性(Linearity)”="齐次性(Homogeneity)"+"可加性(Additivity)",“齐次性”是指类似于:f(ax)=af(x),“可加性”是指类似于:f(x+y)=f(x)+f(y),这里没有太多特别的原因,就是一个名字,“非线性(Nonlinearity)”当然就是这两条至少之一不成立。修正线性单元(ReLU)是非线性的激活函数(Activation Function)。
10. 什么是卷积(Convolution)?
- 知识点: 数据工程与数据科学/AI (主题: cnn, convolution;标签: 卷积, 滤波器, 内积)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69687b07bc0b9904d6b3c7cc | 官方: 是 | 付费: 否
答案:
答案对图像(不同的数据窗口数据)和滤波矩阵(Filter Matrix)(一组固定的权重:因为每个神经元的多个权重固定,所以又可以看做一个固定的滤波器filter)做内积(Dot Product)(逐个元素相乘再求和)的操作就是所谓的“卷积”操作,也是卷积神经网络(Convolutional Neural Network, CNN)的名字来源。
https://blog.csdn.net/dingyahui123/article/details/72808985
11. 什么是CNN的池化(Pooling)层?
- 知识点: 数据工程与数据科学/AI (主题: cnn, pooling;标签: 池化, Max Pooling, 降维)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69687b07bc0b9904d6b3c7d0 | 官方: 是 | 付费: 否
答案:
答案池化(Pooling),简言之,即取区域平均或最大,如下图所示(图引自cs231n)上图所展示的是取区域最大,即下图左边部分中左上角2x2的矩阵中6最大,右上角2x2的矩阵中8最大,左下角2x2的矩阵中3最大,右下角2x2的矩阵中4最大,所以得到上图右边部分的结果:6 8 3 4。关于池化的作用最可靠的解释是在尽量保持原数据相关关系的基础上进行变化降低维度,常用的是平均(Average Pooling)和最大池化法(Max Pooling)。
(图片中的示例数值)Single depth slice 为:
1 1 2 4
5 6 7 8
3 2 1 0
1 2 3 4max pool with 2x2 filters and stride 2 输出为:
6 8
3 4
12. 为什么引入非线性激励函数(Nonlinear Activation Function)?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, activation-function, nonlinearity;标签: Nonlinearity, Perceptron, Function Approximation)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688529bc0b9904d6b5653c | 官方: 是 | 付费: 否
答案:
答案第一、对于神经网络来说,网络的每一层相当于f(wx+b)=f(w'x),对于线性函数(Linear Function),其实相当于f(x)=x,那么在线性激活函数(Linear Activation Function)下,每一层相当于用一个矩阵去乘以x,那么多层就是反复的用矩阵去乘以输入。根据矩阵的乘法法则,多个矩阵相乘还是一个大矩阵。所以线性激励函数下,多层网络与一层网络相当。比如,两层的网络(W1*f(W2x))=W1W2x=Wx。第二,非线性变换(Nonlinear Transformation)深度学习(Deep Learning)有效的原因之一。原因在于非线性相当于对空间进行变换,变换完成后相当于对问题空间进行简化,原来线性不可解的问题现在变得可以解了。
上图可以很形象的解释这个问题,左图用一根线是无法划分的。经过一系列变换后,就变成线性可解的问题了。如果不用激励函数(其实相当于激励函数是f(x)=x),在这种情况下你每一层输出都是上层输入的线性函数,很容易验证,无论你神经网络有多少层,输出都是输入的线性组合(Linear Combination),与没有隐藏层效果相当,这种情况就是最原始的感知机(Perceptron)。正因为上面的原因,我们决定引入非线性激励函数,这样深层神经网络(Deep Neural Network)就有意义了(不再是输入的线性组合,可以逼近任意函数)。最早的想法是sigmoid函数(Sigmoid Function)或者tanh函数(Hyperbolic Tangent Function),输出有界,很容易充当下一层输入(以及一些人的生物解释)。
13. 什么样的资料集(dataset)不适合深度学习(deep learning)
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, data, inductive-bias;标签: Dataset Size, Local Correlation, CV, NLP, Speech)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 6968852bbc0b9904d6b566d0 | 官方: 是 | 付费: 否
答案:
答案(1)数据集(dataset)太小,数据样本(data sample)不足时,深度学习(deep learning)相对其它机器学习(machine learning)算法,没有明显优势。(2)数据集没有局部相关特性,目前深度学习表现比较好的领域主要是图像/语音/自然语言处理(natural language processing)等领域,这些领域的一个共性是局部相关性(local correlation)。图像中像素(pixel)组成物体,语音信号中音位组合成单词,文本数据中单词组合成句子,这些特征元素的组合一旦被打乱,表示的含义同时也被改变。对于没有这样的局部相关性的资料集,不适于使用深度学习算法进行处理。举个例子:预测一个人的健康状况,相关的参数会有年龄、职业、收入、家庭状况等各种元素,将这些元素打乱,并不会影响相关的结果。
14. CNN常用模型
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, cnn, lenet, alexnet, vgg, inception, resnet;标签: CNN Models, LeNet5, AlexNet, VGGNet, Inception, ResNet)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688907bc0b9904d6b60c8e | 官方: 是 | 付费: 否
答案:
答案名称特点LeNet5没啥特点,不过是第一个CNN(卷积神经网络,Convolutional Neural Network)应该要知道AlexNet引入了ReLU(修正线性单元,Rectified Linear Unit)和dropout(丢弃法),引入数据增强(data augmentation),池化(pooling)相互之间有覆盖,三个卷积一个最大池化(max pooling)+三个全连接(fully connected layer)VGGNet采用1111和33的卷积核(convolution kernel)以及22的最大池化使得层数变得更深,常用VGGNet-16和VGGNet19Google Inception Net这个在控制了计算量和参数量的同时,获得了比较好的分类性能,和上面相比有几个大的改进:1、去除了最后的全连接层,而是用一个全局的平均池化(global average pooling)来取代它;2、引入Inception Module,这是一个人为分支结构的结构,所有的分支都用到了11的卷积,这是因为11卷积比较高,可以用很少的参数达到非线性和特征变换。3、Inception V2第二版将所有的55变成2个3*3,而且提出兼容各的批归一化(Batch Normalization)。4、Inception V3第三版更复杂了,把较大的二维卷积(2D convolution)拆成了两个较小的一维卷积(1D convolution),加速运算,减少过拟合(overfitting),同时还更改了Inception Module的结构。微软ResNet残差神经网络(Residual Neural Network)1、引入高速公路结构(highway structure),可以让神经网络(neural network)变得非常深 2、ResNet第一个版本中将ReLU激活函数(activation function)变为y=x的线性函数
15. 什么是梯度爆炸(gradient explosion):
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, optimization, exploding-gradient, rnn;标签: Exploding Gradient, NaN, Training Instability)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688909bc0b9904d6b60e2f | 官方: 是 | 付费: 否
答案:
答案误差梯度(error gradient)是神经网络训练过程中计算的方向和数量,用于以正确的方向和合适的量更新网络权重(weight)。在深层网络或循环神经网络(recurrent neural network)中,误差梯度可在更新中累积,变成非常大的梯度,然后导致网络权重的大幅更新,并因此使网络变得不稳定。在极端情况下,权重的值变得非常大,甚至于溢出导致NaN值。网络层之间的梯度(值大于1.0)重复相乘导致的指数级增长会产生梯度爆炸。
16. 梯度爆炸会引发什么问题?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, exploding-gradient, mlp, rnn;标签: Exploding Gradient, Instability, NaN Weights, Long Sequences)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 6968890bbc0b9904d6b60fc6 | 官方: 是 | 付费: 否
答案:
答案在深度多层感知机(multilayer perceptron)网络中,梯度爆炸会引起网络不稳定,最好的结果是无法从训练数据中学习,而最坏的结果是出现无法再更新的NaN权重值。梯度爆炸导致学习过程不稳定。在循环神经网络中,梯度爆炸会导致网络不稳定,无法利用训练数据学习,最好的结果是网络无法学习长的输入序列(input sequence)数据。
17. GRU是什么?GRU对LSTM做了哪些改动?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, rnn, gru, lstm, gates;标签: GRU, LSTM, Gates)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688dcfbc0b9904d6b6bb54 | 官方: 是 | 付费: 否
答案:
答案GRU是门控循环单元(Gated Recurrent Units),是循环神经网络(recurrent neural network)的一种。GRU只有两个门(update和reset),LSTM(长短期记忆网络,Long Short-Term Memory)有三个门(forget,input,output),GRU直接将隐藏状态(hidden state)传给下一个单元,而LSTM用记忆单元(memory cell)把隐藏状态包装起来。
18. 为什么更深的网络更好?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, generalization, model-capacity;标签: Depth, Capacity, Generalization)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688dd3bc0b9904d6b6be8b | 官方: 是 | 付费: 否
答案:
答案深度更深一般参数(parameter)更多,表示模型的搜索空间就越大,必须有足够的数据才能更好地刻画出模型在空间上的分布,其泛化能力(generalization ability)就越强。
19. 无监督降维提供的是帮助还是摧毁?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, unsupervised-learning, dimensionality-reduction;标签: Unsupervised, Dimensionality Reduction)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688ddbbc0b9904d6b6c53b | 官方: 是 | 付费: 否
答案:
答案有益
20. 损失函数(loss function)重要吗?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, loss-function, optimization;标签: Loss Function)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69688de2bc0b9904d6b6ca34 | 官方: 是 | 付费: 否
答案:
答案损失函数是用来估量你模型的预测值f(x)与真实值y的不一致程度,除去刚性对照外,所有的损失都有类似的表现。损失函数是标签(label)与逻辑(logic)之间的区别,提升到四次幂,其性能要比其他差一些。损失函数的选择对最终结果没有实质影响,这也许不足为奇,因为这些损失函数非常相似。
21. 常见的减轻过拟合(overfitting)的方法有哪些?
- 知识点: 数据工程与数据科学/AI (主题: general-ml, regularization;标签: overfitting, regularization, early stopping, dropout)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f13d5120fcc159115c5a5 | 官方: 是 | 付费: 否
答案:
答案我会按“数据、模型、训练、验证”四类回答:
- 数据:更多数据/数据增强(NLP 可做随机 mask、同义改写)、清洗噪声;合理划分 train/val/test,避免泄漏。
- 模型:降低模型容量(更小网络/剪枝/早停);加入正则(L2/L1);Dropout。
- 训练:Early stopping、学习率衰减、权重衰减(weight decay);对比学习/label smoothing 抑制过拟合。
- 集成:Bagging、模型集成、交叉验证选择超参。
22. L1 和 L2 正则(regularization)的区别是什么?分别更适合什么场景?
- 知识点: 数据工程与数据科学/AI (主题: regularization;标签: L1, L2, elastic net, weight decay)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f13d5120fcc159115c5a8 | 官方: 是 | 付费: 否
答案:
答案L1 是对权重(weight)绝对值求和(稀疏倾向),L2 是对权重平方求和(平滑收缩)。
- L1:会把一部分权重压到 0,具有特征选择效果,适合高维稀疏特征(如 one-hot/文本)或希望模型可解释。
- L2:倾向于让权重变小但不为 0,训练更稳定,适合大多数连续特征与深度模型(也对应 weight decay 的常见形式)。
实际工程里也常用 Elastic Net(L1+L2)折中稀疏与稳定性。
23. Dropout 是怎么工作的?训练与推理阶段分别做什么?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, regularization;标签: dropout, generalization, inverted dropout)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f13d5120fcc159115c5af | 官方: 是 | 付费: 否
答案:
答案Dropout 的核心是训练时随机“丢弃”一部分神经元(neuron)输出,迫使网络不要过度依赖某些特征,从而提升泛化(generalization)。
- 训练阶段:以概率 p 将某些激活置 0;常用 inverted dropout,会把保留的激活除以 (1-p) 来保持期望不变。
- 推理阶段:不再随机丢弃,直接用完整网络;因为训练时做过缩放,推理无需再缩放。
可以把它理解为“很多子网络的集成”,对过拟合有帮助。
24. 使用 ggplot 绘制 ‘price’ 与 ‘carat’ 的散点图。要求:‘price’ 在 y 轴,‘carat’ 在 x 轴,点的颜色由 ‘cut’ 决定。
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: data-science, r, ggplot2;标签: ggplot2, scatter-plot, diamonds)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f28c6120fcc159118f282 | 官方: 是 | 付费: 否
答案:
答案我们将使用 ggplot 来实现散点图(scatter plot)。
ggplot 基于数据可视化的语法(grammar of data visualization),可以让我们把多层(layers)叠加在一起。
因此,我们会先从数据层(data layer)开始,然后在其上叠加美学映射层(aesthetic layer)。最后,在美学层之上叠加几何对象层(geometry layer)。
代码:
ggplot(data=diamonds, aes(x=carat, y=price, col=cut)) + geom_point()
ggplot(data=diamonds, aes(x=carat, y=price, col=cut)) + geom_point()
25. 在 ‘iris’ 数据集中引入 25% 的缺失值(missing value),并对 ‘Sepal.Length’ 列用 ‘mean’ 进行插补(imputation),对 ‘Petal.Length’ 列用 ‘median’ 进行插补。
- 知识点: 数据工程与数据科学/AI / 操作系统与网络 / 编程语言基础 (主题: data-science, r, data-cleaning;标签: missing-values, imputation, iris, missForest, Hmisc)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f28c6120fcc159118f285 | 官方: 是 | 付费: 否
答案:
答案为了引入缺失值,我们将使用 missForest 包:
使用 prodNA 函数,我们将引入 25% 的缺失值:
为了将 ‘Sepal.Length’ 列用 ‘mean(均值)’ 插补(imputation)、将 ‘Petal.Length’ 列用 ‘median(中位数)’ 插补,我们将使用 Hmisc 包(package)以及 impute 函数(function):
library(missForest)
library(missForest)
Iris.mis<-prodNA(iris,noNA=0.25)
Iris.mis<-prodNA(iris,noNA=0.25)
library(Hmisc)
library(Hmisc)
iris.mis$Sepal.Length<-with(iris.mis, impute(Sepal.Length,mean) )
iris.mis$Sepal.Length<-with(iris.mis, impute(Sepal.Length,mean) )
iris.mis$Petal.Length<-with(iris.mis, impute(Petal.Length,median) )
iris.mis$Petal.Length<-with(iris.mis, impute(Petal.Length,median) )
26. 计算所构建模型的 RMSE(Root Mean Squared Error,均方根误差)值。
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: data-science, r, model-evaluation;标签: rmse, regression, metrics)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f2c58120fcc1591198d0b | 官方: 是 | 付费: 否
答案:
答案When we build a regression model(回归模型), it predicts certain y values(y值) associated with the
given x values, but there is always an error associated with this prediction. So, to get an
鉴于给定的x值,但这一预测总是伴随误差。因此,为了得到
estimate of the average error in prediction, RMSE is used.
预测中平均误差的估计值,使用RMSE。
Code:
代码:
cbind(Actual=test$mpg, predicted=pred_mtcars)->final_data
cbind(Actual=test$mpg, predicted=pred_mtcars)->final_data
as.data. frame(final_data)->final_dataerror<—(final_data$Actual-final_data$Prediction)
as.data. frame(final_data)->final_dataerror<—(final_data$Actual-final_data$Prediction)
cbind(final_data, error)->final_data
cbind(final_data, error)->final_data
sqrt (mean(final_data$error)*2)• EAS
sqrt (mean(final_data$error)*2)• EAS
解释:
We have the actual and the predicted values. We will bind both of them into a single
我们拥有实际值和预测值。我们将它们绑定到一个单一的
dataframe. For that, we will use the cbind function:
数据框中。为此,我们将使用cbind函数:
cbind(Actual=test$mpg, predicted=pred_mtcars)->final_dataOur actual values are present in the mpg column from the test set, and our predicted values arestored in the pred_mtcars object which we have created in the previous question.
cbind(Actual=test$mpg, predicted=pred_mtcars)->final_data我们的实际值来自测试集中的mpg列,而我们的预测值存储在之前问题中创建的pred_mtcars对象中。
Hence, we will create this new column and name the column actual. Similarly, we will create
因此,我们将创建这一新列并将其命名为“实际”。类似地,我们将创建
another column and name it predicted which will have predicted values and then store the
另一列并将其命名为“预测”,该列将包含预测值,然后将预测值存储到
predicted values in the new object which is final_data.
名为final_data的新对象中。
After that, we will convert a matrix into a dataframe. So, we will use
之后,我们将矩阵转换为数据框。因此,我们将使用
the as.data.frame function and convert this object (predicted values) into a dataframe:
as.data.frame函数并将此对象(预测值)转换为数据框:
as.data.frame(final_data)->final_data eve eg® @ •
as.data.frame(final_data)->final_data eve eg® @ •
We will pass this object which is final_data and store the result in final_data again.
我们将传递此对象final_data,并将结果再次存储在final_data中。
We will then calculate the error in prediction for each of the records by subtracting the
然后,我们将通过从实际值中减去预测值来计算每条记录预测的误差:
predicted values from the actual values:error<-(final_data$Actual-final_data$Prediction)Then, store this result on a new object and name that object as error.
predicted values from the actual values:error<-(final_data$Actual-final_data$Prediction)Then, store this result on a new object and name that object as error.
After this, we will bind this error calculated to the same final_data dataframe:
之后,我们将计算出的误差绑定到同一个 final_data 数据框:
cbind(final_data,error)->final_data //binding error object to this final_dataHere, we bind the error object to this final_data, and store this into final_data again.
cbind(final_data,error)->final_data //binding error object to this final_dataHere, we bind the error object to this final_data, and store this into final_data again.
Calculating RMSE:
计算 RMSE:
Sqrt(mean(final_data$error)*2)• EASR
Sqrt(mean(final_data$error)*2)• EASR
Hina |
Hina |
输出:
[1] 4.334423注意:RMSE(Root Mean Squared Error,均方根误差)的值越低,模型越好。
27. 梯度下降(Gradient Descent)的基本更新公式是什么?如何选择学习率(learning rate)?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, optimization, gradient-descent;标签: learning rate, optimizer)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f2cc9120fcc1591199f26 | 官方: 是 | 付费: 否
答案:
答案对目标函数 J(θ),梯度下降(Gradient Descent)的更新为:θ ← θ − η · ∇θ J(θ),其中 η 为学习率(learning rate)。学习率过大会震荡甚至发散,过小会收敛慢。实践中可用:学习率预热(warm-up)+衰减(decay)(step(步进)/cosine(余弦))、自适应优化器(adaptive optimizer)(Adam/Adagrad(自适应梯度算法))、或通过验证集(validation set)做网格/范围搜索;并结合梯度裁剪(gradient clipping)、批大小(batch size)等一起调参。
28. 什么是混淆矩阵(Confusion Matrix)?
- 知识点: 数据工程与数据科学/AI / 算法与数据结构 (主题: machine-learning, evaluation;标签: confusion-matrix, classification-metrics)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f3632120fcc15911ab1e1 | 官方: 是 | 付费: 否
答案:
答案混淆矩阵(Confusion Matrix)是一张用于评估模型性能的表。
它将真实值和预测值汇总在一个 2×2 的矩阵中。
预测结果
真阳性(True Positive):真实值为真且预测值也为真。
且预测值也为真的记录,即真阳性(True Positive)。
假阴性(False Negative):真实值为真但预测值为假。
假阳性(False Positive):真实值为假但预测值为真。
真阴性(True Negative):真实值为假且预测值也为假。
为假(Negative)。
因此,正确预测数量等于真阳性(True Positive)与真阴性(True Negative)的总和。
所有的真阳性(True Positive)与真阴性(True Negative)。
这就是混淆矩阵(Confusion Matrix)的工作方式。
29. 什么是数据仓库(Data Warehousing)?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse, etl;标签: 数据仓库, ETL/ELT, BI分析)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 696f3cde120fcc15911c6d2f | 官方: 是 | 付费: 否
答案:
答案数据仓库(Data Warehouse)是面向分析的集中式数据存储,用于把多个业务系统的数据通过ETL(Extract, Transform, Load)/ELT(Extract, Load, Transform)汇聚、清洗、建模,形成可用于报表、BI分析(Business Intelligence)、机器学习(Machine Learning)与决策支持的数据资产。它强调历史数据、主题建模、可追溯与一致口径,通常与OLTP(Online Transaction Processing)系统分离以避免相互影响。
30. 如何在 Pandas 中合并两个 DataFrame?merge 和 concat 有什么区别?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: python, pandas;标签: Pandas, merge, concat)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772662a39c9c5c3a89fe47 | 官方: 是 | 付费: 否
答案:
答案常见方式是 merge() 与 concat()。merge 类似 SQL JOIN(Structured Query Language Join),基于某些键列或索引做内/左/右/全连接;concat 更像“拼接”,沿行或列方向把对象直接堆叠在一起(axis=0/1),通常不做键匹配,更多依赖索引对齐。选择时看需求:需要按 key 关联用 merge;需要纵向追加或横向拼表用 concat。
31. 如何创建具有指定形状和数据类型的 NumPy 数组?给一个示例。
- 知识点: 数据工程与数据科学/AI / 算法与数据结构 / 编程语言基础 (主题: python, numpy;标签: NumPy, dtype, Array Shape)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772662a39c9c5c3a89fe54 | 官方: 是 | 付费: 否
答案:
答案可以用 np.array/np.zeros/np.ones/np.full 等创建数组,并用 dtype 指定数据类型。例如创建 2x3 的 int32:先准备二维列表再 np.array(data, dtype=np.int32)。如果需要直接按形状生成,可用 np.zeros((2,3), dtype=np.int32) 创建全 0 数组,然后再赋值或运算。
32. 如何处理 Pandas DataFrame 中的缺失值(NaN)?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: python, pandas, data-cleaning;标签: NaN, Imputation, dropna, fillna)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772662a39c9c5c3a89fe58 | 官方: 是 | 付费: 否
答案:
答案常见做法:用 dropna() 删除含缺失值的行/列;用 fillna() 以常量、均值/中位数、前向填充(ffill)或后向填充(bfill)补全;也可用 interpolate() 做插值(适合时间序列或连续变量)。选择策略取决于缺失机制与业务含义:既要减少信息损失,也要避免引入偏差。
33. 什么是数据挖掘中的聚类(Clustering)?它与分类(Classification)有何不同?
- 知识点: 数据工程与数据科学/AI (主题: data-mining, machine-learning;标签: Clustering, Classification, Supervised vs Unsupervised)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772665a39c9c5c3a8a02a9 | 官方: 是 | 付费: 否
答案:
答案聚类是无监督学习方法(Unsupervised Learning),目标是在没有标签的情况下把相似样本分到同一组,用于发现数据内在结构(如用户分群)。分类是监督学习(Supervised Learning),训练数据有标签,目标是学习决策边界并预测新样本类别。简言之:聚类“找群组”,分类“学规则+做预测”;两者在数据前提、评估方式与应用场景上都不同。
34. 监督学习(Supervised Learning)和无监督学习(Unsupervised Learning)有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, supervised, unsupervised;标签: Supervised, Unsupervised, Clustering)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772f7ea39c9c5c3a8ba24d | 官方: 是 | 付费: 否
答案:
答案监督学习(Supervised Learning)使用带标签数据训练,目标是预测标签(分类/回归),评估通常基于预测与真实标签的差距;无监督学习(Unsupervised Learning)使用无标签数据,目标是发现结构或模式(聚类、降维、异常检测),评估更依赖业务解释与内部指标。简单理解:监督学习回答“给我输入,输出应该是什么”;无监督学习回答“数据自己长成了哪些群与结构”。
35. 解释机器学习中的过拟合概念。
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, modeling;标签: Overfitting, Generalization, Regularization)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772f82a39c9c5c3a8ba5c4 | 官方: 是 | 付费: 否
答案:
答案过拟合指模型在训练集上学得“过于具体”,把噪声当规律,导致训练表现很好但对新数据泛化很差。常见原因包括模型过复杂、特征过多、样本不足或数据泄漏。缓解手段包括:正则化、简化模型、交叉验证(Cross-Validation)、数据增强(Data Augmentation)、早停(Early Stopping)、Dropout/剪枝、以及增加数据量与提升数据质量。
36. 机器学习中交叉验证的目的是什么?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, evaluation;标签: Cross Validation, K-Fold, Model Selection)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772f86a39c9c5c3a8bab48 | 官方: 是 | 付费: 否
答案:
答案交叉验证(Cross-Validation)用于更可靠地估计模型泛化能力,避免一次划分训练/验证带来的偶然性。常见 k 折交叉验证(k-Fold Cross-Validation)把数据分成 k 份轮流做验证集,最终取平均表现,用于模型选择与超参调优。它能减少对单一验证集的过度拟合,尤其在数据量不大时非常重要。
37. 用于评估分类模型的不同评估指标有哪些?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, evaluation;标签: Accuracy, Precision, Recall, F1, AUC)
- 类型: technical | 难度: easy | 子类型:
- 分类: fullstack
- id: 69772f8ca39c9c5c3a8bb1ef | 官方: 是 | 付费: 否
答案:
答案常见指标包括:Accuracy(准确率)、Precision(精确率)、Recall(召回率)、F1(精确率与召回率的调和平均)、ROC-AUC(不同阈值下 TPR/FPR 的综合能力)。类别不平衡时不应只看 Accuracy,通常更关注 Precision/Recall、F1 或 PR-AUC,并结合混淆矩阵(Confusion Matrix)定位错误类型。
38. How can I locate the applications I require?
我如何定位我需要的应用程序?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981de | 官方: 否 | 付费: 否
答案:
You can locate the applications required in the following ways: - You can find applications in each section of the Analytics Gallery by using the context-sensitive Search field.
您可以通过以下方式定位所需的应用程序: - 您可以使用上下文相关的搜索字段在 Analytics Gallery 的每个部分查找应用程序。
- Searching for applications in the Public Gallery returns results in the Public Gallery.
- Searching for applications in your Studio under the Studio tab yields results.
- When you search in a Collection, you'll get a list of all the applications in the Collection. A second search box will appear when you establish a Collection, allowing you to find applications in your Studio and add them to your Collection.
39. What kinds of applications can you include in a collection? What are the different types of users that can be added to a collection?
集合中可以包含哪些类型的应用程序?可以添加到集合中的用户有哪些不同类型?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981e2 | 官方: 否 | 付费: 否
答案:
A Collection can only contain applications that have been published in the Data Artisan's Studio. Applications created in the Data Artisan's Studio may be shared in the Public Gallery (at their discretion). However, applications from other Studios that were published in the Public Gallery cannot be added to a Collection.
集合只能包含已在 Data Artisan's Studio 中发布的应用程序。在 Data Artisan's Studio 中创建的应用程序可以(由创建者自行决定)在公共画廊中共享。但是,从其他工作室发布到公共画廊的应用程序不能添加到集合中。
A Collection can contain Data Artisans, Members, and Viewers. You can even add someone's email address who hasn't visited the Analytics Gallery yet.
集合可以包含数据工匠、成员和查看者。您甚至可以添加尚未访问过 Analytics Gallery 的人员的电子邮件地址。
40. Are the users in a collection notified when we add a new application to that collection?
当我们向集合添加新应用程序时,集合中的用户会收到通知吗?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981e8 | 官方: 否 | 付费: 否
答案:
Yes, the users in a collection are notified when we add a new application to that collection.
是的,当我们向集合添加新应用程序时,集合中的用户会收到通知。
41. What's the difference between the Cross Tab and Transpose tools?
Cross Tab 和 Transpose 工具之间有何区别?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981eb | 官方: 否 | 付费: 否
答案:
While the Transpose and CrossTab tools both change the orientation of your data, their behaviour is completely contradictory.
虽然 Transpose 和 CrossTab 工具都会改变数据的方向,但它们的行为完全相反。
The Transpose tool transforms horizontal data into vertical data. By summarizing the data on a grouping field, the CrossTab achieves the opposite, pivoting vertical data to the horizontal axis.
转置工具将横向数据转换为纵向数据。通过按分组字段对数据进行汇总,交叉表则实现相反的效果,即将纵向数据透视到横向轴上。
42. What is the best way to save an expression?
保存表达式的最佳方式是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981ee | 官方: 否 | 付费: 否
答案:
Expressions can be saved and reused without having to generate them from the start. Using a combination of selecting variables and inserting them into functions, create your expression. Click the Saved Expression tab once you're satisfied with the formulated expression. Select the Save button and give your expression a name. Your expression has been saved and will be used again in the future.
表达式可以保存并重复使用,无需从头开始生成。通过选择变量并将其插入到函数中的组合来创建您的表达式。一旦您对构建的表达式感到满意,请点击“已保存表达式”选项卡。选择“保存”按钮并为您的表达式命名。您的表达式已保存,将来可以再次使用。
43. How do you edit or remove a word or a character?
如何编辑或删除一个单词或字符?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981f2 | 官方: 否 | 付费: 否
答案:
Select Open Sample –> Basic Samples –> Data Problem and Solution Flexibility from the File menu.
从“文件”菜单中选择“打开示例” –> “基本示例” –> “数据问题与解决方案灵活性”。
44. What are the steps for sharing an application via social media or email?
通过社交媒体或电子邮件共享应用程序的步骤是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981f7 | 官方: 否 | 付费: 否
答案:
To share an application via social media or email, you must first view the application's details by clicking on it.
要通过社交媒体或电子邮件共享应用程序,您必须首先通过点击应用程序查看其详细信息。
Then, on the Distribute option, you can share the app on other channels such as Twitter, email, Google+, and Facebook.
然后,在“分发”选项上,您可以在其他渠道(如Twitter、电子邮件、Google+和Facebook)上共享该应用程序。
45. What is the difference between Alteryx and standard ETL tools?
Alteryx与标准ETL工具之间有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b981fa | 官方: 否 | 付费: 否
答案:
The types of data that traditional ETL (Extract, Transform, and Load) systems may copy from one or more sources to the target system can be limited. Alteryx's unique metadata loader technology, on the other hand, allows users to custom construct metadata loaders to properly copy over virtually any form of data, giving it a distinct advantage over other ETL tools. Of course, Alteryx includes a number of metadata loaders that are already pre-built and ready to connect into clients' systems.
传统的ETL(抽取、转换和加载)系统可以从一个或多个源复制到目标系统的数据类型可能是有限的。另一方面,Alteryx独特的元数据加载器技术允许用户自定义构建元数据加载器,以正确复制几乎任何形式的数据,这使其相比其他ETL工具具有明显的优势。当然,Alteryx包含了许多预先构建好的元数据加载器,可直接连接到客户的系统。
46. What is the mechanism for determining the number of memberships to be distributed as a Data Artisan?
作为数据工匠,确定要分发的会员数量的机制是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b3792b58d557c902b981fd | 官方: 否 | 付费: 否
答案:
- To do so, you must first go to Settings by clicking on the user's name.
- Select Studio from the drop-down menu.
- Then look for "Memberships available to distribute" in the members' area.
47. How do you modify the field type?
如何修改字段类型?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98200 | 官方: 否 | 付费: 否
答案:
The best way to modify the field type is to use the Formula tool. The formula tool gives you more control over custom conversions.
修改字段类型的最佳方式是使用公式工具。公式工具为自定义转换提供更多的控制。
The Select tool, or one of the many tools with an embedded select, is the next best place to modify the field type. As a result, you can modify the type of field there as well. Join, Join Multiple, Append Fields, Spatial Match, and Find Nearest are all tools that have an embedded select.
选择工具,或许多带有嵌入式选择功能的工具之一,是修改字段类型的次佳选择。因此,您也可以在那里修改字段类型。连接、多重连接、追加字段、空间匹配和查找最近点都是带有嵌入式选择功能的工具。
48. What Types Of Tabular And Spatial Data Can Be Produced By An Application?
应用程序可以生成哪些类型的表格和空间数据?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98203 | 官方: 否 | 付费: 否
答案:
The application may generate CSV, MDB/ACCDB, DBF, FlatFile, MID/ MIF, SHP, TAB, YXDB, and/or KML files, depending on how it was constructed.
根据应用程序的构建方式,它可以生成CSV、MDB/ACCDB、DBF、平面文件、MID/MIF、SHP、TAB、YXDB和/或KML文件。
49. What are the various uses of Alteryx?
Alteryx 有哪些不同的用途?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98206 | 官方: 否 | 付费: 否
答案:
Alteryx is a tool that allows you to access, manipulate, analyse, and output data. Alteryx is often used to perform and automate data processes more rapidly and efficiently. The processes can be of various sizes and levels of complexity, and they might include: - Data Combination and Manipulation in spreadsheets: Alteryx can perform VLOOKUPs, SUMIF, COUNTIF, INDEX MATCH, pivot tables, and other complex Excel data manipulation. Alteryx can handle much larger datasets than Excel, is frequently faster, and the process is far easier to see and understand. People who are good at manipulating data in Excel should take Alteryx seriously.
Alteryx 是一款允许你访问、操作、分析和输出数据的工具。Alteryx 通常用于更快速、更高效地执行和自动化数据处理流程。这些流程可以具有不同规模和复杂度,可能包括:- 电子表格中的数据组合和操作:Alteryx 可以执行 VLOOKUP、SUMIF、COUNTIF、INDEX MATCH、数据透视表以及其他复杂的 Excel 数据操作。Alteryx 能处理比 Excel 大得多的数据集,通常速度更快,而且流程更容易查看和理解。擅长在 Excel 中操作数据的人应该认真对待 Alteryx。
- SQL Development and Database Access: Alteryx has a wide range of database connections and functionalities, including those that aren't found in most databases. Alteryx can handle data from a variety of databases and database categories. It enables users to perform tasks such as filtering, sorting, calculating, and so on, much like they would with an ETL tool or SQL. Alteryx makes this capability available to a wider range of people because it is easier to learn than SQL and offers a defined process flow that practically anyone can follow. Alteryx can either finish the work in the engine or push it to the database. Predictive analytics, spatial analysis, reporting, and other non-traditional database functions are also offered.
- API, cloud, and hybrid access: Alteryx can read and write data from a wide range of sources, including databases, REST APIs, files, and more (with the correct permissions). Once a workflow has been published, you can start it by calling it with a REST API.
- Dashboards and Reports: Most data-related operations produce a report, chart, or dashboard as a result of their work. Reports and dashboards can be created with the built-in capabilities of Alteryx. It also frequently sends data to databases, reporting tools, and visualization tools that are widely used within a company. Tableau, Create BI, Qlik, ThoughtSpot, Cognos, MicroStrategy, Business Objects, and nearly any other tool within an enterprise can use Alteryx to power reports and dashboards.
- Geospatial analysis of Data: Distances and locations are important factors that are difficult to alter. Alteryx's drag-and-drop tools allow users to geocode, plot, and map locales, customers, competitors, and anything else with a location (employee, truck, pipeline, etc.). Alteryx may use custom polygons to organise things, calculate distances and driving times, find the closest object to a location (for example, the closest vehicle to a distribution facility), and conduct research utilising geographical data. Users can export their geographic studies in a variety of formats, including ESRI, GeoJSON, Tableau and others.
50. What does it mean to be a Data Artisan?
成为数据工匠(Data Artisan)意味着什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98209 | 官方: 否 | 付费: 否
答案:
Data Artisan refers to the user who creates analytic applications using the Alteryx designer desktop. The data artisan then shares the analytic apps in the Alteryx Analytics Gallery, either privately or publicly. A Data Artisan has the same rights as a Member.
数据工匠(Data Artisan)指的是使用 Alteryx Designer 桌面工具创建分析应用程序的用户。然后,数据工匠会在 Alteryx Analytics Gallery 中私下或公开分享这些分析应用。数据工匠拥有与成员(Member)相同的权限。
51. Explain Alteryx Server.
解释一下 Alteryx Server。
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9820c | 官方: 否 | 付费: 否
答案:
Alteryx Server is a flexible and secure architecture that is tailored to your company's governance plan. Enterprise-grade security is provided with built-in authentication, integrated SSO, and a granular permissions mechanism. It enables businesses to deal with their complicated analytic issues while also sharing the results with other departments and business decision-makers.
Alteryx Server 是一种灵活且安全的架构,针对你公司的治理计划量身定制。它通过内置认证、集成 SSO 和精细权限机制提供企业级安全性。它使企业能够处理复杂的分析问题,同时与其他部门和业务决策者分享结果。
It has a gallery for users to share their work, a scheduling engine for automating data loads, version control, and master data management tools, and it even allows non-Alteryx users to participate by allowing them to run workflows and analytic apps straight from their web browser!
它拥有一个供用户分享工作的画廊、一个用于自动化数据加载的调度引擎、版本控制和主数据管理工具,甚至允许非 Alteryx 用户通过其网页浏览器直接运行工作流和分析应用来参与其中!
52. What is an Alteryx Designer?
什么是 Alteryx Designer?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9820f | 官方: 否 | 付费: 否
答案:
With code-friendly tools, Alteryx Designer provides analysts and data scientists with a self-service data analysis experience to unlock insights from practically any data source. You can easily profile, prepare, and mix all of your data using a repeatable drag-and-drop approach without having to write SQL code or custom scripts.
借助对代码友好的工具,Alteryx Designer 为分析师和数据科学家提供自助式数据分析体验,以从几乎任何数据源中获取洞察。你可以使用可重复的拖放方法轻松地分析、准备和混合所有数据,而无需编写 SQL 代码或自定义脚本。
Using the Alteryx Designer desktop tool, users may perform predictive analytics, spatial analytics, reporting, and visualisation, as well as construct analytical applications, through a single workflow. Alteryx Designer works with a wide range of data sources, including data warehouses, ERP and cloud-based systems, files, social media data, and analytics. You can deliver visual insights to your colleagues using a variety of sophisticated layouts to encourage more investigation and a deeper understanding of analyses. You can build customised reports in a variety of forms that include maps, data tables, text, photos, and graphs.
使用 Alteryx Designer 桌面工具,用户可以通过单个工作流执行预测分析、空间分析、报告和可视化,以及构建分析应用程序。Alteryx Designer 支持多种数据源,包括数据仓库、ERP 和基于云的系统、文件、社交媒体数据和分析数据。你可以使用多种高级布局向同事提供可视化洞察,以鼓励更多调查和对分析的更深理解。你可以构建各种形式的定制报告,包括地图、数据表、文本、照片和图表。
53. What are some of Alteryx Designer most important tools and capabilities?
Alteryx Designer 最重要的一些工具和功能是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98212 | 官方: 否 | 付费: 否
答案:
The Alteryx Designer is a user-friendly interface that enables users to create repeatable workflows, link data to many platforms, blend, cleanse, and provide analytics outputs.
Alteryx Designer 是一个用户友好的界面,使用户能够创建可重复的工作流、将数据链接到多个平台、混合和清理数据,并提供分析输出。
The Alteryx Designer comes with the following tools: - Input/Output: It accesses and provides data from a variety of sources, including a local desktop, a relational database, the cloud, and third-party systems, in a variety of forms and sources.
Alteryx Designer 附带以下工具:- 输入/输出:它从各种来源(包括本地桌面、关系数据库、云和第三方系统)以多种形式访问和提供数据。
- Preparation: It employs a set of drag-and-drop tools to make it easier to prepare data for analysis or downstream activities, obviating the requirement for SQL code and complicated calculations.
- Join: Working with several data sources doesn't have to be difficult. You can merge numerous data sources using a variety of methods, independent of their structure or format.
- Predictive: Get access to over 30 preconfigured tools for predictive analytics, grouping, and forecasting to help analysts with the predictive analytics process.
- Geospatial: Geospatial data may provide a wealth of information; use location-based data to make better decisions and gain a better understanding of topics such as trade regions, drive-time analysis, and more.
- Investigation: Analysts must first understand the intricacies of the data before proceeding with a technique or analysis.
- Parse and Transform: Data comes in a variety of shapes and formats, and it's common to have to restructure and reshape it before it can be evaluated. Users can use parsing and transformation tools to convert data into the format they need for further investigation.
54. What Is a Viewer and a Member?
什么是查看者(Viewer)和成员(Member)?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98215 | 官方: 否 | 付费: 否
答案:
- Viewer: A Viewer is a free Analytics Gallery user. All applications published in the Public Gallery can be run by a Viewer.
- Member: A Member is a user who has access to workflows that are shared privately via Collections and can run them. A Member is a user who has access to workflows that are shared privately via Collections and can run them.
55. What is the Analytics Gallery, and what does it do?
什么是 Analytics Gallery,它有什么作用?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98218 | 官方: 否 | 付费: 否
答案:
The Analytics Gallery is a publicly accessible web service that allows users to publish, securely share, and execute cloud-based applications. It enables a company to process massive datasets in a single, centralised environment.
Analytics Gallery 是一项可公开访问的 Web 服务,允许用户发布、安全共享和执行基于云的应用程序。它使公司能够在单一、集中的环境中处理海量数据集。
You may use the Alteryx Analytics Gallery to: - Consume analytic applications and macros using a highly sociable, intuitive, and engaging environment.
您可以使用 Alteryx Analytics Gallery 来:- 在高度社交化、直观且引人入胜的环境中消费分析应用程序和宏。
- Share analytic tools and macros with coworkers through Email and social media sites like Twitter, Facebook, and Google+.
- Publish newly updated analytic applications and macros without long waits or usage restrictions.
The Alteryx Analytics Gallery presents advanced analytics in a user-friendly and engaging manner.
Alteryx Analytics Gallery 以用户友好且引人入胜的方式呈现高级分析。
56. What browsers are compatible with Alteryx Analytics Gallery?
哪些浏览器与 Alteryx Analytics Gallery 兼容?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9821b | 官方: 否 | 付费: 否
答案:
The Alteryx Analytics Gallery is supported by the following browsers: - Mozilla Firefox
Alteryx Analytics Gallery 支持以下浏览器:- Mozilla Firefox
- Safari
- Google Chrome
- Microsoft edge
57. What is the definition of private data?
什么是私有数据的定义?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9821e | 官方: 否 | 付费: 否
答案:
Private Data is associated with the Alteryx Designer Desktop License and includes a variety of data sets such as demographics, business lists, consumer lists, and psychographic data.
私有数据与 Alteryx Designer 桌面许可证相关联,包括多种数据集,如人口统计数据、商业列表、消费者列表和心理特征数据。
58. Define the following Alteryx products- Alteryx Connect, Alteryx Promote, Alteryx Location and Business Insight.
定义以下 Alteryx 产品- Alteryx Connect、Alteryx Promote、Alteryx Location and Business Insight。
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98221 | 官方: 否 | 付费: 否
答案:
Alteryx Connect is a collaborative, data exploration, and data cataloging platform for the workplace that transforms how information professionals spend their time in the organization discovering new insights. Alteryx Connect gives analysts and line-of-business users the tools they need to find, analyse, trust, and collaborate on the data in their organisation quickly and effortlessly.
Alteryx Connect 是一个面向工作场所的协作式数据探索和数据编目平台,它改变了信息专业人员在组织中花费时间发现新见解的方式。Alteryx Connect 为分析师和业务线用户提供了快速、轻松地查找、分析、信任和协作处理组织中数据所需的工具。
Alteryx Promote makes it easier and faster to create, deploy, and manage predictive models and real-time decision APIs. Alteryx Promote is an end-to-end data science model production solution that enables data scientists and analytics teams to design, manage, and deploy predictive models to production faster—and more reliably—than ever before.
Alteryx Promote 使得创建、部署和管理预测模型及实时决策 API 更加容易和快速。Alteryx Promote 是一个端到端的数据科学模型生产解决方案,使数据科学家和分析团队能够比以往更快、更可靠地设计、管理和部署预测模型到生产环境。
Alteryx Location and Business Insights are prepackaged datasets from recognised market vendors that allow you to turn any routine research into something spectacular in seconds. Drag and drop tools let you combine and analyse your internal data with these important datasets to quickly reveal the crucial location, customer, and business insights without requiring advanced knowledge.
Alteryx Location and Business Insights 是来自知名市场供应商的预打包数据集,允许您将任何例行研究在几秒钟内变成非凡成果。通过拖放工具,您可以将这些重要数据集与内部数据结合并进行分析,快速揭示关键的位置、客户和商业见解,而无需高级知识。
59. What are the features provided by Alteryx?
Alteryx 提供哪些功能?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98224 | 官方: 否 | 付费: 否
答案:
Data blending, predictive analysis, ad hoc analysis, ad hoc reporting, third-party integration, spatial analysis, profit analysis, mapping, trend indicators, interactive visualisations, automatic scheduled reporting, customised dashboards, and Online Analytical Processing (OLAP) are just a few of the features available in Alteryx.
数据混合、预测分析、临时分析、临时报告、第三方集成、空间分析、利润分析、映射、趋势指标、交互式可视化、自动定时报告、定制仪表板和在线分析处理(OLAP)只是 Alteryx 提供的部分功能。
60. What are the advantages and disadvantages of using an Alteryx Designer?
使用 Alteryx Designer 有哪些优点和缺点?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98227 | 官方: 否 | 付费: 否
答案:
The Alteryx Designer's advantages and disadvantages are as follows:
Alteryx Designer 的优点和缺点如下:
Advantages: - Alteryx offers incredible mixing capabilities.
优点:- Alteryx 提供了惊人的混合能力。
- Alteryx is compatible with the majority of popular databases and documents available today.
- Alteryx is the most popular ETL tool on the market for extracting scene data (TDE)
- Alteryx isn't only an ETL tool; it's also used to conduct a variety of investigations on your data.
- Alteryx seamlessly integrates R and can be used to visualise data reports in advance.
Alteryx can also be used to create reports with a limited number of channels.
Disadvantages: - While Alteryx regularly produces a scene information extract, it is unable to examine a comparative concentration.缺点:- 虽然 Alteryx 定期生成场景信息提取,但它无法检查相对集中度。
- For exceptional characters, Alteryx isn't very helpful.
- Alteryx is unreliable and frequently fails when a large number of clients access the same work process on the server.
61. Why would an Organization use Alteryx?
为什么组织会使用 Alteryx?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9822a | 官方: 否 | 付费: 否
答案:
Alteryx's solutions are simple to understand. Alteryx enables businesses to quickly prepare, integrate, and analyse data in a specified amount of time, regardless of the level of business intelligence expertise on staff. Alteryx supports the feed of datasets from many platforms and can be used in a similar repetitive approach. Many firms use Alteryx to analyse data quickly without having to write specialized code. Alteryx allows you to access, manipulate, analyse, and output data. Alteryx is often used to perform and automate data operations more rapidly and efficiently.
Alteryx 的解决方案易于理解。Alteryx 使企业能够在指定时间内快速准备、整合和分析数据,无论员工具备何种水平的商业智能专业知识。Alteryx 支持从多个平台获取数据集,并可用于类似的重复性方法。许多公司使用 Alteryx 快速分析数据,而无需编写专业代码。Alteryx 允许你访问、操作、分析和输出数据。Alteryx 通常用于更快、更高效地执行和自动化数据操作。
Alteryx Designer, Alteryx Server, and Alteryx Analytics are the three core components that combine data from external sources and provide complete results. Alteryx is fully integrated, simple to use, and can be used on-premises as well as in the cloud.
Alteryx Designer、Alteryx Server 和 Alteryx Analytics 是三个核心组件,它们结合外部来源的数据并提供完整结果。Alteryx 完全集成、易于使用,既可在本地部署,也可在云端使用。
62. What Kinds Of Reports Can Be Generated By An App?
应用可以生成哪些类型的报告?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9822d | 官方: 否 | 付费: 否
答案:
Depending on how it was developed, the application may output Word, HTML, Excel, and/or PDF files including a variety of text, tables, charts, and maps.
根据其开发方式,应用可以输出 Word、HTML、Excel 和/或 PDF 文件,包括各种文本、表格、图表和地图。
63. What Users Are Allowed To Run Private Apps In A Collection?
在集合中,哪些用户被允许运行私有应用?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98230 | 官方: 否 | 付费: 否
答案:
Viewers (who have been asked to join the Collection) can browse but not run an application in a Collection that has not been shared in the Public Gallery. The application can only be run by Data Artisans and Members.
查看者(已被邀请加入集合)可以浏览但无法运行在公共画廊中未共享的集合中的应用。该应用只能由 Data Artisans 和 Members 运行。
64. What types of entities, in general, would benefit from Alteryx?
一般来说,哪些类型的实体可以从 Alteryx 中受益?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98233 | 官方: 否 | 付费: 否
答案:
Individuals and groups alike require Alteryx in today's unpredictable environment. These people can be freelancers or one-person businesses; anyone who has data requires it because business is a recurring operation. Every organisation, regardless of scale or size, requires innovation, decision-making, and follow-up on plans and strategies, among other things. It is necessary to examine, interpret, and communicate what the numbers are attempting to convey on a regular basis. Alteryx is an automated answer to all of the above concerns, as well as a requirement to shorten turn-around time as much as possible.
在当今不可预测的环境中,个人和团体都需要 Alteryx。这些人可以是自由职业者或一人企业;任何拥有数据的人都需要它,因为商业是一种重复性操作。每个组织,无论规模大小,都需要创新、决策以及计划和战略的跟进等。定期检查、解释和传达数字试图表达的内容是必要的。Alteryx 是解决上述所有问题的自动化答案,也是尽可能缩短周转时间的要求。
65. What is the best way to share an application?
共享应用的最佳方式是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98236 | 官方: 否 | 付费: 否
答案:
The best ways to share an application are: - When a Studio publishes an application, it becomes available to all Data Artisans in that Studio.
共享应用的最佳方式是:- 当 Studio 发布应用时,该应用对该 Studio 中的所有 Data Artisans 可用。
- A Studio application can also be shared with the Public Gallery, where everyone can see it.
- A Collection can also be used to share a Studio application. Everyone who has been added to the Collection has access to it.
66. What is the procedure for changing the name of the Studio?
更改 Studio 名称的程序是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98239 | 官方: 否 | 付费: 否
答案:
You must first click on your User Name and then go to Settings to rename the Studio. Select the Studio Tab from the Settings menu. After that, you must update the Studio Name field with a new name. Then, to save the name, click the Save button.
你必须先点击你的用户名,然后进入设置以重命名 Studio。从设置菜单中选择 Studio 选项卡。之后,你必须用新名称更新 Studio Name 字段。然后,点击保存按钮以保存名称。
67. Is Chained Application Support Available in Alteryx Analytics Gallery?
Alteryx Analytics Gallery 中是否支持链式应用?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9823c | 官方: 否 | 付费: 否
答案:
No, Chained Applications are not supported by Alteryx Analytics Gallery.
不,Alteryx Analytics Gallery 不支持链式应用。
68. Is there a limit to the number of applications a user may add to a collection?
用户可以向集合中添加的应用数量是否有限制?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9823f | 官方: 否 | 付费: 否
答案:
No, users have no constraints when it comes to adding applications to a collection.
不,用户在向集合中添加应用程序时没有任何限制。
69. Is there a limit to how big the application files or data we post in the Alteryx Analytics Gallery can be? What are the options if I want to publish an application with data that is larger than 100MB?
我们在Alteryx Analytics Gallery中发布的应用程序文件或数据大小有限制吗?如果我想发布一个数据大于100MB的应用程序,有哪些选项?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98242 | 官方: 否 | 付费: 否
答案:
Yes, there is a limit on the size of application files and data. The application files should not exceed 100MB in size. To store your data on the cloud, use the Cloud Connector tools in the Designer Desktop.
是的,应用程序文件和数据的大小有限制。应用程序文件的大小不应超过100MB。要将数据存储在云端,请使用Designer Desktop中的Cloud Connector工具。
70. What is the best way for a Data Artisan to distribute an application privately?
对于Data Artisan来说,私下分发应用程序的最佳方式是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98245 | 官方: 否 | 付费: 否
答案:
First, we'll use the Designer Desktop to publish the app to our private Studio. After that, we must add the user to the collection and then insert the application into the collection.
首先,我们将使用Designer Desktop将应用程序发布到我们的私有Studio。之后,我们必须将用户添加到集合中,然后将应用程序插入到集合中。
71. What Is The Best Way To Run An App?
运行应用程序的最佳方式是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b98248 | 官方: 否 | 付费: 否
答案:
- To access an application's details, click the title and then the Run button; or simply click the icon.
- Configure the app to meet your requirements. You may be asked to enter an address for geocoding, a customer file for demographic research, or data from a list of options relevant to your business, depending on the programme.
- At the bottom of the application, click the Run button.
72. What Are the Requirements for publishing Apps in the Analytics Gallery?
在Analytics Gallery中发布应用程序的要求是什么?
- 知识点: 数据工程与数据科学/AI (主题: alteryx, data-analytics;标签: interviewbit, alteryx, topic-specific, data-analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3792b58d557c902b9824b | 官方: 否 | 付费: 否
答案:
- Applications are published into a private Studio from the Alteryx Designer Desktop.
- For Designer Desktop license customers, a Studio is automatically generated.
- Designer Desktop trial customers can create a Studio with a 30-Day Studio free trial.
- A Data Artisan is a user who has the Designer Desktop and a private Studio.
73. What are the misconceptions about Artificial Intelligence?
关于人工智能有哪些误解?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99477 | 官方: 否 | 付费: 否
答案:
Some misconceptions about Artificial Intelligence that exists are: - Machines learn from themselves- The reality is far from the statement. Machines are not yet at that stage where they can make a decision on their own. Machines learn through a process called machine learning that enables systems to learn and develop based on their experiences without having to be explicitly programmed. Machine learning is concerned with the creation of computer programs that can access data and learn on their own.
存在的一些关于人工智能的误解是:- 机器自我学习- 现实远非如此。机器尚未达到可以自行做决定的阶段。机器通过一种称为机器学习的过程来学习,该过程使系统能够基于经验进行学习和开发,而无需显式编程。机器学习关注的是创建可以访问数据并自行学习的计算机程序。
- Artificial Intelligence is the same thing as Machine learning- Artificial Intelligence and Machine learning differ from each other. Artificial Intelligence concerns itself with creating devices that can mimic human intelligence, while machine learning is a subset of artificial intelligence which is about creating programs that can analyze data, learn from it, and then make decisions.
- Artificial Intelligence will take over humans- There is a possibility that the capabilities of AI can match or even surpass human intelligence in the near future. But, saying that AI will take over humans is just a work of fiction. AI is supposed to complement human intelligence, not enslave it.
74. What are some real-life applications of Artificial Intelligence?
人工智能在现实生活中有哪些应用?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b9947a | 官方: 否 | 付费: 否
答案:
- Social Media: The most common use of Artificial Intelligence in social media is facial detection and verification. Artificial Intelligence, along with machine learning, is also used to design your social media feed.
- Personalized online shopping: Shopping sites use AI-powered algorithms to curate the list of buying recommendations for users. They use data like users' search history and recent orders to create a list of suggestions that users might like.
- Agriculture: Technologies, especially Artificial Intelligence embedded systems, help farmers protect their crops from various adversities like weather, weeds, pests, and changing prices.
- Smart cars: Smart cars are another one of the real-life applications of AI. Artificial intelligence collects data from a car’s radar, camera, and GPS to operate the vehicle when the autopilot mode is on.
- Healthcare: Artificial Intelligence has come out as a reliable friend of doctors. From intelligent testing to medical recommendations, they assist medical professionals in every possible way.
75. What are different platforms for Artificial Intelligence (AI) development?
人工智能(AI)开发有哪些不同的平台?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b9947d | 官方: 否 | 付费: 否
答案:
Some different software platforms for AI development are-
用于AI开发的一些不同软件平台有-
Amazon AI services 2. Tensorflow 3. Google AI services 4. Microsoft Azure AI platform 5. Infosys Nia 6. IBM Watson 7. H2O 8. Polyaxon 9. PredictionIO
- Amazon AI services 2. Tensorflow 3. Google AI services 4. Microsoft Azure AI platform 5. Infosys Nia 6. IBM Watson 7. H2O 8. Polyaxon 9. PredictionIO
76. What are the programming languages used for Artificial Intelligence?
用于人工智能的编程语言有哪些?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b3793e58d557c902b99480 | 官方: 否 | 付费: 否
答案:
Python, LISP, Java, C++, R are some of the programming languages used for Artificial Intelligence.
Python、LISP、Java、C++、R是用于人工智能的一些编程语言。
77. What is the future of Artificial Intelligence?
人工智能的未来是什么?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99483 | 官方: 否 | 付费: 否
答案:
Artificial Intelligence has affected many humans and almost every industry, and it is expected to continue to do so. Artificial Intelligence has been the main driver of emerging technologies like the Internet of Things, big data, and robotics. AI can harness the power of a massive amount of data and make an optimal decision in a fraction of seconds, which is almost impossible for a normal human. AI is leading areas that are important for mankind such as cancer research, cutting-edge climate change technologies, smart cars, and space exploration. It has taken the center stage of innovation and development of computing, and it is not ceding the stage in the foreseeable future. Artificial Intelligence is going to impact the world more than anything in the history of mankind.
人工智能已经影响了众多人类和几乎所有行业,并且预计将继续如此。人工智能一直是物联网、大数据和机器人技术等新兴技术的主要驱动力。人工智能可以利用海量数据的力量,在几秒钟内做出最优决策,这对普通人来说几乎是不可能的。人工智能正在引领对人类重要的领域,如癌症研究、尖端气候变化技术、智能汽车和太空探索。它已在计算创新和发展的舞台上占据中心位置,并且在可预见的未来不会让位。人工智能对人类世界的影响将超过人类历史上的任何事物。
- Data Science
- All Events
- My Events
78. What are the types of Artificial Intelligence?
人工智能有哪些类型?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99486 | 官方: 否 | 付费: 否
答案:
There are seven types of Artificial Intelligence. These are:
人工智能有七种类型。它们是:
Weak AI or Narrow AI- These are designed to perform dedicated tasks. They can not perform beyond their capabilities. Apple’s Siri and IBM’s Watson are some examples of weak AI or narrow AI. 2. General AI- General AI can perform any intellectual task like humans. Currently, there is no system in the world that can be categorized under general AI. Researchers, however, are focused on developing AI devices that can perform tasks as perfectly as humans. 3. Super AI- Super AI is the level of Artificial Intelligence at which it can pass the intelligence of humans and can perform tasks better than humans. Super AI is still a hypothetical concept. 4. Reactive Machines- These kinds of machines react in the best possible way in a current situation. They do not store memories or experiences. IBM’s Deep Blue system and Google’s Alpha go are some examples of reactive machines. 5. Limited memory- These machines store experiences, but only for a limited amount of time. For example, smart cars store the information of nearby cars, their speed, speed limit, route information for a limited amount of time. 6. Theory of mind- The theory of machine AI is a theoretical concept. They might be able to understand human emotions, beliefs, society, and might be able to interact like humans. 7. Self-awareness- Self-awareness AI is the future of AI. It is expected that these machines will be super-intelligent, having their own consciousness, emotions, and self-awareness.
- 弱人工智能或窄人工智能——这些被设计用于执行专门任务。它们不能超越自身能力运行。苹果的Siri和IBM的Watson是弱人工智能或窄人工智能的一些例子。 2. 通用人工智能——通用人工智能可以像人类一样执行任何智力任务。目前,世界上没有系统可以归类为通用人工智能。然而,研究人员正专注于开发能够像人类一样完美执行任务的AI设备。 3. 超级人工智能——超级人工智能是人工智能能够超越人类智能并比人类更好地执行任务的水平。超级人工智能仍是一个假设性概念。 4. 反应式机器——这类机器在当前情况下以最佳可能方式做出反应。它们不存储记忆或经验。IBM的深蓝系统和谷歌的AlphaGo是反应式机器的一些例子。 5. 有限记忆——这些机器存储经验,但仅限有限时间。例如,智能汽车在有限时间内存储附近车辆的信息、速度、限速和路线信息。 6. 心智理论——机器人工智能的心智理论是一个理论概念。它们可能能够理解人类情感、信念、社会,并可能像人类一样互动。 7. 自我意识——自我意识AI是人工智能的未来。预计这些机器将超级智能,拥有自己的意识、情感和自我意识。
79. What is the difference between Artificial Intelligence, Machine learning, and Deep learning?
人工智能、机器学习和深度学习之间有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99489 | 官方: 否 | 付费: 否
答案:
| Artificial Intelligence 人工智能 | Machine Learning 机器学习 | Deep Learning 深度学习 |
|---|---|---|
| Artificial Intelligence is the ability of machines to function like the human brain. 人工智能是机器像人类大脑一样运作的能力。 | Machine learning is processing data, learning from it, and then making informed decisions. 机器学习是处理数据、从中学习,然后做出明智决策。 | Deep learning uses Artificial Neural Networks to solve complex problems. 深度学习使用人工神经网络解决复杂问题。 |
| The goal of AI is to allow machines to think for themselves without the need for human involvement. AI的目标是让机器无需人类参与即可自行思考。 | The purpose of machine learning is to allow a machine to learn from its previous experiences. 机器学习的目的在于让机器从其以往经验中学习。 | Deep learning's purpose is to use numerous algorithms to tackle complicated problems in the same way that the human brain does. 深度学习的目的在于使用众多算法以人类大脑的方式处理复杂问题。 |
| AI is capable of dealing with both structured and semi-structured data. AI能够处理结构化数据和半结构化数据。 | Machine learning works with both organized and semi-structured data. 机器学习处理组织和半结构化数据。 | Deep learning uses both structured and unstructured data to solve problems. 深度学习使用结构化和非结构化数据来解决问题。 |
| AI is a subset of data science. AI是数据科学的一个子集。 | Machine Learning is a subset of AI. 机器学习是AI的一个子集。 | Deep learning is a subset of Machine learning. 深度学习是机器学习的一个子集。 |
| Example- Google Search engine 示例——谷歌搜索引擎 | Example- Image recognition 示例——图像识别 | Example- Automatic car driving system 示例——自动驾驶汽车系统 |
80. How are Artificial Intelligence and Machine Learning related?
人工智能和机器学习如何相关?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b9948c | 官方: 否 | 付费: 否
答案:
Artificial Intelligence and Machine Learning are two popular and often misunderstood words. Artificial Intelligence is a domain of computer science that enables machines to mimic human intelligence and behavior. On the other hand, Machine Learning is a subset of Artificial Intelligence and is all about feeding computers with data so that they can learn on their own from all the patterns and models. Machine Learning models are used to implement Artificial Intelligence frequently.
人工智能和机器学习是两个流行且常被误解的词汇。人工智能是计算机科学的一个领域,使机器能够模仿人类智能和行为。另一方面,机器学习是人工智能的一个子集,主要涉及向计算机提供数据,使其能够从所有模式和模型中自行学习。机器学习模型常用于实现人工智能。
AI can be approached in a variety of ways, for as by building a computer program that implements a set of domain expert-developed rules. Artificial Intelligence (AI) incorporates Machine Learning (ML). Machine learning (ML) is the study of creating and implementing algorithms that can learn from previous experiences. If a pattern of behavior has been seen in the past, you can anticipate whether or not it will occur again.
人工智能可以通过多种方式实现,例如通过构建一个实现领域专家制定的一套规则的计算机程序。人工智能(AI)包含机器学习(ML)。机器学习(ML)是研究创建和实现能够从以往经验中学习的算法。如果过去观察到行为模式,你就可以预测它是否会再次发生。
For instance, if you want to develop a program that can identify the animal by looking at the image, you have to use a machine-learning algorithm that can predict the animal in the image based on millions of images stored in the database. The algorithm goes through all the images and classifies each image based on its features (color of pixels, for instance).
例如,如果你想开发一个通过查看图像来识别动物的程序,你必须使用一种机器学习算法,该算法可以根据数据库中存储的数百万张图像来预测图像中的动物。该算法遍历所有图像,并根据其特征(例如像素颜色)对每张图像进行分类。
81. What is Deep Learning?
什么是深度学习?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99490 | 官方: 否 | 付费: 否
答案:
Deep learning is a subset of Machine learning, which makes use of artificial neural networks to solve complex problems. The artificial neural network is a concept inspired by information processing and distributed communication nodes, neurons, which are present in human brains. It gives deep learning the power to look at a problem and solve it like a human brain in that situation would. The word ‘deep’ in deep learning means the number of hidden layers in the neural network. Deep learning models are developed in such a way that they are capable of training and managing themselves.
深度学习是机器学习的一个子集,利用人工神经网络解决复杂问题。人工神经网络是一个受信息处理和分布式通信节点(神经元,存在于人类大脑中)启发的概念。它赋予深度学习像人类大脑在那种情况下一样看待和解决问题的能力。深度学习中的“深度”一词指的是神经网络中的隐藏层数量。深度学习模型的开发方式使其能够自我训练和管理。
In the above figure, the deep neural network takes input through an input layer. The algorithm's input and output are separated by a hidden layer, in which the function applies weights to the inputs and guides them through an activation function as the output. Activation functions of a Deep neural network may vary. For example, a Sigmoid Function can take any input and produce the output between 0 and 1. The output layer is the network's last layer that takes the information gleaned from the hidden layer and turns it into a final value.
在上述图中,深度神经网络通过输入层获取输入。算法的输入和输出由隐藏层分隔,其中函数对输入应用权重,并通过激活函数引导其作为输出。深度神经网络的激活函数可能不同。例如,Sigmoid函数可以接受任何输入并产生0到1之间的输出。输出层是网络的最后一层,它将从隐藏层获取的信息转换为最终值。
In a nutshell, the hidden layers conduct nonlinear changes on the network's inputs. The function of the neural network determines the hidden layers, and the layers themselves may vary depending on their associated weights. To learn more, here is a free Deep Learning learning course by Scaler Topics . This free course can be referred to clear the basics of Deep Learning.
简而言之,隐藏层对网络输入进行非线性变换。神经网络的功能决定隐藏层,且各层可能根据其相关权重而变化。要了解更多,这里是Scaler Topics提供的免费深度学习课程。可以参阅此免费课程以清晰深度学习的基础知识。
82. What are different types of Machine Learning?
机器学习有哪些不同类型?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99493 | 官方: 否 | 付费: 否
答案:
- Supervised Learning: Supervised learning is the easiest type of machine learning. It is used to train the machine with labeled data. Labeled data is a group of samples that have been tagged with one or more labels (information tags). The labeled data is fed to the machine one by one until the machine can recognize the data on its own. It is just like a teacher trying to teach a kid all kinds of labeled cards in a deck of cards one by one. The data itself is the teacher in supervised learning.
- Unsupervised Learning: Unsupervised learning is, interestingly, the opposite of supervised learning. It is used for data with without labels or information tags. The algorithm is fed with a lot of data and tools to understand the properties of data. The machine will organize the data in clusters, classes, or groups in such a way that it can make sense. Taking a huge amount of random data as an input and making sense out of it is what makes this learning model brilliant.
- Reinforcement learning: The reinforcement learning model from the above-mentioned learning models. It is a kind of model which learns from its mistakes. When we place a reinforcement learning model in any environment, it makes a lot of mistakes. We provide a positive feedback signal when the model performs well and a negative feedback signal when it makes errors, to promote positive learning and make our model efficient.
83. What is Artificial Intelligence?
什么是人工智能?
- 知识点: 数据工程与数据科学/AI (主题: ai, machine-learning;标签: interviewbit, artificial-intelligence, topic-specific, ai, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3793e58d557c902b99496 | 官方: 否 | 付费: 否
答案:
Artificial Intelligence is the field of computer science concerned with building intelligent machines or computer systems, capable of simulating human intelligence. The machines created using Artificial Intelligence can work and react like humans without human intervention. Speech Recognition, Customer service, Recommendation Engine, Natural Language Processing (NLP) are some of the applications of Artificial Intelligence.
人工智能是计算机科学的一个领域,涉及构建能够模拟人类智能的智能机器或计算机系统。利用人工智能创建的机器可以在无需人工干预的情况下像人类一样工作和反应。语音识别、客户服务、推荐引擎、自然语言处理(NLP)是人工智能的一些应用。
Since its inception, AI research has explored and rejected a variety of methodologies, including mimicking the brain, modelling human problem-solving, formal logic, massive knowledge libraries, and imitating animal behavior. Highly mathematical-statistical machine learning dominated the subject in the first decades of the twenty-first century. The many sub-fields of AI research are based on specific aims and the application of certain techniques. Reasoning, knowledge representation, planning, learning, natural language processing, sensing, and the ability to move and manipulate objects are all conventional AI research aims. One of the field's long-term goals is general intelligence (the capacity to solve any problem). AI researchers have adapted and integrated a wide range of problem-solving strategies to handle these issues, including search and mathematical optimization, formal logic, artificial neural networks, and statistics, probability, and economics methodologies. AI also makes use of various fields like psychology, linguistics, philosophy.
自其诞生以来,人工智能研究已探索并摒弃了多种方法论,包括模拟大脑、建模人类问题解决、形式逻辑、大规模知识库以及模仿动物行为。在21世纪的最初几十年里,高度数学统计的机器学习主导了该领域。人工智能研究的许多子领域基于特定目标和特定技术的应用。推理、知识表示、规划、学习、自然语言处理、感知以及移动和操作物体的能力都是传统的人工智能研究目标。该领域的长期目标之一是一般智能(解决任何问题的能力)。人工智能研究者已适应并整合了广泛的问题解决策略来处理这些问题,包括搜索和数学优化、形式逻辑、人工神经网络以及统计学、概率论和经济学方法。人工智能还利用了心理学、语言学、哲学等多个领域。
84. What is Big Data, and where does it come from? How does it work?
什么是大数据,它来自哪里?它是如何工作的?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3db | 官方: 否 | 付费: 否
答案:
Big Data refers to extensive and often complicated data sets so huge that they’re beyond the capacity of managing with conventional software tools. Big Data comprises unstructured and structured data sets such as videos, photos, audio, websites, and multimedia content.
大数据指的是广泛且通常复杂的数据集,规模如此之大以至于超出了传统软件工具的管理能力。大数据包含非结构化和结构化的数据集,如视频、照片、音频、网站和多媒体内容。
Businesses collect the data they need in countless ways, such as: - Internet cookies
企业以无数方式收集所需数据,例如:- 互联网cookies
- Email tracking
- Smartphones
- Smartwatches
- Online purchase transaction forms
- Website interactions
- Transaction histories
- Social media posts
Third-party trackers -companies that collect and sell clients and profitable data
Working with big data involves three sets of activities: - Integration: This involves merging data often from different sources – and molding it into a form that can be analysed in a way to provide insights.处理大数据涉及三类活动:- 集成:这涉及将通常来自不同来源的数据合并,并将其塑造成可分析的形式,以提供洞察。
- Management: Big data must be stored in a repository where it can be collected and readily reached. The largest amount of Big Data is unstructured, causing it ill-suited for conventional relational databases, which need data in tables-and-rows format.
- Analysis: The Big Data investment return is a spectrum of worthy market insights, including details on buying patterns and customer choices. These are represented by examining large data sets with tools driven by AI and machine learning.
85. What are the different Output formats in Hadoop?
Hadoop中有哪些不同的输出格式?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b3797a58d557c902b9c3de | 官方: 否 | 付费: 否
答案:
The different Output formats in Hadoop are - - Textoutputformat: TextOutputFormat is the default output format in Hadoop.
Hadoop中的不同输出格式包括:- Textoutputformat(文本输出格式):TextOutputFormat是Hadoop中的默认输出格式。
- Mapfileoutputformat: Mapfileoutputformat is used to write the output as map files in Hadoop.
- DBoutputformat: DBoutputformat is just used for writing output in relational databases and Hbase.
- Sequencefileoutputformat: Sequencefileoutputformat is used for writing sequence files.
- SequencefileAsBinaryoutputformat: SequencefileAsBinaryoutputformat is used to write keys to a sequence file in binary format.
86. Mention the common input formats in Hadoop.
提到Hadoop中的常见输入格式。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3e1 | 官方: 否 | 付费: 否
答案:
The common input formats in Hadoop are - - Text Input Format: This is the default input format in Hadoop.
Hadoop中的常见输入格式包括:- 文本输入格式:这是Hadoop中的默认输入格式。
- Key-Value Input Format: Used to read Plain Text Files in Hadoop.
- Sequence File Input format: This is used to read Files in a sequence in Hadoop.
87. What are the three modes that Hadoop can run?
Hadoop可以以哪三种模式运行?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3e4 | 官方: 否 | 付费: 否
答案:
- Local Mode or Standalone Mode:By default, Hadoop is configured to operate in a no distributed mode. It runs as a single Java process. Instead of HDFS, this mode utilizes the local file system. This mode is more helpful for debugging, and there isn't any requirement to configure core-site.xml, hdfs-site.xml, mapred-site.xml, masters & slaves. Standalone mode is ordinarily the quickest mode in Hadoop.
- Pseudo-distributed Mode:In this mode, each daemon runs on a separate java process. This mode requires custom configuration ( core-site.xml, hdfs-site.xml, mapred-site.xml). The HDFS is used for input and output. This mode of deployment is beneficial for testing and debugging purposes.
- Fully Distributed Mode:It is the production mode of Hadoop. One machine in the cluster is assigned as NameNode and another as Resource Manager exclusively. These are masters. Rest nodes act as Data Node and Node Manager. These are the slaves. Configuration parameters and environment need to be defined for Hadoop Daemons. This mode gives fully distributed computing capacity, security, fault endurance, and scalability.
88. What is fsck?
什么是fsck?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3ea | 官方: 否 | 付费: 否
答案:
The term fsck stands for File System Check, used by HDFS. It is used to check discrepancies and if there is any difficulty in the file. For instance, if there are any missing blocks in the file, HDFS gets reported through this command.
术语fsck代表文件系统检查,由HDFS使用。它用于检查差异以及文件中是否存在任何问题。例如,如果文件中有任何缺失块,HDFS会通过此命令报告。
89. How to deploy a Big Data Model? Mention the key steps involved.
如何部署大数据模型?提及涉及的关键步骤。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3ee | 官方: 否 | 付费: 否
答案:
Deploying a model into a Big Data Platform involves mainly three key steps they are, - Data ingestion
将模型部署到大数据的平台主要涉及三个关键步骤,它们是,- 数据摄取
- Data Storage
- Data Processing
Let’s have a look at what these are, - Data Ingestion: This process involves collecting data from different sources like social media platforms, business applications, log files, etc.
让我们看看这些是什么,- 数据摄取:此过程涉及从不同来源(如社交媒体平台、商业应用程序、日志文件等)收集数据。
- Data Storage: When data extraction is completed, the challenge is to store this large volume of data in the database in which the Hadoop Distributed File system (HDFS) plays a vital role.
Data Processing: After storing the data in HDFS or HBase, the next task is to analyze and visualize these large amounts of data using specific algorithms for better data processing. And yet again, this task is more straightforward if we use Hadoop, Apache Spark, Pig, etc.
After performing these essential steps, one can deploy a big data model successfully.完成这些关键步骤后,即可成功部署大数据模型。
90. What is data modelling and what is the need for it.
什么是数据建模,以及其必要性是什么。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3f1 | 官方: 否 | 付费: 否
答案:
Data Modeling as a business has been practiced in the IT sector for many decades. As an idea, the data model is a means to arrive at the diagram by examining the data in question and getting a deep knowledge. The method of representing the data visually encourages the business and the technology specialists to understand the data and understand how it will get used.
数据建模作为一种业务,在IT行业已实践数十年。作为概念,数据模型是通过检视相关数据并获取深入知识来达成图示的手段。以视觉方式表示数据的方法有助于业务和技术专家理解数据及其使用方式。
Kinds Of Data Models
数据模型的种类
The three principal types of data models are conceptual, logical, and physical. Think of them as an improvement from an abstract layout to a detailed mapping of the database setup and final form: - Conceptual Data Model:Conceptual data models are the most simplistic and abstract. Minor annotation happens in this model, but the overall layout and controls of the data relationships are set. You’ll find elements like basic market rules that need to be applied, the levels or entity classes of data that you plan to cover, and any other regulations that may limit layout options. Data models are usually used in the development stage of a project.
三种主要的数据模型类型为概念模型、逻辑模型和物理模型。可将它们视为从抽象布局到数据库设置及最终形态详细映射的改进过程:- 概念数据模型:概念数据模型是最简单且最抽象的。此模型中只有少量注释,但整体布局和数据关系的控制已设定。你会发现诸如需应用的基本市场规则、计划覆盖的数据层级或实体类,以及可能限制布局选项的其他规定等元素。数据模型通常在项目开发阶段使用。
- Logical Data Model:The logical data model extends on the basic framework laid out in the conceptual model, but it counts more relational factors. Thus, some basic annotations are related to overall properties or data attributes, but not many annotations concentrate on actual data units. Hence, this model is beneficial in data warehousing projects.
Physical Data Model:The physical data model is the most comprehensive and the last step before database production, it usually accounts for database management system-specific properties and rules.
Advantages Of Data Modeling: - Data modeling offers several different benefits to companies as part of their data management:数据建模的优势:- 数据建模作为数据管理的一部分,为公司提供多种不同益处:
- Before you even build a database, you’ve cleaned, organized, and modeled your data to project what your next step should look like. Data modeling advances data quality and makes databases limited, prone to mistakes and bad design.
- Data modeling produces a visual flow of data and how you plan to organize it. This supports employees know what’s happening with data and how they relate to the data management puzzle. It also develops data-related communication across departments in an organization.
- Data modeling allows more profound database design, bringing forth more useful applications and data-based business insights down the line.
91. How is HDFS different from traditional NFS?
HDFS与传统NFS有何不同?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3f4 | 官方: 否 | 付费: 否
答案:
NFS (Network File system) : A protocol that enables customers to access files over the network. NFS clients would allow files to be accessed as if the files live on the local device, even though they live on the disk of a networked device.
NFS(网络文件系统):一种允许客户通过网络访问文件的协议。NFS客户端可让文件如同存储在本地设备上一样被访问,尽管它们实际位于网络设备的磁盘上。
HDFS (Hadoop Distributed File System) : A distributed file system is shared between multiple networked machines or nodes. HDFS is fault-tolerant because it saves various copies of files on the file system; the default replication level is 3. The notable difference between the two is Replication/Fault Tolerance. HDFS was intended to withstand failures. NFS does not possess any fault tolerance built-in.
HDFS(Hadoop分布式文件系统):一种在多个联网机器或节点间共享的分布式文件系统。HDFS具有容错性,因为它在文件系统上保存了文件的多个副本;默认复制级别为3。两者间的显著区别在于复制/容错。HDFS旨在承受故障,而NFS不具备内置的容错功能。
Benefits of HDFS over NFS: Apart from fault tolerance, HDFS helps to create multiple replicas of files. This reduces the traditional bottleneck of many clients accessing a single file. In addition, since files have multiple images on various physical disks, reading performance scales better than NFS.
HDFS相对于NFS的优势:除容错性外,HDFS有助于创建文件的多个副本,减少了多个客户端访问单个文件的传统瓶颈。此外,由于文件在多个物理磁盘上有多个映像,其读取性能比NFS扩展更好。
92. Explain the features of Hadoop.
解释一下Hadoop的特性。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3f8 | 官方: 否 | 付费: 否
答案:
Hadoop assists in not only store data but also processing big data. It is the most reliable way to handle significant data hurdles. Some salient features of Hadoop are – - Distributed Processing – Hadoop helps in distributed processing of data, i.e., quicker processing. In Hadoop HDFS, the data is collected in a distributed manner, and the data is parallel processing, and MapReduce is liable for the same.
Hadoop不仅帮助存储数据,还处理大数据。它是应对重大数据挑战最可靠的方式。Hadoop的一些显著特性包括:- 分布式处理——Hadoop支持数据的分布式处理,即更快地处理。在Hadoop HDFS中,数据以分布式方式收集,并进行并行处理,MapReduce负责此任务。
- Open Source – Hadoop is independent of cost as it is an open-source framework. Changes are allowed in the source code as per the user’s requirements.
- Fault Tolerance – Hadoop is highly fault-tolerant. By default, for every block, it creates three replicas at distinct nodes. This number of replicas can be modified according to the requirement. So, we can retrieve the data from a different node if one of the nodes fails. The discovery of node failure and restoration of data is made automatically.
- Scalability – It is fitted with different hardware, and we can promptly access the new device.
- Reliability – The data in Hadoop is stored on the cluster in a safe manner that is autonomous of the machine. So, the data stored in the Hadoop ecosystem’s data does not get affected by any machine breakdowns.
93. Explain the core components of Hadoop.
解释Hadoop的核心组件。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3fb | 官方: 否 | 付费: 否
答案:
Hadoop is an open-source framework intending to store and process big data in a distributed manner.
Hadoop是一个开源框架,旨在以分布式方式存储和处理大数据。
Hadoop’s Essential Components: - HDFS (Hadoop Distributed File System) – Hadoop’s key storage system is HDFS. The extensive data is stored on HDFS. It is mainly devised for storing massive datasets in commodity hardware.
Hadoop的基本组件:- HDFS(Hadoop分布式文件系统)——Hadoop的关键存储系统是HDFS。大量数据存储在HDFS中,其主要设计用于在商用硬件上存储海量数据集。
- Hadoop MapReduce – The responsible layer of Hadoop for data processing is MapReduce. It puts a request for processing of structured and unstructured data which is already stored in HDFS. It is liable for the parallel processing of a high volume of data by distributing data into detached tasks. There are two stages of processing: Map and Reduce. In simple terms, Map is a stage where data blocks are read and made available to the executors (computers /nodes /containers) for processing. Reduce is a stage where all processed data is collected and collated.
- YARN – The framework which is used to process in Hadoop is YARN. For resource management and to provide multiple data processing engines like real-time streaming, data science, and batch processing is done by YARN.
94. Explain the importance of Hadoop technology in Big data analytics.
解释Hadoop技术在大数据分析中的重要性。
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c3fe | 官方: 否 | 付费: 否
答案:
Since big data includes a large volume of data, i.e., structured, semi-structured, and unstructured data, analyzing and processing this data is quite a big task. There was a need for a tool or technology to help process the data at a rapid speed. Therefore, Hadoop is used because of its capabilities like storage, processing capability. Moreover, Hadoop is an open-source software. If you want to consider the cost, it’s beneficial for business solutions. The main reason for its popularity in recent years is that this framework permits distributed processing of enormous data sets using crosswise clusters of computers practicing simple programming models.
由于大数据包含大量数据,即结构化、半结构化和非结构化数据,分析和处理这些数据是一项大任务。需要一种工具或技术来帮助快速处理数据。因此,使用Hadoop是因为其存储和处理能力等特性。此外,Hadoop是开源软件。若考虑成本,它对商业解决方案有益。其近年来流行的主要原因是该框架允许使用简单编程模型的横向集群对海量数据集进行分布式处理。
95. How is Hadoop and Big Data related?
Hadoop 与大数据有何关联?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c401 | 官方: 否 | 付费: 否
答案:
If we talk about Big Data, we do talk about Hadoop as well. So, this is one of the most critical questions from an interview perspective. That you might surely face. Hadoop is an open-source framework for saving, processing, and interpreting complex, disorganized data sets for obtaining insights and knowledge. So, that is how Hadoop and Big Data are related to each other.
当我们谈论大数据时,也会提到 Hadoop。因此,这是面试中一个非常关键的问题,你很可能遇到。Hadoop 是一个开源框架,用于保存、处理并解释复杂且杂乱无章的数据集,以获取洞察和知识。这就是 Hadoop 与大数据之间的关联。
96. Why businesses are using Big Data for competitive advantage.
为什么企业利用大数据获取竞争优势?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c404 | 官方: 否 | 付费: 否
答案:
Irrespective of the division and scope of the firm, data is now an essential tool for businesses to utilise. Companies are frequently using big data to gain a competing edge over business rivals.
无论公司的部门划分和规模如何,数据现在已成为企业利用的重要工具。公司经常使用大数据来获得相对于商业竞争对手的竞争优势。
Checking the datasets a company collects is just one part of the big data process. Big data professionals also need to know what the company requires from the application and how they plan to use the data to their advantage. - Confident decision-building: Analytics aims to develop decision building, and big data endures to sustain this. Big data can help enterprises speed up their decision-making method with so much data available while still being assured of their choice. Nowadays, moving fast and reacting to broader trends and operational changes is a huge business benefit in a quick-paced society.
检查公司收集的数据集只是大数据处理过程的一部分。大数据专业人员还需要了解公司对应用程序的需求,以及他们计划如何善用数据。 - 自信决策构建:分析旨在提升决策构建,而大数据持续支持这一目标。大数据可以利用大量可用数据帮助企业加速决策过程,同时确保选择正确。如今,在快节奏的社会中,快速行动并响应更广泛趋势和运营变化是一项巨大的商业优势。
- Asset optimisation: Big data signifies that businesses can control assets at a personal level. This implies they can adequately optimise assets depending on the data source, improve productivity, extend the lifespan of help, and reduce the downtime some assets may require. This gives a competing advantage by assuring the company is getting the most out of its assets and links with decreasing costs.
- Cost reduction: Big data can support businesses to reduce their outgoings. From analysing energy usage to assessing the effectiveness of staff operating patterns, data collected by companies can help them recognise where they can make cost savings without having a negative impact on company operations.
- Improve customer engagement: When surveying online, consumers make confident choices indicating their decisions, habits, and tendencies that can then be used to develop and tailor consumer dialogue, which could then be interpreted into increased sales. Understanding what each client is looking for through the data collected on them means you can target them with specific products, but it also gives a personal feel that many consumers today have come to await.
- Identify new revenue streams: Analytics can further assist companies in identifying new revenue streams and expanding into other areas. For example, knowing customer trends and decisions allow firms to decide the way they should go. The data companies accumulate can also likely be sold, adding income streams and the potential to build alliances with other businesses.
97. What are the 5 V’s in Big Data?
大数据中的 5 个 V 是什么?
- 知识点: 数据工程与数据科学/AI (主题: big-data, data-engineering;标签: interviewbit, big-data, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b3797a58d557c902b9c407 | 官方: 否 | 付费: 否
答案:
- Volume: A considerable amount of data stored in data warehouses reflects the volume. The data may reach random heights; these large volumes of data need to be examined and processed. Which may exist up to or more than terabytes and petabytes.
- Velocity: Velocity basically introduces the pace at which data is being produced in real-time. To give a simple example for recognition, imagine the rate at which Facebook, Instagram, or Twitter posts are generated per second, an hour or more.
- Variety: Big Data comprises structured, unstructured, and semi-structured data collected from varied sources. This different variety of data requires very different and specific analyzing and processing techniques with unique and appropriate algorithms.
- Veracity: Data veracity basically relates to how reliable the data is, or in a fundamental way, we can define it as the quality of the data analyzed.
- Value: Raw data is of no use or meaning but once converted into something valuable. We can extract helpful information.
98. What are the advantages of NumPy arrays over Python lists?
NumPy数组相对于Python列表有哪些优势?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (标签: interviewbit, capgemini, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Capgemini
- id: 69b379f058d557c902ba16e9 | 官方: 否 | 付费: 否
答案:
The following are some advantages of NumPy arrays over Python lists: - NumPy arrays store data in a sequential manner, unlike Python lists, making data processing simpler.
以下是NumPy数组相对于Python列表的一些优势: - NumPy数组以顺序方式存储数据,不像Python列表,从而使数据处理更简单。
- NumPy is not just more efficient, but it's also easier to use. We get a lot of vector and matrix operations for free, allowing us to avoid doing unnecessary work. They're also put to good use.
- NumPy arrays are faster, and NumPy has a lot of useful features like FFTs, convolutions, quick searching, simple statistics, linear algebra, histograms, and so forth.
99. What is the data analysis process?
数据分析过程是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c34 | 官方: 否 | 付费: 否
答案:
Data analysis generally refers to the process of assembling, cleaning, interpreting, transforming, and modeling data to gain insights or conclusions and generate reports to help businesses become more profitable. The following diagram illustrates the various steps involved in the process:
数据分析通常指汇编、清洗、解释、转换和建模数据以获取洞察或结论,并生成报告以帮助企业提高盈利能力的过程。下图说明了该过程中涉及的各个步骤:
- Collect Data: The data is collected from a variety of sources and is then stored to be cleaned and prepared. This step involves removing all missing values and outliers.
- Analyse Data: As soon as the data is prepared, the next step is to analyze it. Improvements are made by running a model repeatedly. Following that, the model is validated to ensure that it is meeting the requirements.
- Create Reports: In the end, the model is implemented, and reports are generated as well as distributed to stakeholders.
100. What do you mean by collisions in a hash table? Explain the ways to avoid it.
哈希表中的冲突是什么意思?请解释避免冲突的方法。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c37 | 官方: 否 | 付费: 否
答案:
Hash table collisions are typically caused when two keys have the same index. Collisions, thus, result in a problem because two elements cannot share the same slot in an array. The following methods can be used to avoid such hash collisions: - Separate chaining technique: This method involves storing numerous items hashing to a common slot using the data structure.
哈希表冲突通常发生在两个键具有相同索引时。冲突因此会导致问题,因为数组中两个元素不能共享同一槽位。可以使用以下方法避免此类哈希冲突: - 分离链接技术:此方法涉及使用数据结构存储哈希到公共槽位的多个项。
- Open addressing technique: This technique locates unfilled slots and stores the item in the first unfilled slot it finds.
101. What are the ways to detect outliers? Explain different ways to deal with it.
检测异常值的方法有哪些?请解释处理异常值的不同方式。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c3a | 官方: 否 | 付费: 否
答案:
Outliers are detected using two methods: - Box Plot Method: According to this method, the value is considered an outlier if it exceeds or falls below 1.5*IQR (interquartile range), that is, if it lies above the top quartile (Q3) or below the bottom quartile (Q1).
异常值通过两种方法检测: - 箱线图法:根据此方法,如果值超过或低于 1.5*IQR(四分位距),即如果其位于上四分位数(Q3)之上或下四分位数(Q1)之下,则视为异常值。
- Standard Deviation Method: According to this method, an outlier is defined as a value that is greater or lower than the mean ± (3*standard deviation).
102. Write some key skills usually required for a data analyst.
写出数据分析师通常需要的一些关键技能。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c3d | 官方: 否 | 付费: 否
答案:
Some of the key skills required for a data analyst include:
数据分析师所需的一些关键技能包括:
- Knowledge of reporting packages (Business Objects), coding languages (e.g., XML, JavaScript, ETL), and databases (SQL, SQLite, etc.) is a must.
- Ability to analyze, organize, collect, and disseminate big data accurately and efficiently.
- The ability to design databases, construct data models, perform data mining, and segment data.
- Good understanding of statistical packages for analyzing large datasets (SAS, SPSS, Microsoft Excel, etc.).
- Effective Problem-Solving, Teamwork, and Written and Verbal Communication Skills.
- Excellent at writing queries, reports, and presentations.
- Understanding of data visualization software including Tableau and Qlik.
- The ability to create and apply the most accurate algorithms to datasets for finding solutions.
103. What are the different challenges one faces during data analysis?
数据分析过程中面临的常见挑战有哪些?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c40 | 官方: 否 | 付费: 否
答案:
While analyzing data, a Data Analyst can encounter the following issues: - Duplicate entries and spelling errors. Data quality can be hampered and reduced by these errors.
在分析数据时,数据分析师可能会遇到以下问题: - 重复条目和拼写错误。这些错误会损害并降低数据质量。
- The representation of data obtained from multiple sources may differ. It may cause a delay in the analysis process if the collected data are combined after being cleaned and organized.
- Another major challenge in data analysis is incomplete data. This would invariably lead to errors or faulty results.
- You would have to spend a lot of time cleaning the data if you are extracting data from a poor source.
- Business stakeholders' unrealistic timelines and expectations
- Data blending/ integration from multiple sources is a challenge, particularly if there are no consistent parameters and conventions
- Insufficient data architecture and tools to achieve the analytics goals on time.
104. Explain data cleansing.
解释数据清洗。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c43 | 官方: 否 | 付费: 否
答案:
Data cleaning, also known as data cleansing or data scrubbing or wrangling, is basically a process of identifying and then modifying, replacing, or deleting the incorrect, incomplete, inaccurate, irrelevant, or missing portions of the data as the need arises. This fundamental element of data science ensures data is correct, consistent, and usable.
数据清洗,也称为数据清洁或数据擦洗或数据整理,基本上是一个根据需要识别并随后修改、替换或删除数据中不正确、不完整、不准确、不相关或缺失部分的过程。这一数据科学的基本要素确保数据正确、一致且可用。
105. What are the tools useful for data analysis?
哪些工具对数据分析有用?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c46 | 官方: 否 | 付费: 否
答案:
Some of the tools useful for data analysis include: - RapidMiner
一些对数据分析有用的工具包括:- RapidMiner
- KNIME
- Google Search Operators
- Google Fusion Tables
- Solver
- NodeXL
- OpenRefine
- Wolfram Alpha
- io
- Tableau, etc.
106. Write the difference between data mining and data profiling.
写出数据挖掘和数据剖析之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c49 | 官方: 否 | 付费: 否
答案:
Data mining Process: It generally involves analyzing data to find relations that were not previously discovered. In this case, the emphasis is on finding unusual records, detecting dependencies, and analyzing clusters. It also involves analyzing large datasets to determine trends and patterns in them. Data Profiling Process: It generally involves analyzing that data's individual attributes. In this case, the emphasis is on providing useful information on data attributes such as data type, frequency, etc. Additionally, it also facilitates the discovery and evaluation of enterprise metadata.
数据挖掘过程:通常涉及分析数据以发现先前未发现的关系。在这种情况下,重点是寻找异常记录、检测依赖性和分析聚类。它还涉及分析大型数据集以确定其中的趋势和模式。数据剖析过程:通常涉及分析数据的单个属性。在这种情况下,重点是为数据属性(如数据类型、频率等)提供有用的信息。此外,它还促进企业元数据的发现和评估。
| Data Mining 数据挖掘 | Data Profiling 数据剖析 |
|---|---|
| It involves analyzing a pre-built database to identify patterns. 它涉及分析预先构建的数据库以识别模式。 | It involves analyses of raw data from existing datasets. 它涉及分析现有数据集中的原始数据。 |
| It also analyzes existing databases and large datasets to convert raw data into useful information. 它还分析现有数据库和大型数据集以将原始数据转换为有用的信息。 | In this, statistical or informative summaries of the data are collected. 在此过程中,会收集数据的统计或信息性摘要。 |
| It usually involves finding hidden patterns and seeking out new, useful, and non-trivial data to generate useful information. 它通常涉及发现隐藏模式并寻找新的、有用的和非平凡的数据以生成有用的信息。 | It usually involves the evaluation of data sets to ensure consistency, uniqueness, and logic. 它通常涉及评估数据集以确保一致性、唯一性和逻辑性。 |
| Data mining is incapable of identifying inaccurate or incorrect data values. 数据挖掘无法识别不准确或不正确的数据值。 | In data profiling, erroneous data is identified during the initial stage of analysis. 在数据剖析中,错误数据在分析的初始阶段即被识别。 |
| Classification, regression, clustering, summarization, estimation, and description are some primary data mining tasks that are needed to be performed. 分类、回归、聚类、汇总、估计和描述是数据挖掘需要执行的一些主要任务。 | This process involves using discoveries and analytical methods to gather statistics or summaries about the data. 此过程涉及使用发现和分析方法来收集关于数据的统计信息或摘要。 |
107. Which validation methods are employed by data analysts?
数据分析师采用哪些验证方法?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c4c | 官方: 否 | 付费: 否
答案:
In the process of data validation, it is important to determine the accuracy of the information as well as the quality of the source. Datasets can be validated in many ways. Methods of data validation commonly used by Data Analysts include: - Field Level Validation: This method validates data as and when it is entered into the field. The errors can be corrected as you go.
在数据验证过程中,确定信息的准确性以及来源的质量非常重要。数据集可以通过多种方式验证。数据分析师常用的数据验证方法包括:- 字段级验证:此方法在数据输入字段时即进行验证。错误可以随输入过程进行纠正。
- Form Level Validation: This type of validation is performed after the user submits the form. A data entry form is checked at once, every field is validated, and highlights the errors (if present) so that the user can fix them.
- Data Saving Validation: This technique validates data when a file or database record is saved. The process is commonly employed when several data entry forms must be validated.
- Search Criteria Validation: It effectively validates the user's search criteria in order to provide the user with accurate and related results. Its main purpose is to ensure that the search results returned by a user's query are highly relevant.
108. Explain Outlier.
解释异常值。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c4f | 官方: 否 | 付费: 否
答案:
In a dataset, Outliers are values that differ significantly from the mean of characteristic features of a dataset. With the help of an outlier, we can determine either variability in the measurement or an experimental error. There are two kinds of outliers i.e., Univariate and Multivariate. The graph depicted below shows there are four outliers in the dataset.
在数据集中,异常值是与数据集特征属性的均值显著不同的值。借助异常值,我们可以确定测量中的变异性或实验误差。异常值有两种类型,即单变量和多变量。下图显示数据集中有四个异常值。
109. What are the responsibilities of a Data Analyst?
数据分析师的职责是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c52 | 官方: 否 | 付费: 否
答案:
Some of the responsibilities of a data analyst include: - Collects and analyzes data using statistical techniques and reports the results accordingly.
数据分析师的一些职责包括:- 使用统计技术收集和分析数据,并相应地报告结果。
- Interpret and analyze trends or patterns in complex data sets.
- Establishing business needs together with business teams or management teams.
- Find opportunities for improvement in existing processes or areas.
- Data set commissioning and decommissioning.
- Follow guidelines when processing confidential data or information.
- Examine the changes and updates that have been made to the source production systems.
- Provide end-users with training on new reports and dashboards.
- Assist in the data storage structure, data mining, and data cleansing.
110. Write difference between data analysis and data mining.
写出数据分析和数据挖掘之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c55 | 官方: 否 | 付费: 否
答案:
Data Analysis : It generally involves extracting, cleansing, transforming, modeling, and visualizing data in order to obtain useful and important information that may contribute towards determining conclusions and deciding what to do next. Analyzing data has been in use since the 1960s. Data Mining : In data mining, also known as knowledge discovery in the database, huge quantities of knowledge are explored and analyzed to find patterns and rules. Since the 1990s, it has been a buzzword.
数据分析:通常涉及提取、清洗、转换、建模和可视化数据,以获得有助于确定结论和决定下一步行动的有用且重要的信息。数据分析自1960年代以来一直在使用。数据挖掘:在数据挖掘中,也称为数据库中的知识发现,探索和分析大量的知识以发现模式和规则。自1990年代以来,它一直是一个热门词汇。
| Data Analysis 数据分析 | Data Mining 数据挖掘 |
|---|---|
| Analyzing data provides insight or tests hypotheses. 分析数据提供见解或测试假设。 | A hidden pattern is identified and discovered in large datasets. 在大型数据集中识别和发现隐藏模式。 |
| It consists of collecting, preparing, and modeling data in order to extract meaning or insights. 它包括收集、准备和建模数据以提取意义或见解。 | This is considered as one of the activities in Data Analysis. 这被认为是数据分析中的活动之一。 |
| Data-driven decisions can be taken using this way. 通过这种方式可以做出数据驱动的决策。 | Data usability is the main objective. 数据可用性是主要目标。 |
| Data visualization is certainly required. 可视化当然需要。 | Visualization is generally not necessary. 可视化通常不是必需的。 |
| It is an interdisciplinary field that requires knowledge of computer science, statistics, mathematics, and machine learning. 这是一个跨学科领域,需要计算机科学、统计学、数学和机器学习知识。 | Databases, machine learning, and statistics are usually combined in this field. 该领域通常结合数据库、机器学习和统计学。 |
| Here the dataset can be large, medium, or small, and it can be structured, semi-structured, and unstructured. 这里数据集可以是大型、中型或小型,并且可以是结构化的、半结构化的和非结构化的。 | In this case, datasets are typically large and structured. 在这种情况下,数据集通常是大型和结构化的。 |
111. Explain the KNN imputation method.
解释KNN插补方法。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c58 | 官方: 否 | 付费: 否
答案:
A KNN (K-nearest neighbor) model is usually considered one of the most common techniques for imputation. It allows a point in multidimensional space to be matched with its closest k neighbors. By using the distance function, two attribute values are compared. Using this approach, the closest attribute values to the missing values are used to impute these missing values.
KNN(K近邻)模型通常被认为是插补中最常用的技术之一。它允许多维空间中的一个点与其最近的k个邻居进行匹配。通过使用距离函数,比较两个属性值。利用这种方法,与缺失值最接近的属性值被用来插补这些缺失值。
112. Explain Normal Distribution.
解释正态分布。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c5b | 官方: 否 | 付费: 否
答案:
Known as the bell curve or the Gauss distribution, the Normal Distribution plays a key role in statistics and is the basis of Machine Learning. It generally defines and measures how the values of a variable differ in their means and standard deviations, that is, how their values are distributed.
正态分布,也称为钟形曲线或高斯分布,在统计学中扮演着关键角色,并且是机器学习的基础。它通常定义并衡量变量值在其均值和标准差方面的差异,即它们的值是如何分布的。
The above image illustrates how data usually tend to be distributed around a central value with no bias on either side. In addition, the random variables are distributed according to symmetrical bell-shaped curves.
上面的图像说明了数据通常倾向于围绕一个中心值分布,两侧没有偏差。此外,随机变量按照对称的钟形曲线分布。
113. What do you mean by data visualization?
数据可视化是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c5e | 官方: 否 | 付费: 否
答案:
The term data visualization refers to a graphical representation of information and data. Data visualization tools enable users to easily see and understand trends, outliers, and patterns in data through the use of visual elements like charts, graphs, and maps. Data can be viewed and analyzed in a smarter way, and it can be converted into diagrams and charts with the use of this technology.
术语数据可视化指的是信息和数据的图形表示。数据可视化工具通过使用图表、图形和地图等视觉元素,使用户能够轻松地查看和理解数据中的趋势、异常值和模式。数据可以以更智能的方式被查看和分析,并且可以利用这项技术将其转换为图表和图示。
114. How does data visualization help you?
数据可视化如何帮助你?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c61 | 官方: 否 | 付费: 否
答案:
Data visualization has grown rapidly in popularity due to its ease of viewing and understanding complex data in the form of charts and graphs. In addition to providing data in a format that is easier to understand, it highlights trends and outliers. The best visualizations illuminate meaningful information while removing noise from data.
数据可视化因其以图表和图形形式轻松查看和理解复杂数据而迅速流行起来。除了提供更易于理解的数据格式外,它还突出趋势和异常值。最佳的可视化在去除数据噪声的同时,阐明有意义的信息。
115. Mention some of the python libraries used in data analysis.
提到一些用于数据分析的Python库。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c64 | 官方: 否 | 付费: 否
答案:
Several Python libraries that can be used on data analysis include: - NumPy
可用于数据分析的几个Python库包括:- NumPy
- Bokeh
- Matplotlib
- Pandas
- SciPy
- SciKit, etc.
116. Explain a hash table.
解释哈希表。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c67 | 官方: 否 | 付费: 否
答案:
Hash tables are usually defined as data structures that store data in an associative manner. In this, data is generally stored in array format, which allows each data value to have a unique index value. Using the hash technique, a hash table generates an index into an array of slots from which we can retrieve the desired value.
哈希表通常被定义为以关联方式存储数据的数组结构。在这种结构中,数据一般以数组格式存储,允许每个数据值具有唯一的索引值。使用哈希技术,哈希表在一个插槽数组中生成一个索引,从中我们可以检索所需的值。
117. In what ways is data analysis related to business intelligence?
数据分析与商业智能有哪些关联方式?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c6e | 官方: 否 | 付费: 否
答案:
Data analysis and business intelligence (BI) are closely connected fields. Both involve collecting and analyzing data to support decision-making. However, data analysis focuses on exploring and interpreting data to find insights, while business intelligence emphasizes the use of tools and systems to deliver data-driven reports and dashboards for ongoing business monitoring.
数据分析和商业智能(BI)是紧密相连的领域。两者都涉及收集和分析数据以支持决策。然而,数据分析侧重于探索和解释数据以发现洞察,而商业智能强调使用工具和系统来提供数据驱动的报告和仪表板,用于持续的业务监控。
118. What does data wrangling involve?
数据整理涉及哪些内容?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c71 | 官方: 否 | 付费: 否
答案:
Data wrangling is the process of cleaning, structuring, and enriching raw data to prepare it for analysis. This includes handling missing or inconsistent data, correcting errors, transforming data formats, and combining datasets to create a reliable and usable dataset for further exploration and modeling.Data wrangling is essential for transforming raw data into a usable format, which involves cleaning, structuring, and enriching the data.
数据整理是清理、结构化和丰富原始数据以准备分析的过程,包括处理缺失或不一致的数据、纠正错误、转换数据格式以及合并数据集,以创建可靠可用的数据集供进一步探索和建模。数据整理对于将原始数据转换为可用格式至关重要,涉及清洗、结构化和丰富数据。
119. How do descriptive and predictive analysis differ?
描述性分析和预测性分析有何不同?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c74 | 官方: 否 | 付费: 否
答案:
Descriptive analysis summarizes historical data to understand what has happened, using techniques like summary statistics and data visualization. Predictive analysis uses statistical models and machine learning to forecast future events or trends based on historical data, helping organizations anticipate outcomes and make proactive decisions.
描述性分析通过汇总统计数据和数据可视化等技术,概括历史数据以了解已发生的情况。预测性分析则使用统计模型和机器学习,基于历史数据预测未来事件或趋势,帮助组织预见结果并做出主动决策。
120. What are univariate, bivariate, and multivariate analyses?
什么是单变量分析、双变量分析和多变量分析?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c77 | 官方: 否 | 付费: 否
答案:
Univariate analysis examines a single variable to understand its distribution and characteristics. Bivariate analysis explores the relationship between two variables, often using correlation or regression techniques. Multivariate analysis involves three or more variables simultaneously to study complex interactions and patterns within the data.
单变量分析检查单个变量以了解其分布和特征。双变量分析探讨两个变量之间的关系,通常使用相关性或回归技术。多变量分析同时涉及三个或更多变量,以研究数据中的复杂交互和模式。
121. What is feature engineering in data analysis?
数据分析中的特征工程是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c7a | 官方: 否 | 付费: 否
答案:
Feature engineering is the process of selecting, creating, and transforming variables (features) from raw data to improve the performance of statistical models or machine learning algorithms. It includes techniques like encoding categorical variables, creating interaction terms, and scaling numerical data to enhance model accuracy.
特征工程是从原始数据中选择、创建和转换变量(特征)的过程,以提高统计模型或机器学习算法的性能。它包括编码分类变量、创建交互项和缩放数值数据等技术,以增强模型准确性。
122. What is data normalization, and why is it necessary?
什么是数据归一化,为什么它是必要的?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c7d | 官方: 否 | 付费: 否
答案:
Data normalization is the technique of scaling numerical data to a common range or distribution, often between 0 and 1 or to have a mean of zero and standard deviation of one. Normalization is important to ensure that features contribute equally to analysis or modeling, especially when variables have different units or scales.
数据归一化是将数值数据缩放到常见范围或分布的技术,通常在0到1之间,或使其具有零均值和单位标准差。归一化很重要,以确保特征在分析或建模中贡献均衡,尤其是当变量具有不同单位或尺度时。
123. Which Python libraries are essential for data analysis?
哪些Python库对数据分析至关重要?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c80 | 官方: 否 | 付费: 否
答案:
Key Python libraries for data analysis include Pandas for data manipulation, NumPy for numerical computations, Matplotlib and Seaborn for data visualization, and SciPy and Scikit-learn for statistical analysis and machine learning. These libraries provide powerful tools to clean, analyze, visualize, and model data efficiently.
数据分析的关键Python库包括用于数据操作的Pandas、用于数值计算的NumPy、用于数据可视化的Matplotlib和Seaborn,以及用于统计分析和机器学习的SciPy和Scikit-learn。这些库提供了强大的工具,能高效地清洗、分析、可视化和建模数据。
124. How is the Pandas library used in data analysis?
Pandas库如何进行数据分析?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c83 | 官方: 否 | 付费: 否
答案:
Pandas provides data structures like DataFrames and Series that facilitate easy manipulation, cleaning, and analysis of structured data. It supports operations such as filtering, grouping, aggregating, and merging datasets, making it essential for handling tabular data in Python.
Pandas提供DataFrame和Series等数据结构,便于轻松操作、清洗和分析结构化数据。它支持筛选、分组、聚合和合并数据集等操作,使其成为在Python中处理表格数据的重要工具。
125. What distinguishes a Pandas Series from a DataFrame?
Pandas Series与DataFrame有何区别?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c86 | 官方: 否 | 付费: 否
答案:
A Pandas Series is a one-dimensional labeled array capable of holding any data type, while a DataFrame is a two-dimensional labeled data structure with columns that can hold different types of data. Essentially, a DataFrame is a collection of Series sharing the same index.
Pandas Series是一维带标签的数组,能容纳任何数据类型,而DataFrame是二维带标签的数据结构,其列可容纳不同类型的数据。本质上,DataFrame是共享相同索引的Series的集合。
126. What is One-Hot Encoding, and why is it used?
什么是一热编码,为什么使用它?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c89 | 官方: 否 | 付费: 否
答案:
One-Hot Encoding is a technique to convert categorical variables into a binary matrix representation where each category is represented by a separate column with 1s and 0s indicating presence or absence. It enables machine learning algorithms to process categorical data effectively.
独热编码是一种将分类变量转换为二元矩阵表示的技术,其中每个类别由一个单独的列表示,并使用1和0指示存在或缺失。它使机器学习算法能够有效处理分类数据。
127. What is a boxplot, and how does it assist in data analysis?
什么是箱线图,它如何辅助数据分析?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c8c | 官方: 否 | 付费: 否
答案:
A boxplot is a graphical representation of data distribution based on five-number summary: minimum, first quartile, median, third quartile, and maximum. It helps identify central tendency, variability, and outliers in the data, making it a valuable tool in exploratory data analysis.
箱线图是基于五数概括(最小值、第一四分位数、中位数、第三四分位数和最大值)的数据分布图形表示。它有助于识别数据的集中趋势、变异性和异常值,使其成为探索性数据分析中的宝贵工具。
128. How do the roles of data analysts and data scientists differ?
数据分析师和数据科学家的角色有何不同?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c8f | 官方: 否 | 付费: 否
答案:
While both data analysts and data scientists work with data, their roles differ in scope and focus. Data analysts primarily gather, clean, and analyze data to identify trends and produce reports that aid business decisions. Data scientists, on the other hand, develop advanced statistical models and machine learning algorithms to predict future outcomes and automate processes, often requiring deeper programming and statistical expertise.
虽然数据分析师和数据科学家都处理数据,但他们的角色在范围和重点上有所不同。数据分析师主要收集、清理和分析数据,以识别趋势并生成有助于商业决策的报告。相比之下,数据科学家开发高级统计模型和机器学习算法,以预测未来结果和自动化流程,通常需要更深入的编程和统计专业知识。
129. What steps are involved in analyzing a dataset?
分析数据集涉及哪些步骤?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c92 | 官方: 否 | 付费: 否
答案:
Analyzing a dataset typically involves the following steps: defining the problem, collecting relevant data, cleaning and preprocessing the data to handle missing or inconsistent values, performing exploratory data analysis (EDA) to identify patterns and trends, applying statistical or machine learning models, and finally, communicating the findings through reports or visualizations.
分析数据集通常涉及以下步骤:定义问题、收集相关数据、清理和预处理数据以处理缺失或不一致的值、执行探索性数据分析(EDA)以识别模式和趋势、应用统计或机器学习模型,最后通过报告或可视化传达发现。
130. What is hypothesis testing? Explain with a data analyst example.
什么是假设检验?请用数据分析师的例子说明。
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c95 | 官方: 否 | 付费: 否
答案:
Hypothesis testing is a statistical method used to determine whether there is enough evidence in a sample to support a claim about a population.
假设检验是一种统计方法,用于确定样本中是否有足够证据支持关于总体的声明。
The process usually follows these steps:
该过程通常遵循以下步骤:
- Define the hypotheses.
- Null hypothesis (H₀): no effect or no difference.
- Alternative hypothesis (H₁): there is an effect or difference.
- Choose a significance level (α), commonly 0.05.
- Select an appropriate statistical test (t-test, z-test, chi-square, etc.) depending on the data type and sample size.
- Calculate the p-value and compare it to α.
If p
For example, imagine I’m analyzing an A/B test for an e-commerce checkout page.例如,假设我在分析电子商务结账页面的A/B测试。
- H₀: The new checkout design does not affect conversion rate.
- H₁: The new checkout design increases conversion rate.
After running the experiment, I calculate the p-value. If the p-value is less than 0.05, I reject the null hypothesis and conclude that the new design has a statistically significant impact on conversions.
运行实验后,我计算p值。如果p值小于0.05,我拒绝零假设,并得出结论:新设计对转化率具有统计显著影响。
There are two types of errors to be aware of: - Type I error: Rejecting a true null hypothesis - false positive.
需要注意两种类型的错误:- 第一类错误:拒绝真实零假设——即假阳性。
Type II error: Failing to reject a false null hypothesis - false negative.
It’s also important to understand that the p-value is not the probability that the hypothesis is true. It measures how likely the observed data would be if the null hypothesis were true.同样重要的是理解p值不是假设为真的概率。它衡量的是,如果零假设为真,观察到的数据出现的可能性有多大。
Finally, statistical significance does not always mean practical significance. A 0.01% improvement in conversion rate may be statistically significant with a large sample size, but it might not meaningfully impact business revenue.
最后,统计显著性并不总是意味着实际显著性。使用大样本时,0.01%的转化率提升可能在统计上显著,但对业务收入可能没有实质性影响。
131. What is the difference between correlation and causation? Why does this matter for data analysts?
相关性和因果关系有什么区别?为什么这对数据分析师很重要?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c98 | 官方: 否 | 付费: 否
答案:
Correlation measures the strength and direction of a relationship between two variables. If two variables move together, they are correlated.
相关性衡量两个变量之间关系的强度和方向。如果两个变量一起变动,它们就存在相关性。
Causation means one variable directly causes a change in another.
因果关系意味着一个变量直接导致另一个变量发生变化。
The key principle is: correlation does not imply causation.
关键原则是:相关性并不蕴含因果关系。
For example, ice cream sales and drowning incidents both increase during summer. They are correlated, but ice cream does not cause drowning. The underlying factor is temperature or season. This hidden factor is called a confounding or lurking variable.
例如,冰淇淋销量和溺水事件在夏季都会增加。它们存在相关性,但冰淇淋并不会导致溺水。潜在的因素是温度或季节。这种隐藏因素被称为混杂变量或潜在变量。
This distinction matters because data analysts often identify patterns in historical data. If I present a correlation as a causal relationship without evidence, stakeholders may make incorrect decisions.
这种区别很重要,因为数据分析师经常在历史数据中识别模式。如果我未经证据就将相关性呈现为因果关系,利益相关者可能会做出错误的决策。
To establish causation, I need stronger evidence, such as: - Controlled experiments (like A/B testing)
要建立因果关系,我需要更坚实的证据,例如:受控实验(如A/B测试)
- Clear temporal order (cause happens before effect)
Elimination of confounding variables
There are also spurious correlations, where two variables appear related purely by coincidence.还存在虚假相关性,即两个变量看似相关但纯属巧合。
Another important concept is Simpson’s Paradox. This occurs when a trend observed in aggregated data reverses when the data is segmented. Without careful analysis, I might draw the wrong conclusion from high-level numbers.
另一个重要概念是辛普森悖论。当总数据中观察到的趋势在数据分段后发生逆转时,就会出现这种情况。如果不仔细分析,我可能会从宏观数字中得出错误的结论。
132. What are the different types of data sampling techniques?
数据采样有哪些不同类型?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c9b | 官方: 否 | 付费: 否
答案:
Sampling means selecting a subset of data from a larger population to analyze and draw conclusions.
采样是指从更大的总体中选择数据子集来进行分析和得出结论。
The main types of sampling techniques are:
采样技术的主要类型包括:
- Simple Random Sampling: Every element in the population has an equal chance of being selected. This can be done using a random number generator or lottery method. This works well when the population is relatively homogeneous and easy to access.
- Stratified Sampling: The population is divided into homogeneous subgroups called strata based on a characteristic like age, region, or income level. Then, random samples are taken from each stratum. This ensures that important subgroups are properly represented, especially minority groups.
- Systematic Sampling: You select every k-th element from an ordered list. For example, every 10th customer in a database. This is simple to implement but can introduce bias if the list has hidden patterns.
- Cluster Sampling: The population is divided into clusters, such as cities or schools. Then a few clusters are randomly selected, and all or some members within those clusters are studied. This is useful when the population is geographically dispersed and collecting data from all locations is expensive.
- Convenience Sampling: Data is collected from easily accessible sources. For example, surveying people who walk into a store. This method is quick but prone to bias because the sample may not represent the entire population.
One key concern in sampling is sampling bias . Bias occurs when certain groups are overrepresented or underrepresented in the sample. To avoid it, analysts should:
采样中的一个关键问题是采样偏差。当样本中某些群体被过度代表或代表不足时,偏差就会出现。为避免这种情况,分析师应:
- Clearly define the population.
- Use probability-based sampling methods when possible.
- Ensure minority segments are not excluded.
- Check whether the sampling method introduces hidden patterns.
Choosing the right sampling technique depends on the research goal, population structure, and available resources.
选择正确的采样技术取决于研究目标、总体结构和可用资源。
133. What is the ETL process and why is it important for data analysis?
什么是ETL流程,为什么它对数据分析很重要?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5c9e | 官方: 否 | 付费: 否
答案:
ETL stands for Extract, Transform, Load. It is the process of moving data from source systems into a format suitable for analysis.
ETL代表提取、转换、加载。它是将数据从源系统移动到适合分析格式的过程。
Extract means collecting data from various sources such as databases, APIs, spreadsheets, cloud platforms, or flat files.
提取是指从各种来源收集数据,例如数据库、API、电子表格、云平台或平面文件。
Transform involves cleaning and preparing the data. This can include: - Removing duplicates
转换涉及清洗和准备数据,这可能包括:- 移除重复项
- Handling missing values
- Standardizing formats
- Converting data types
- Applying business rules
Aggregating data
Load means storing the transformed data into a target system such as a data warehouse, data lake, or BI tool.加载意味着将转换后的数据存储到目标系统中,如数据仓库、数据湖或商业智能工具。
ETL is important because data quality directly affects analysis quality. If the extraction or transformation is incorrect, the final insights will be misleading. Many reporting mismatches happen due to transformation logic rather than analytical errors.
ETL很重要,因为数据质量直接影响分析质量。如果提取或转换不正确,最终见解将具有误导性。许多报告不匹配源于转换逻辑而非分析错误。
Understanding ETL helps analysts troubleshoot discrepancies between dashboards and source systems. Even if a data engineer manages the pipeline, an analyst should understand how the data was cleaned and structured.
理解ETL有助于分析师解决仪表板与源系统之间的差异。即使数据工程师管理管道,分析师也应理解数据是如何被清洗和结构化组织的。
In many organizations, analysts also build lightweight ETL processes themselves using SQL views, Power Query, or Python scripts.
在许多组织中,分析师也会利用SQL视图、Power Query或Python脚本自行构建轻量级ETL流程。
A modern variation is ELT (Extract, Load, Transform). In ELT, raw data is first loaded into a cloud data warehouse such as Snowflake or BigQuery, and transformations happen inside the warehouse. This approach leverages scalable cloud compute power.
一个现代变体是ELT(提取、加载、转换)。在ELT中,原始数据首先被加载到像Snowflake或BigQuery这样的云数据仓库中,转换发生在仓库内部。这种方法利用可扩展的云计算能力。
134. What is the difference between OLAP and OLTP systems?
OLAP和OLTP系统之间有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: data-analysis, analytics;标签: interviewbit, data-analyst, topic-specific, data-analysis, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5c58d557c902ba5ca1 | 官方: 否 | 付费: 否
答案:
OLTP (Online Transaction Processing) systems are designed to handle day-to-day business transactions. These systems support operations like insert, update, and delete in real time. They are optimized for fast writes and high concurrency.
OLTP(在线事务处理)系统旨在处理日常业务事务。这些系统实时支持插入、更新和删除等操作。它们针对快速写入和高并发进行了优化。
Examples include banking systems processing transactions, e-commerce platforms recording orders, or CRM systems storing customer updates.
示例包括处理交易的银行系统、记录订单的电子商务平台,或存储客户更新的CRM系统。
OLTP databases typically use highly normalized schemas, often in third normal form (3NF). This reduces redundancy and maintains data integrity. However, normalized structures are not optimized for large analytical queries.
OLTP数据库通常采用高度规范化的模式,通常是第三范式(3NF)。这减少了冗余并维护了数据完整性。然而,规范化结构不适合大型分析查询。
OLAP (Online Analytical Processing) systems are designed for analysis and reporting. They handle complex queries involving aggregations, comparisons, trends, and historical data analysis.
OLAP(在线分析处理)系统专为分析和报告而设计。它们处理涉及聚合、比较、趋势和历史数据分析的复杂查询。
Examples include data warehouses, BI dashboards, and reporting systems used by analysts and management teams.
示例包括数据仓库、商业智能仪表板,以及分析师和管理团队使用的报告系统。
OLAP systems are optimized for fast reads rather than writes. They usually use denormalized schemas such as star or snowflake schemas. Fact tables store measurable data, and dimension tables store descriptive attributes. This structure makes aggregation queries efficient.
OLAP系统针对快速读取而非写入进行了优化。它们通常使用去规范化模式,如星型或雪花模式。事实表存储可测量数据,维度表存储描述性属性。这种结构使聚合查询高效。
From a data analyst’s perspective, most analysis should run on OLAP systems, not OLTP systems. Running heavy aggregation queries on an OLTP production database can slow down business applications.
从数据分析师的角度来看,大多数分析应运行在OLAP系统上,而非OLTP系统。在OLTP生产数据库上运行繁重的聚合查询可能会减慢业务应用程序的速度。
That’s why data warehouses are used. They separate analytical workloads from transactional workloads. Data is extracted from OLTP systems, transformed through ETL processes, and loaded into OLAP systems for reporting and analysis.
这就是为什么使用数据仓库。它们将分析工作负载与事务工作负载分离。数据从OLTP系统中提取,通过ETL流程转换,并加载到OLAP系统中用于报告和分析。
In short: - OLTP handles operational transactions.
简而言之:- OLTP处理运营事务。
- OLAP supports analytical queries.
- OLTP is optimized for fast writes and many concurrent users.
- OLAP is optimized for fast reads over large historical datasets.
135. What is Apache Spark?
什么是Apache Spark?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d84 | 官方: 否 | 付费: 否
答案:
Apache Spark is an open-source distributed processing solution for big data workloads. For rapid queries against any size of data, it uses in-memory caching and efficient query execution. Simply put, Spark is a general-purpose data processing engine that is quick and scalable.
Apache Spark是一个用于大数据工作负载的开源分布式处理解决方案。为了对任意大小的数据进行快速查询,它使用内存缓存和高效的查询执行。简而言之,Spark是一个快速且可扩展的通用数据处理引擎。
136. What is the difference between Spark and MapReduce?
Spark和MapReduce之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d87 | 官方: 否 | 付费: 否
答案:
Spark is a MapReduce improvement in Hadoop. The difference between Spark and MapReduce is that Spark processes and retains data in memory for later steps, whereas MapReduce processes data on the disc. As a result, Spark's data processing speed is up to 100 times quicker than MapReduce for lesser workloads. Spark also constructs a Directed Acyclic Graph (DAG) to schedule tasks and orchestrate nodes throughout the Hadoop cluster, as opposed to MapReduce's two-stage execution procedure.
Spark是Hadoop中MapReduce的一个改进。Spark和MapReduce的区别在于,Spark将数据在内存中处理和保留以供后续步骤使用,而MapReduce在磁盘上处理数据。因此,对于较小的工作负载,Spark的数据处理速度比MapReduce快达100倍。Spark还构建有向无环图(DAG)来调度任务并编排整个Hadoop集群中的节点,这与MapReduce的两阶段执行过程不同。
137. What is the difference between HDFS block and InputSplit?
HDFS块和InputSplit之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d8a | 官方: 否 | 付费: 否
答案:
| Block 块 | InputSplit |
|---|---|
| In Hadoop, a block is the physical representation of data. 在Hadoop中,块是数据的物理表示。 | InputSplit is the logical representation of data in a block. It is primarily used in the MapReduce program or other data processing techniques. InputSplit是块中数据的逻辑表示,主要用在MapReduce程序或其他数据处理技术中。 |
| The HDFS block size is set to 128MB by default, but you can modify it to suit your needs. Except for the last block, which can be the same size or less, all HDFS blocks are the same size. HDFS块大小默认设置为128MB,但您可以根据需求修改。除最后一个块可以相同或更小外,所有HDFS块大小相同。 | By default, the InputSplit size is nearly equal to the block size. 默认情况下,InputSplit大小几乎等于块大小。 |
138. What is the Heartbeat in Hadoop?
Hadoop中的心跳是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d8d | 官方: 否 | 付费: 否
答案:
The heartbeat is a communication link that runs between the Namenode and the Datanode. It's the signal that the Datanode sends to the Namenode at regular intervals. If a Datanode in HDFS fails to send a heartbeat to Namenode after 10 minutes, Namenode assumes the Datanode is unavailable.
心跳是运行在Namenode和Datanode之间的通信链路。它是Datanode定期发送给Namenode的信号。如果HDFS中的Datanode在10分钟后未能向Namenode发送心跳,Namenode将假定该Datanode不可用。
139. What is Data Modeling?
什么是数据建模?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d90 | 官方: 否 | 付费: 否
答案:
Data Modeling is the act of creating a visual representation of an entire information system or parts of it in order to express linkages between data points and structures. The purpose is to show the many types of data that are used and stored in the system, as well as the relationships between them, how the data can be classified and arranged, and its formats and features. Data can be modeled according to the needs and requirements at various degrees of abstraction. The process begins with stakeholders and end-users providing information about business requirements. These business rules are then converted into data structures, which are used to create a concrete database design.
数据建模是创建整个信息系统或其部分的可视化表示,以表达数据点和结构之间的关联的行为。其目的是展示系统中使用和存储的多种数据类型,以及它们之间的关系、数据如何分类和排列,及其格式和特性。数据可以根据不同抽象程度的需求和要求进行建模。该过程始于利益相关者和最终用户提供业务需求信息,然后将这些业务规则转换为数据结构,用于创建具体的数据库设计。
- Data Science
- All Events
- My Events
140. What are the design schemas available in data modeling?
数据建模中有哪些可用的设计模式?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d93 | 官方: 否 | 付费: 否
答案:
There are two design schemas available in data modeling: - Star Schema
数据建模中有两种可用的设计模式:- 星型模式
- Snowflake Schema
141. What is the difference between a data engineer and a data scientist?
数据工程师和数据科学家之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d96 | 官方: 否 | 付费: 否
答案:
- Data science is a broad topic of research. It focuses on extracting data from extremely huge datasets (sometimes it is known as "big data"). Data scientists can operate in a variety of fields, including industry, government, and applied sciences. All data scientists have the same goal: to analyze data and derive insights from it that are relevant to their field of work.
- A data engineer's job is to develop or integrate many components of complex systems, taking into account the information needed, the company's goals, and the end requirements. This necessitates the creation of extremely complicated data pipelines. These data pipelines, like oil pipelines, take raw, unstructured data from a variety of sources. They then channel them into a single database (or larger structure) for storage.
Read More: Key Difference Between Data Engineer and Data Scientist .
阅读更多:数据工程师和数据科学家之间的关键区别。
142. What are the differences between structured and unstructured data?
结构化和非结构化数据之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d99 | 官方: 否 | 付费: 否
答案:
| On the basis of 依据 | Structured 结构化 | Unstructured 非结构化 |
|---|---|---|
| Storage 存储 | Structured data is stored in DBMS. 结构化数据存储在DBMS中。 | It is stored in unmanaged file structures. 它存储在非管理的文件结构中。 |
| Flexibility 灵活性 | It is less flexible as it is dependent on the schema. 由于依赖于模式,灵活性较低。 | It is more flexible. 灵活性更高。 |
| Scalability 可扩展性 | Not easy to scale. 不易扩展。 | Easy to scale. 易于扩展。 |
| Performance 性能 | Since we can perform a structured query, the performance is high. 由于可以执行结构化查询,性能高。 | The performance of unstructured data is low. 非结构化数据的性能低。 |
| Analysis factor 分析因素 | Easy to analyze. 易于分析。 | Hard to analyze. 难以分析。 |
143. What are the features of Hadoop?
Hadoop 有哪些特性?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d9c | 官方: 否 | 付费: 否
答案:
Hadoop has the following features:
Hadoop 具有以下特性:
- It is open-source and easy to use.
- Hadoop is extremely scalable. A significant volume of data is split across several devices in a cluster and processed in parallel. According to the needs of the hour, the number of these devices or nodes can be increased or decreased.
- Data in Hadoop is copied across multiple DataNodes in a Hadoop cluster, ensuring data availability even if one of your systems fails.
- Hadoop is built in such a way that it can efficiently handle any type of dataset, including structured (MySQL Data), semi-structured (XML, JSON), and unstructured (Images and Videos). This means it can analyze any type of data regardless of its form, making it extremely flexible.
- Hadoop provides faster data processing. More Features.
144. Which frameworks and applications are important for data engineers?
对于数据工程师,哪些框架和应用程序是重要的?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5d9f | 官方: 否 | 付费: 否
答案:
SQL, Amazon Web Services, Hadoop, and Python are all required skills for data engineers. Other tools critical for data engineers are PostgreSQL, MongoDB, Apache Spark, Apache Kafka, Amazon Redshift, Snowflake, and Amazon Athena.
SQL、Amazon Web Services、Hadoop 和 Python 都是数据工程师必备的技能。其他对数据工程师至关重要的工具包括 PostgreSQL、MongoDB、Apache Spark、Apache Kafka、Amazon Redshift、Snowflake 和 Amazon Athena。
145. What is HDFS?
什么是 HDFS?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5da2 | 官方: 否 | 付费: 否
答案:
HDFS is an acronym for Hadoop Distributed File System. It is a distributed file system that runs on commodity hardware and can handle massive data collections.
HDFS 是 Hadoop 分布式文件系统的缩写。它是一个运行在商用硬件上的分布式文件系统,能够处理海量数据集合。
146. What is a NameNode?
什么是 NameNode?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5da5 | 官方: 否 | 付费: 否
答案:
The HDFS system is built on the foundation of NameNode. It keeps track of where the data file is kept by storing the directory tree of the files in a single file system.
HDFS 系统建立在 NameNode 的基础上。它通过存储单一文件系统中的文件目录树,来跟踪数据文件存储的位置。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
147. What are the repercussions of the NameNode crash?
NameNode 崩溃会带来什么影响?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5da8 | 官方: 否 | 付费: 否
答案:
In an HDFS cluster, there is only one NameNode. This node keeps track of DataNode metadata. Because there is only one NameNode in an HDFS cluster, it is the single point of failure. The system may become inaccessible if NameNode crashes. In a high-availability system, a passive NameNode backs up the primary one and takes over if the primary one fails.
在 HDFS 集群中,只有一个 NameNode。此节点跟踪 DataNode 的元数据。由于 HDFS 集群中只有一个 NameNode,因此它是单点故障源。如果 NameNode 崩溃,系统可能变得不可访问。在高可用系统中,一个备用 NameNode 会备份主 NameNode,并在主 NameNode 发生故障时接管其职责。
148. What is a block and block scanner in HDFS?
HDFS 中的块和块扫描器是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dab | 官方: 否 | 付费: 否
答案:
- Block: In HDFS, a "block" refers to the smallest amount of data that may be read or written.
- Block Scanner: Block Scanner keeps track of the list of blocks on a DataNode and checks them for checksum problems. To save disc bandwidth on the data node, Block Scanners use a throttling technique.
149. What are the components of Hadoop?
Hadoop 的组件有哪些?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dae | 官方: 否 | 付费: 否
答案:
Hadoop has the following components:
Hadoop 具有以下组件:
- Hadoop Common: A collection of Hadoop tools and libraries.
- Hadoop HDFS: Hadoop's storage unit is the Hadoop Distributed File System (HDFS). HDFS stores data in a distributed fashion. HDFS is made up of two parts: a name node and a data node. While there is only one name node, numerous data nodes are possible.
- Hadoop MapReduce: Hadoop's processing unit is MapReduce. The processing is done on the slave nodes in the MapReduce technique, and the final result is delivered to the master node.
- Hadoop YARN: Hadoop's YARN is an acronym for Yet Another Resource Negotiator. It is Hadoop's resource management unit, and it is included in Hadoop version 2 as a component. It's in charge of managing cluster resources to avoid overloading a single machine.
150. Explain MapReduce in Hadoop.
解释 Hadoop 中的 MapReduce。
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5db1 | 官方: 否 | 付费: 否
答案:
MapReduce is a programming model and software framework for processing large volumes of data. Map and Reduce are the two phases of MapReduce. The map turns a set of data into another set of data by breaking down individual elements into tuples (key/value pairs). Second, there's the reduction job, which takes the result of a map as an input and condenses the data tuples into a smaller set. The reduction work is always executed after the map job, as the name MapReduce suggests.
MapReduce 是一种用于处理大量数据的编程模型和软件框架。Map 和 Reduce 是 MapReduce 的两个阶段。Map 阶段通过将单个元素分解为元组(键/值对),将一组数据转换为另一组数据。其次,是 Reduce 作业,它接受 Map 的输出作为输入,并将数据元组压缩为较小的集合。正如名称 MapReduce 所示,Reduce 作业总是在 Map 作业之后执行。
151. What is Data Engineering?
什么是数据工程?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5db5 | 官方: 否 | 付费: 否
答案:
The application of data collecting and analysis is the emphasis of data engineering . The information gathered from numerous sources is merely raw information. Data engineering helps in the transformation of unusable data into useful information. It is the process of transforming, cleansing, profiling, and aggregating huge data sets in a nutshell.
数据收集与分析的应用是数据工程的重点。从众多来源收集的信息仅仅是原始信息。数据工程有助于将不可用的数据转化为有用的信息。简而言之,它是转换、清洗、分析和聚合大型数据集的过程。
152. How does the NameNode communicate with the DataNode?
NameNode如何与DataNode通信?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5db8 | 官方: 否 | 付费: 否
答案:
The NameNode and the DataNode communicate via these messages: - Block reports
NameNode和DataNode通过以下消息进行通信:- 块报告
- Heartbeats
153. What happens when the block scanner detects a corrupt data block?
当块扫描器检测到损坏的数据块时会发生什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dbb | 官方: 否 | 付费: 否
答案:
The following steps occur when the block scanner detects a corrupt data block: - First and foremost, when the Block Scanner detects a corrupted data block, DataNode notifies NameNode.
当块扫描器检测到损坏的数据块时,会发生以下步骤:- 首先,当块扫描器检测到损坏的数据块时,DataNode会通知NameNode。
- NameNode begins the process of constructing a new replica from a corrupted block replica.
- The replication factor is compared to the replication count of the right replicas. The faulty data block will not be removed if a match is detected.
154. Explain indexing.
解释索引。
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dbe | 官方: 否 | 付费: 否
答案:
Indexing is a technique for improving database performance by reducing the number of disc accesses necessary when a query is run. It's a data structure strategy for finding and accessing data in a database rapidly.
索引是一种通过减少查询运行时所需的磁盘访问次数来提高数据库性能的技术。它是一种用于快速查找和访问数据库中数据的结构策略。
155. Explain the main methods of reducer.
解释reducer的主要方法。
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dc1 | 官方: 否 | 付费: 否
答案:
These are the main methods of reducer: - setup(): This command is used to specify parameters such as the size of input data and the distributed cache.
reducer的主要方法有:- setup():此命令用于指定参数,如输入数据的大小和分布式缓存。
- cleaning(): is a function for deleting temporary files.
- reduce(): it's called once per key with the corresponding reduced task.
156. What is COSHH?
什么是COSHH?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dc4 | 官方: 否 | 付费: 否
答案:
Classification and Optimization-based Scheduling for Heterogeneous Hadoop Systems (COSHH), as the name implies, enables scheduling at both the cluster and application levels to have a direct positive impact on task completion time.
异构Hadoop系统的分类与基于优化的调度(COSHH),顾名思义,支持在集群和应用程序级别进行调度,对任务完成时间产生直接的积极影响。
157. What is the relevance of Apache Hadoop's Distributed Cache?
Apache Hadoop的分布式缓存有何相关性?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dc7 | 官方: 否 | 付费: 否
答案:
Hadoop Distributed Cache is a Hadoop MapReduce Framework technique that provides a service for copying read-only files, archives, or jar files to worker nodes before any job tasks are executed on that node. To minimize network bandwidth, files are usually copied only once per job. Distributed Cache is a program that distributes read-only data/text files, archives, jars, and other files.
Hadoop分布式缓存是Hadoop MapReduce框架的一种技术,提供了一项服务,用于在任何作业任务在该节点上执行之前,将只读文件、归档或jar文件复制到工作节点。为最小化网络带宽,文件通常每个作业仅复制一次。分布式缓存是一个分发只读数据/文本文件、归档、jar等文件的程序。
158. What are the four Vs of Big Data?
大数据的四个V是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dcb | 官方: 否 | 付费: 否
答案:
The four characteristics or four Vs of Big data are: - Volume
大数据的四个特征或四个V是:- 数据量
- Veracity
- Velocity
- Variety
159. Explain the Star Schema in Brief.
简要解释星型模式。
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dd0 | 官方: 否 | 付费: 否
答案:
In a data warehouse, a star schema can include one fact table and a number of associated dimension tables in the center. It's called a star schema because its structure resembles that of a star. The simplest sort of Data Warehouse schema is the Star Schema data model. It is also known as the Star Join Schema, and it is designed for massive data sets.
在数据仓库中,星型模式可以包含一个事实表和中心位置多个关联的维度表。它之所以被称为星型模式,是因为其结构类似于一颗星星。最简单的一种数据仓库模式就是星型模式数据模型,也称为星型连接模式,专为大规模数据集而设计。
160. Explain the Snowflake Schema in Brief.
简要解释什么是雪花模式?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dd3 | 官方: 否 | 付费: 否
答案:
A snowflake schema is a logical arrangement of tables in a multidimensional database that matches the snowflake shape (in the ER diagram). A Snowflake Schema is an enlarged Star Schema with additional dimensions. After the dimension tables have been normalized, the data is separated into new tables.
雪花模式是多维数据库中表的一种逻辑排列,其形状(在ER图中)类似于雪花。雪花模式是星型模式的扩展版,增加了额外的维度。在维度表被规范化后,数据会被分离到新的表中。
Snowflaking has the potential to improve the performance of certain queries. The schema is organized so that each fact is surrounded by its related dimensions, and those dimensions are linked to other dimensions, forming a snowflake pattern.
雪花化有可能提高某些查询的性能。该模式的组织方式是每个事实被其相关维度包围,而这些维度又与其他维度相链接,从而形成雪花图案。
161. Name the XML configuration files present in Hadoop.
列出Hadoop中存在的XML配置文件。
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dd6 | 官方: 否 | 付费: 否
答案:
XML configuration files available in Hadoop are: - Core-site
Hadoop中可用的XML配置文件有:- Core-site
- Mapred-site
- Yarn-site
- HDFS-site
162. What is Hadoop Streaming?
什么是Hadoop流式处理?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5dd9 | 官方: 否 | 付费: 否
答案:
It is a utility or feature included with a Hadoop distribution that allows developers or programmers to construct Map-Reduce programs in many programming languages such as Python, C++, Ruby, Pearl, and others. We can use any language that can read from standard input (STDIN), such as keyboard input, and write using standard output (STDOUT).
它是Hadoop发行版附带的一个实用工具或功能,允许开发人员或程序员使用多种编程语言(如Python、C++、Ruby、Perl等)构建Map-Reduce程序。我们可以使用任何能够从标准输入(STDIN)读取(如键盘输入)并通过标准输出(STDOUT)写入的语言。
163. What is the Replication factor?
什么是复制因子?
- 知识点: 数据工程与数据科学/AI (主题: data-engineering;标签: interviewbit, data-engineer, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5d58d557c902ba5ddc | 官方: 否 | 付费: 否
答案:
The replication factor is the number of times the Hadoop framework replicates each Data Block. Fault tolerance is provided by replicating the block. The replication factor is set to 3 by default, however, it can be modified to 2 (less than 3) or raised to meet your needs (more than 3.)
复制因子是Hadoop框架复制每个数据块的次数。通过复制数据块来提供容错能力。复制因子默认设置为3,但可以根据需要修改为2(少于3)或增加(多于3)。
164. What is a NoSQL database?
什么是NoSQL数据库?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e27 | 官方: 否 | 付费: 否
答案:
NoSQL database is a type of database that does not require a fixed schema. It is non-relational and non-relational and usually avoids joins in preference of schema variation for achieving better performance. It is also very easy to scale based on the application’s needs. NoSQL is used for storing huge data in a distributed manner. NoSQL Databases are of four types:
NoSQL数据库是一种不需要固定模式的数据库类型。它是非关系型的,通常避免使用连接,而倾向于模式变化以获得更好的性能。它也非常容易根据应用需求进行扩展。NoSQL用于以分布式方式存储海量数据。NoSQL数据库有四种类型:
- Column-based - These organize data in columns instead of rows. The rows in these databases have many columns associated with them. These are useful in fraud detection systems, catalogues, recommendation engines etc. Example: Cassandra, Hypertable, Hbase, Amazon DynamoDB etc
- Graph-based - These organize data into nodes and edges. The edges show connections between different nodes. It is multi-relational. These are mostly used in social networks, Logistic domain etc. Example: Neo4J, OrientDB, Infinite Graph, FlockDB etc
- Document-based - These types store semi-structured data in the form of documents. These are similar to key-value type databases and the difference is that the values in this type store values in the form of JSON, BSON, XML etc. Example: MongoDB, RavenDB, Terrastore etc
- Key-value - Simple NoSQL data model consisting of unique keys and values linked with it. It performs efficiently and is highly scalable. Redis and Memcached are some examples of this database type and is mostly used in caching applications, session management.
165. What is Data Modelling?
什么是数据建模?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e2a | 官方: 否 | 付费: 否
答案:
Data Modelling is defined as the process of creating a model that represents the data and the relationship between different data to store it in a database. It can also be called database modelling and this skill is useful across all domains like data engineering, data science, software development etc to prepare, analyse and process the data by continuously reorganizing, restructuring and optimizing it for fitting the needs of the company/organization.
数据建模被定义为创建模型的过程,该模型表示数据以及不同数据之间的关系,以便将其存储在数据库中。它也可以称为数据库建模,这一技能在数据工程、数据科学、软件开发等所有领域都很有用,通过持续重组、重构和优化数据以适应公司/组织的需求,来准备、分析和处理数据。
166. What is Denormalization?
什么是反规范化?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e2d | 官方: 否 | 付费: 否
答案:
Denormalization is the opposite of normalization which helps in improving the read performance by compensating the write performance by adding redundant data copies. It has duplicate data entries in the database for increasing the performance of read-heavy loads.
反规范化是规范化的对立面,通过添加冗余数据副本来补偿写入性能,从而帮助提高读取性能。它在数据库中有重复的数据条目,以提高重读取负载的性能。
167. What is cardinality?
什么是基数?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e33 | 官方: 否 | 付费: 否
答案:
Cardinality represents the level of uniqueness of data values present in a column. The high value of cardinality tells us that the column has a large percentage of unique values. Low cardinality indicates that the data is repeated (duplicated) in the column.
基数表示列中数据值的唯一性程度。高基数告诉我们该列包含大量独特值。低基数表示列中的数据是重复的(重复出现)。
168. What is a Relational Database?
什么是关系数据库?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e36 | 官方: 否 | 付费: 否
答案:
A relational database is a digital database system that is based on a relational data model and is useful for storing data in tables. Oracle, Teradata, MySQL, PostgreSQL, SQLite etc are types of relational databases. The data is transformed into rows and columns which is standardized and can be queried with SQL. RDBMS helps to add/ alter tables and column data into the database systematically by maintaining data integrity.
关系数据库是一种基于关系数据模型的数字数据库系统,适用于以表格形式存储数据。Oracle、Teradata、MySQL、PostgreSQL、SQLite 等都属于关系数据库类型。数据被转换为行列格式,标准化后可通过 SQL 查询。RDBMS 通过维护数据完整性,帮助系统地添加/修改数据库中的表和列数据。
169. What is the significance of metadata?
元数据有什么意义?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e39 | 官方: 否 | 付费: 否
答案:
Metadata is the information about data that tells what data kind is stored in the system, what is the purpose and to whom it is intended. There are different types of metadata depending on the purpose, they are: - Technical Metadata – This type defines names of the database system and tables, size of tables, values, attributes, data types etc. It also includes constraint information like primary keys, foreign keys, indexes etc.
元数据是关于数据的信息,它告诉我们系统中存储了哪种数据,其用途以及目标对象是谁。根据用途不同,元数据有多种类型,包括:- 技术元数据——此类定义了数据库系统和表的名称、表的大小、值、属性、数据类型等。它还包括约束信息,如主键、外键、索引等。
- Business Metadata – This data is specific to business and defines the data ownership, business regulations and rules, policies etc.
- Descriptive Metadata – This type of data gives information about folder, file, image, book or video. Information can be title, date, size, author, published on etc.
- Operational Metadata – This type includes information related to any business operation and is used by managers or executives for performing any task.
170. What is a data mart?
什么是数据集市?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e3c | 官方: 否 | 付费: 否
答案:
A data mart is a condensed data warehouse version (a subset of a data warehouse) designed for a specific unit or a department like Marketing, Sales, HR, finance etc in an organization. There can be different data marts specific to individual departments which can interact with the data warehouse for information processing as shown in the image below:
数据集市是数据仓库的浓缩版本(数据仓库的一个子集),专为组织中的特定部门(如市场、销售、人力资源、财务等)设计。可以针对各个部门设立不同的数据集市,它们可以与数据仓库交互以进行信息处理,如下图所示:
171. What is OLAP?
什么是OLAP?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e3f | 官方: 否 | 付费: 否
答案:
OLAP stands for On-Line Analytical Processing and it is a type of technology that authorizes managers, executives and analysts for gaining insights in a faster, secure, consistent and interactive manner. OLAP is used in Intelligent solutions involving Planning, Budgeting, Analysis, Forecasting, Simulation Models etc. OLAP helps clients to perform analysis considering multiple dimensions and helps in providing insights that help in better decision making.
OLAP 代表联机分析处理,是一种技术,使经理、高管和分析师能够以更快、更安全、一致且交互的方式获取洞察。OLAP 用于涉及规划、预算编制、分析、预测、模拟模型等智能解决方案。OLAP 帮助客户从多个维度进行分析,并提供有助于更好决策的洞察。
172. What is OLTP?
什么是OLTP?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e42 | 官方: 否 | 付费: 否
答案:
OLTP stands for Online Transaction Processing which is an operational system supporting transaction-oriented applications in 3-tier architecture. It focuses on query processing, data integrity maintenance, transaction effectiveness per second in multi-access environments. Some of the examples of OLTP systems are: - Sending text messages.
OLTP 代表联机事务处理,是一种在三层架构中支持面向事务应用的运营系统。它专注于多访问环境中的查询处理、数据完整性维护、每秒事务效率。OLTP 系统的一些示例包括:- 发送短信。
- Online banking.
- Online airline ticket booking.
- Order entry.
- Adding items to the shopping cart.
173. What is a database management system?
什么是数据库管理系统?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e45 | 官方: 否 | 付费: 否
答案:
Database Management System (DBMS) is software consisting of a group of programs that manipulates the database for storing and retrieving the user data.
数据库管理系统(DBMS)是由一组程序组成的软件,用于操纵数据库以存储和检索用户数据。
174. What is hashing?
什么是哈希?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e48 | 官方: 否 | 付费: 否
答案:
Hashing is a technique that helps to search index values to retrieve required data. It is used for calculating the direct location of data using indexing.
哈希是一种通过搜索索引值来检索所需数据的技术。它用于通过索引计算数据的直接位置。
175. What do you mean by data sparsity?
数据稀疏性是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e4b | 官方: 否 | 付费: 否
答案:
Data sparsity refers to the number of empty cells in the database. It represents how much data is available for a particular dimension in a data model. Inadequate information leads to large space consumption for saving aggregations.
数据稀疏性指的是数据库中空单元格的数量。它表示在数据模型中某个特定维度有多少可用数据。信息不足会导致保存聚合时占用大量空间。
176. What is granularity?
什么是粒度?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e4e | 官方: 否 | 付费: 否
答案:
Granularity represents the information level stored in a database table. It can be high or low level with tables that contain transaction-level or fact table respectively. Granularity is also a measure of smallest set of data which can be independently processed by any component/task/application.
粒度表示数据库表中存储的信息级别。它可以是高或低级别,分别对应包含事务级别或事实表的表。粒度也是衡量可由任何组件/任务/应用程序独立处理的最小组数据集的指标。
177. What do you understand by dimension in data?
你如何理解数据中的维度?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e51 | 官方: 否 | 付费: 否
答案:
Dimensions represent the set of unique values that are useful for identifying and categorizing the data from the data warehouse.
维度表示一组唯一值,这些值有助于从数据仓库中识别和分类数据。
178. What is a data model? What are its types?
什么是数据模型?它有哪几种类型?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e54 | 官方: 否 | 付费: 否
答案:
A data model is an information schema that sorts and normalizes different information components and establishes relations between them. These models subsequently become tables in the database which can be retrieved and processed based on the organization’s requirements. There are three types of data models, they are: - Conceptual data model: This type of model focuses on high-level, abstract and users view of data representation. It defines what the system contains and is created by data architects and business stakeholders. The main purpose of this model is data organization and defining the scope and business rules. Following are the characteristics of the conceptual data model:
数据模型是一种信息模式,它对不同信息组件进行排序和规范化,并建立它们之间的关系。这些模型随后成为数据库中的表,可以根据组织的需求进行检索和处理。数据模型有三种类型,它们是:- 概念数据模型:这种模型侧重于数据表示的高级别、抽象和用户视图。它定义系统包含的内容,由数据架构师和业务利益相关者创建。此模型的主要目的是数据组织和定义范围及业务规则。以下是概念数据模型的特征:
This provides an overall overview of data structure in terms of business context. Contains some concepts that are not required for database implementation but are required for a business for understanding the need for features in the applications. Represents data needed for performing business processes and operations. - Physical data model: In this model, we define the database schema and how the data is stored in the database physically. Following are the characteristics of the physical data model:
这提供了数据结构在业务上下文方面的总体概述。包含一些对于数据库实现不必要但业务理解应用功能需求所必需的概念。表示执行业务流程和操作所需的数据。- 物理数据模型:在此模型中,我们定义数据库模式以及数据在数据库中物理存储的方式。以下是物理数据模型的特征:
It describes the data required for the application. It can be integrated with different physical models depending on the scope of the application. This defines relationships between different tables which addresses cardinality and nullability of relationships. This model is developed for specific DBMS versions, data storage, locations or technologies used in the application. This model also consists of exact data types, constraints, lengths and default values. It also defines primary and foreign key references, indexes, views, profiles and authorizations. - Logical data models: This data model lies between the conceptual and physical model and describes the logical representation of data. Following are the characteristics of the model:
它描述应用程序所需的数据。可以根据应用程序的范围与不同的物理模型集成。这定义了不同表之间的关系,处理关系基数和可空性。此模型是为特定DBMS版本、数据存储、位置或应用程序中使用的技术开发的。此模型还包括精确的数据类型、约束、长度和默认值。它还定义主键和外键引用、索引、视图、配置文件和授权。- 逻辑数据模型:此数据模型位于概念模型和物理模型之间,描述数据的逻辑表示。以下是此模型的特征:
It describes the data needs of a project and can also be integrated with other logical models depending on the scope of the application which in turn guides the physical model. This data model is designed and developed independently from DBMS. It also consists of attributes like data types and exact length and precisions. It contains normalization processes of the model and is applied till it achieves 3NF.
它描述项目的数据需求,也可以根据应用程序的范围与其他逻辑模型集成,这反过来指导物理模型。此数据模型独立于DBMS设计和开发。它还包括属性,如数据类型、精确长度和精度。它包含模型的规范化过程,并应用直到达到3NF。
179. What are the benefits of data modelling?
数据建模有哪些好处?
- 知识点: 数据工程与数据科学/AI (主题: data-modelling;标签: interviewbit, data-modelling, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e58 | 官方: 否 | 付费: 否
答案:
Data modelling helps professionals from different domains like software development, business analytics, data science , etc to view the data, understand the relationship between the data objects in a data warehouse or a database. Following are the main benefits of this process: - Reduce errors during the software development
数据建模帮助来自软件开发、业务分析、数据科学等不同领域的专业人员查看数据,理解数据仓库或数据库中数据对象之间的关系。以下是此过程的主要好处:- 减少软件开发期间的错误
- Improve the performance of the application and the database.
- Ease the process of mapping data between the different processes in an organization.
- Helps to improve communication between the business intelligence and the developer teams.
- Enhances the speed of database design at conceptual, logical and physical levels.
- Proper data modelling process helps to reduce the cost of maintenance when the system grows at a large scale.
- It also supports the reusability of the data models when the requirements are repetitive
- Improves the quality of data and enhances the robustness of the application.
180. What is Data Science?
什么是数据科学?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e99 | 官方: 否 | 付费: 否
答案:
An interdisciplinary field that constitutes various scientific processes, algorithms, tools, and machine learning techniques working to help find common patterns and gather sensible insights from the given raw input data using statistical and mathematical analysis is called Data Science.
一个跨学科领域,包含各种科学过程、算法、工具和机器学习技术,利用统计和数学分析帮助从给定的原始输入数据中发现常见模式并收集合理见解,这就是数据科学。
The following figure represents the life cycle of data science.
下图表示数据科学的生命周期。
- It starts with gathering the business requirements and relevant data.
- Once the data is acquired, it is maintained by performing data cleaning, data warehousing, data staging, and data architecture.
- Data processing does the task of exploring the data, mining it, and analyzing it which can be finally used to generate the summary of the insights extracted from the data.
- Once the exploratory steps are completed, the cleansed data is subjected to various algorithms like predictive analysis, regression, text mining, recognition patterns, etc depending on the requirements.
- In the final stage, the results are communicated to the business in a visually appealing manner. This is where the skill of data visualization, reporting, and different business intelligence tools come into the picture. Learn More.
181. Define the terms KPI, lift, model fitting, robustness and DOE.
定义术语KPI、提升度、模型拟合、稳健性和实验设计(DOE)。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e9c | 官方: 否 | 付费: 否
答案:
- KPI: KPI stands for Key Performance Indicator that measures how well the business achieves its objectives.
- Lift: This is a performance measure of the target model measured against a random choice model. Lift indicates how good the model is at prediction versus if there was no model.
- Model fitting: This indicates how well the model under consideration fits given observations.
- Robustness: This represents the system’s capability to handle differences and variances effectively.
- DOE: stands for the design of experiments, which represents the task design aiming to describe and explain information variation under hypothesized conditions to reflect variables.
182. What is the difference between data analytics and data science?
数据分析与数据科学有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5e9f | 官方: 否 | 付费: 否
答案:
- Data science involves the task of transforming data by using various technical analysis methods to extract meaningful insights using which a data analyst can apply to their business scenarios.
- Data analytics deals with checking the existing hypothesis and information and answers questions for a better and effective business-related decision-making process.
- Data Science drives innovation by answering questions that build connections and answers for futuristic problems. Data analytics focuses on getting present meaning from existing historical context whereas data science focuses on predictive modeling.
- Data Science can be considered as a broad subject that makes use of various mathematical and scientific tools and algorithms for solving complex problems whereas data analytics can be considered as a specific field dealing with specific concentrated problems using fewer tools of statistics and visualization.
The following Venn diagram depicts the difference between data science and data analytics clearly:
以下维恩图清晰地描绘了数据科学与数据分析之间的差异:
183. What are some of the techniques used for sampling? What is the main advantage of sampling?
采样中常用的一些技术有哪些?采样主要优点是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ea2 | 官方: 否 | 付费: 否
答案:
Data analysis can not be done on a whole volume of data at a time especially when it involves larger datasets. It becomes crucial to take some data samples that can be used for representing the whole population and then perform analysis on it. While doing this, it is very much necessary to carefully take sample data out of the huge data that truly represents the entire dataset.
数据分析无法一次性处理全部数据,尤其是涉及较大数据集时。因此,抽取一些能代表总体数据的样本并对其进行分析就显得至关重要。在此过程中,从海量数据中仔细提取真正代表整个数据集的样本是非常必要的。
There are majorly two categories of sampling techniques based on the usage of statistics, they are: - Probability Sampling techniques: Clustered sampling, Simple random sampling, Stratified sampling.
基于统计学的使用方式,采样技术主要有两大类,分别是:- 概率采样技术:聚类采样、简单随机采样、分层采样。
- Non-Probability Sampling techniques: Quota sampling, Convenience sampling, snowball sampling, etc.
184. List down the conditions for Overfitting and Underfitting.
列出过拟合和欠拟合发生的条件。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ea5 | 官方: 否 | 付费: 否
答案:
Overfitting: The model performs well only for the sample training data. If any new data is given as input to the model, it fails to provide any result. These conditions occur due to low bias and high variance in the model. Decision trees are more prone to overfitting.
过拟合:模型仅对样本训练数据表现良好。如果给模型输入任何新数据,它就无法提供任何结果。这些情况是由于模型中的低偏差和高方差造成的。决策树更容易出现过拟合。
Underfitting: Here, the model is so simple that it is not able to identify the correct relationship in the data, and hence it does not perform well even on the test data. This can happen due to high bias and low variance. Linear regression is more prone to Underfitting.
欠拟合:在这种情况下,模型过于简单,无法识别数据中的正确关系,因此即使在测试数据上表现也不佳。这可能是由于高偏差和低方差造成的。线性回归更容易出现欠拟合。
185. Differentiate between the long and wide format data.
区分长格式数据和宽格式数据。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ea8 | 官方: 否 | 付费: 否
答案:
| Long format Data 长格式数据 | Wide-Format Data 宽格式数据 |
|---|---|
| Here, each row of the data represents the one-time information of a subject. Each subject would have its data in different/ multiple rows. 此处,数据的每一行代表一个受试者的单次信息。每个受试者的数据分布在不同的/多行中。 | Here, the repeated responses of a subject are part of separate columns. 此处,受试者的重复响应是不同列的一部分。 |
| The data can be recognized by considering rows as groups. 可以通过将行视为组来识别数据。 | The data can be recognized by considering columns as groups. 可以通过将列视为组来识别数据。 |
| This data format is most commonly used in R analyses and to write into log files after each trial. 这种数据格式在R分析中最常用,也用于每次试验后写入日志文件。 | This data format is rarely used in R analyses and most commonly used in stats packages for repeated measures ANOVAs. 这种数据格式在R分析中很少使用,但在用于重复测量方差分析的统计软件包中最常用。 |
The following image depicts the representation of wide format and long format data:
下图描绘了宽格式和长格式数据的表示方式:
186. What are Eigenvectors and Eigenvalues?
什么是特征向量和特征值?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eab | 官方: 否 | 付费: 否
答案:
Eigenvectors are column vectors or unit vectors whose length/magnitude is equal to 1. They are also called right vectors. Eigenvalues are coefficients that are applied on eigenvectors which give these vectors different values for length or magnitude.
特征向量是列向量或单位向量,其长度/幅度等于1。它们也被称为右向量。特征值是应用于特征向量上的系数,这些系数赋予这些向量不同的长度或幅度值。
A matrix can be decomposed into Eigenvectors and Eigenvalues and this process is called Eigen decomposition. These are then eventually used in machine learning methods like PCA (Principal Component Analysis) for gathering valuable insights from the given matrix.
矩阵可以分解为特征向量和特征值,这一过程称为特征分解。这些最终被用于机器学习方法中,如PCA(主成分分析),以从给定矩阵中获取有价值的见解。
187. What does it mean when the p-values are high and low?
p值高和低分别意味着什么?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eae | 官方: 否 | 付费: 否
答案:
A p-value is the measure of the probability of having results equal to or more than the results achieved under a specific hypothesis assuming that the null hypothesis is correct. This represents the probability that the observed difference occurred randomly by chance. - Low p-value which means values ≤ 0.05 means that the null hypothesis can be rejected and the data is unlikely with true null.
p值是衡量在原假设为真的前提下,获得与观察结果相同或更极端结果的概率。它表示观察到的差异纯属偶然发生的概率。 - 低p值,即值≤0.05,意味着可以拒绝原假设,并且数据在原假设为真时不太可能发生。
- High p-value, i.e values ≥ 0.05 indicates the strength in favor of the null hypothesis. It means that the data is like with true null.
- p-value = 0.05 means that the hypothesis can go either way.
188. When is resampling done?
什么时候进行重采样?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eb1 | 官方: 否 | 付费: 否
答案:
Resampling is a methodology used to sample data for improving accuracy and quantify the uncertainty of population parameters. It is done to ensure the model is good enough by training the model on different patterns of a dataset to ensure variations are handled. It is also done in the cases where models need to be validated using random subsets or when substituting labels on data points while performing tests.
重采样是一种用于抽取数据以提高准确性并量化总体参数不确定性的方法。它通过在不同模式的数据集上训练模型来确保模型足够好,从而处理各种变化。此外,当模型需要使用随机子集进行验证,或在执行测试时替换数据点上的标签时,也会进行重采样。
189. What do you understand by Imbalanced Data?
你如何理解不平衡数据?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eb4 | 官方: 否 | 付费: 否
答案:
Data is said to be highly imbalanced if it is distributed unequally across different categories. These datasets result in an error in model performance and result in inaccuracy.
如果数据在不同类别之间分布不均匀,则称其为高度不平衡。这些数据集会导致模型性能错误并产生不准确性。
190. Are there any differences between the expected value and mean value?
期望值和平均值有什么区别吗?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eb7 | 官方: 否 | 付费: 否
答案:
There are not many differences between these two, but it is to be noted that these are used in different contexts. The mean value generally refers to the probability distribution whereas the expected value is referred to in the contexts involving random variables.
这两者之间差异不大,但需要注意的是它们用于不同的情境。平均值通常指概率分布,而期望值则用于涉及随机变量的情境。
191. What do you understand by Survivorship Bias?
你如何理解幸存者偏差?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5eba | 官方: 否 | 付费: 否
答案:
This bias refers to the logical error while focusing on aspects that survived some process and overlooking those that did not work due to lack of prominence. This bias can lead to deriving wrong conclusions.
这种偏差指的是在关注经过某些过程后幸存下来的方面,而忽略那些因缺乏显著性而未起作用的部分时所犯的逻辑错误。这种偏差可能导致得出错误的结论。
192. What is a Gradient and Gradient Descent?
什么是梯度和梯度下降?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ebd | 官方: 否 | 付费: 否
答案:
Gradient: Gradient is the measure of a property that how much the output has changed with respect to a little change in the input. In other words, we can say that it is a measure of change in the weights with respect to the change in error. The gradient can be mathematically represented as the slope of a function.
梯度:梯度是衡量输出相对于输入微小变化所发生变化的属性量度。换句话说,可以说它是权重相对于误差变化的一种量度。梯度在数学上可以表示为函数的斜率。
Gradient Descent: Gradient descent is a minimization algorithm that minimizes the Activation function. Well, it can minimize any function given to it but it is usually provided with the activation function only.
梯度下降:梯度下降是一种最小化算法,用于最小化激活函数。虽然它可以最小化提供给它的任何函数,但通常只用于激活函数。
Gradient descent, as the name suggests means descent or a decrease in something. The analogy of gradient descent is often taken as a person climbing down a hill/mountain. The following is the equation describing what gradient descent means:
梯度下降,顾名思义,表示下降或某物的减少。梯度下降的类比常被看作是一个人下山/爬山。以下是描述梯度下降含义的方程:
So, if a person is climbing down the hill, the next position that the climber has to come to is denoted by “b” in this equation. Then, there is a minus sign because it denotes the minimization (as gradient descent is a minimization algorithm). The Gamma is called a waiting factor and the remaining term which is the Gradient term itself shows the direction of the steepest descent.
因此,如果一个人正在下山,爬山者下一个要到达的位置在此方程中用“b”表示。然后,有一个减号,因为它表示最小化(因为梯度下降是一种最小化算法)。Gamma被称为等待因子,剩下的梯度项本身表示最陡下降的方向。
This situation can be represented in a graph as follows:
这种情况可以用图表表示如下:
Here, we are somewhere at the “Initial Weights” and we want to reach the Global minimum. So, this minimization algorithm will help us do that.
在这里,我们位于“初始权重”的某处,并且希望达到全局最小值。因此,这种最小化算法将帮助我们实现这一目标。
193. Define confounding variables.
定义混杂变量。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ec0 | 官方: 否 | 付费: 否
答案:
Confounding variables are also known as confounders. These variables are a type of extraneous variables that influence both independent and dependent variables causing spurious association and mathematical relationships between those variables that are associated but are not casually related to each other.
混杂变量也称为混杂因子。这些变量是一种外部变量,同时影响自变量和因变量,导致这些相关但并非因果关联的变量之间产生虚假关联和数学关系。
194. Define and explain selection bias?
定义并解释选择偏差?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ec3 | 官方: 否 | 付费: 否
答案:
The selection bias occurs in the case when the researcher has to make a decision on which participant to study. The selection bias is associated with those researches when the participant selection is not random. The selection bias is also called the selection effect. The selection bias is caused by as a result of the method of sample collection.
选择偏差发生在研究者需要决定研究哪个参与者的情况下。选择偏差与那些参与者选择不是随机的相关研究有关。选择偏差也称为选择效应。选择偏差是由样本收集方法导致的。
Four types of selection bias are explained below:
四种类型的选择偏差解释如下:
Sampling Bias: As a result of a population that is not random at all, some members of a population have fewer chances of getting included than others, resulting in a biased sample. This causes a systematic error known as sampling bias. 2. Time interval: Trials may be stopped early if we reach any extreme value but if all variables are similar invariance, the variables with the highest variance have a higher chance of achieving the extreme value. 3. Data: It is when specific data is selected arbitrarily and the generally agreed criteria are not followed. 4. Attrition: Attrition in this context means the loss of the participants. It is the discounting of those subjects that did not complete the trial.
- 抽样偏差:由于总体完全不是随机的,总体中某些成员被包括的机会比其他成员少,导致样本有偏差。这会引起一种系统误差,称为抽样偏差。 2. 时间间隔:如果达到任何极端值,试验可能会提前停止,但如果所有变量在不变性上相似,则具有最高方差的变量更有可能达到极端值。 3. 数据:当特定数据被任意选择且不遵循普遍认同的标准时,就会出现这种情况。 4. 流失:此语境下的流失意味着参与者的损失。这是对未完成试验的受试者的剔除。
195. Define bias-variance trade-off?
定义偏差-方差权衡?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ec6 | 官方: 否 | 付费: 否
答案:
Let us first understand the meaning of bias and variance in detail:
让我们首先详细理解偏差和方差的含义:
Bias: It is a kind of error in a machine learning model when an ML Algorithm is oversimplified. When a model is trained, at that time it makes simplified assumptions so that it can easily understand the target function. Some algorithms that have low bias are Decision Trees, SVM, etc. On the other hand, logistic and linear regression algorithms are the ones with a high bias.
偏差:当机器学习算法过于简化时,它是一种机器学习模型中的错误。当模型被训练时,它会做出简化的假设,以便能轻松理解目标函数。一些低偏差的算法包括决策树、支持向量机等。另一方面,逻辑回归和线性回归算法是高偏差的。
Variance: Variance is also a kind of error. It is introduced into an ML Model when an ML algorithm is made highly complex. This model also learns noise from the data set that is meant for training. It further performs badly on the test data set. This may lead to over lifting as well as high sensitivity.
方差:方差也是一种错误。当机器学习算法被构建得非常复杂时,它会引入到机器学习模型中。该模型还会从用于训练的数据集中学习噪声。它进一步在测试数据集上表现糟糕。这可能导致过拟合以及高敏感性。
When the complexity of a model is increased, a reduction in the error is seen. This is caused by the lower bias in the model. But, this does not happen always till we reach a particular point called the optimal point. After this point, if we keep on increasing the complexity of the model, it will be over lifted and will suffer from the problem of high variance. We can represent this situation with the help of a graph as shown below:
当模型复杂度增加时,可以看到误差减少。这是由于模型中的偏差较低。但这种情况并非总是发生,直到我们达到一个称为最优点的特定点。在此点之后,如果我们继续增加模型复杂度,模型将过拟合并遭受高方差问题。我们可以借助下图来表示这种情况:
As you can see from the image above, before the optimal point, increasing the complexity of the model reduces the error (bias). However, after the optimal point, we see that the increase in the complexity of the machine learning model increases the variance.
如上图所示,在最优点之前,增加模型复杂度会减少误差(偏差)。然而,在最优点之后,我们看到机器学习模型复杂度的增加会增加方差。
Trade-off Of Bias And Variance: So, as we know that bias and variance, both are errors in machine learning models, it is very essential that any machine learning model has low variance as well as a low bias so that it can achieve good performance.
偏差和方差的权衡:因此,我们知道偏差和方差都是机器学习模型中的错误,任何机器学习模型具有低方差和低偏差对于获得良好性能至关重要。
Let us see some examples. The K-Nearest Neighbor Algorithm is a good example of an algorithm with low bias and high variance. This trade-off can easily be reversed by increasing the k value which in turn results in increasing the number of neighbours. This, in turn, results in increasing the bias and reducing the variance.
让我们看一些例子。K-最近邻算法是低偏差高方差算法的典型例子。这种权衡可以通过增加k值轻松逆转,这反过来导致邻居数量增加。这反过来导致偏差增加和方差减少。
Another example can be the algorithm of a support vector machine. This algorithm also has a high variance and obviously, a low bias and we can reverse the trade-off by increasing the value of parameter C. Thus, increasing the C parameter increases the bias and decreases the variance.
另一个例子是支持向量机算法。该算法也具有高方差,显然低偏差,我们可以通过增加参数C的值来逆转权衡。因此,增加C参数会增加偏差并减少方差。
So, the trade-off is simple. If we increase the bias, the variance will decrease and vice versa.
所以,权衡很简单。如果我们增加偏差,方差将减少,反之亦然。
196. Define the confusion matrix?
什么是混淆矩阵?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ec9 | 官方: 否 | 付费: 否
答案:
It is a matrix that has 2 rows and 2 columns. It has 4 outputs that a binary classifier provides to it. It is used to derive various measures like specificity, error rate, accuracy, precision, sensitivity, and recall.
它是一个有2行和2列的矩阵。它包含二元分类器提供的4个输出。它用于推导各种度量,如特异性、错误率、准确率、精确率、敏感度和召回率。
The test data set should contain the correct and predicted labels. The labels depend upon the performance. For instance, the predicted labels are the same if the binary classifier performs perfectly. Also, they match the part of observed labels in real-world scenarios. The four outcomes shown above in the confusion matrix mean the following:
测试数据集应包含正确的标签和预测标签。标签取决于性能。例如,如果二元分类器完美执行,则预测标签相同。此外,在现实场景中,它们与观测标签的部分匹配。上面混淆矩阵中显示的四个输出含义如下:
True Positive: This means that the positive prediction is correct. 2. False Positive: This means that the positive prediction is incorrect. 3. True Negative: This means that the negative prediction is correct. 4. False Negative: This means that the negative prediction is incorrect.
- 真阳性:这意味着阳性预测是正确的。 2. 假阳性:这意味着阳性预测是不正确的。 3. 真阴性:这意味着阴性预测是正确的。 4. 假阴性:这意味着阴性预测是不正确的。
The formulas for calculating basic measures that comes from the confusion matrix are:
从混淆矩阵计算基本度量的公式是:
Error rate: (FP + FN)/(P + N) 2. Accuracy: (TP + TN)/(P + N) 3. Sensitivity = TP/P 4. Specificity = TN/N 5. Precision = TP/(TP + FP) 6. F-Score = (1 + b)(PREC.REC)/(b2 PREC + REC) Here, b is mostly 0.5 or 1 or 2.
- 错误率:(FP + FN)/(P + N) 2. 准确率:(TP + TN)/(P + N) 3. 敏感度 = TP/P 4. 特异性 = TN/N 5. 精确率 = TP/(TP + FP) 6. F分数 = (1 + b)(PREC.REC)/(b2 PREC + REC) 这里,b通常是0.5、1或2。
In these formulas:
在这些公式中:
FP = false positive FN = false negative TP = true positive RN = true negative
FP = 假阳性 FN = 假阴性 TP = 真阳性 RN = 真阴性
Also,
还有,
Sensitivity is the measure of the True Positive Rate. It is also called recall. Specificity is the measure of the true negative rate. Precision is the measure of a positive predicted value. F-score is the harmonic mean of precision and recall.
敏感度是真阳性率的度量。它也被称为召回率。特异性是真阴性率的度量。精确率是阳性预测值的度量。F分数是精确率和召回率的调和平均值。
197. What is logistic regression? State an example where you have recently used logistic regression.
什么是逻辑回归?举一个你最近使用逻辑回归的例子。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ecc | 官方: 否 | 付费: 否
答案:
Logistic Regression is also known as the logit model. It is a technique to predict the binary outcome from a linear combination of variables (called the predictor variables).
逻辑回归也被称为logit模型。它是一种从变量的线性组合(称为预测变量)预测二元结果的技术。
For example , let us say that we want to predict the outcome of elections for a particular political leader. So, we want to find out whether this leader is going to win the election or not. So, the result is binary i.e. win (1) or loss (0). However, the input is a combination of linear variables like the money spent on advertising, the past work done by the leader and the party, etc.
例如,假设我们想预测特定政治领导人的选举结果。因此,我们想找出这位领导人是否会赢得选举。所以,结果是二元的,即赢(1)或输(0)。然而,输入是线性变量的组合,如广告花费、领导人和政党过去的工作等。
198. What is Linear Regression? What are some of the major drawbacks of the linear model?
什么是线性回归?线性模型的一些主要缺点是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ecf | 官方: 否 | 付费: 否
答案:
Linear regression is a technique in which the score of a variable Y is predicted using the score of a predictor variable X. Y is called the criterion variable. Some of the drawbacks of Linear Regression are as follows: - The assumption of linearity of errors is a major drawback.
线性回归是一种使用预测变量X的分数来预测变量Y的分数的方法。Y被称为标准变量。线性回归的一些缺点如下: - 误差的线性假设是一个主要缺点。
- It cannot be used for binary outcomes. We have Logistic Regression for that.
- Overfitting problems are there that can’t be solved.
199. What is a random forest? Explain it’s working.
什么是随机森林?解释它的工作原理。
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ed2 | 官方: 否 | 付费: 否
答案:
Classification is very important in machine learning. It is very important to know to which class does an observation belongs. Hence, we have various classification algorithms in machine learning like logistic regression, support vector machine, decision trees, Naive Bayes classifier, etc. One such classification technique that is near the top of the classification hierarchy is the random forest classifier.
分类在机器学习中非常重要。了解观测值属于哪个类别非常关键。因此,我们在机器学习中有各种分类算法,如逻辑回归、支持向量机、决策树、朴素贝叶斯分类器等。其中一种位于分类层次结构顶端的分类技术是随机森林分类器。
So, firstly we need to understand a decision tree before we can understand the random forest classifier and its works. So, let us say that we have a string as given below:
所以,首先我们需要理解决策树,然后才能理解随机森林分类器及其工作原理。那么,假设我们有一个如下所示的字符串:
So, we have the string with 5 ones and 4 zeroes and we want to classify the characters of this string using their features. These features are colour (red or green in this case) and whether the observation (i.e. character) is underlined or not. Now, let us say that we are only interested in red and underlined observations. So, the decision tree would look something like this:
我们有这个字符串,包含5个1和4个0,我们想根据它们的特征来分类这些字符。这些特征是颜色(本例中为红色或绿色)以及观测值(即字符)是否带有下划线。现在,假设我们只对红色且带下划线的观测值感兴趣。那么,决策树看起来会像这样:
So, we started with the colour first as we are only interested in the red observations and we separated the red and the green-coloured characters. After that, the “No” branch i.e. the branch that had all the green coloured characters was not expanded further as we want only red-underlined characters. So, we expanded the “Yes” branch and we again got a “Yes” and a “No” branch based on the fact whether the characters were underlined or not.
所以,我们首先从颜色开始,因为我们只对红色观测值感兴趣,并将红色和绿色字符分开。之后,“否”分支,即包含所有绿色字符的分支,没有进一步扩展,因为我们只想要红色带下划线的字符。因此,我们扩展了“是”分支,并根据字符是否带下划线再次获得了“是”和“否”分支。
So, this is how we draw a typical decision tree. However, the data in real life is not this clean but this was just to give an idea about the working of the decision trees. Let us now move to the random forest.
这就是我们绘制典型决策树的方式。然而,现实生活中的数据并不这么干净,但这只是为了让你了解决策树的工作原理。现在让我们转向随机森林。
Random Forest
随机森林
It consists of a large number of decision trees that operate as an ensemble. Basically, each tree in the forest gives a class prediction and the one with the maximum number of votes becomes the prediction of our model. For instance, in the example shown below, 4 decision trees predict 1, and 2 predict 0. Hence, prediction 1 will be considered.
它由大量作为集成运行的决策树组成。基本上,森林中的每棵树都会给出一个类别预测,获得最多票数的那个预测成为我们模型的预测结果。例如,在下面所示的示例中,4棵决策树预测为1,2棵预测为0。因此,预测1将被采纳。
The underlying principle of a random forest is that several weak learners combine to form a keen learner. The steps to build a random forest are as follows: - Build several decision trees on the samples of data and record their predictions.
随机森林的基本原理是,多个弱学习器组合形成一个聪明的学习器。构建随机森林的步骤如下:- 在数据样本上构建多个决策树,并记录它们的预测结果。
- Each time a split is considered for a tree, choose a random sample of mm predictors as the split candidates out of all the pp predictors. This happens to every tree in the random forest.
- Apply the rule of thumb i.e. at each split m = p√m = p.
- Apply the predictions to the majority rule.
200. In a time interval of 15-minutes, the probability that you may see a shooting star or a bunch of them is 0.2. What is the percentage chance of you seeing at least one star shooting from the sky if you are under it for about an hour?
在15分钟的时间间隔内,你看到一颗或多颗流星的概率是0.2。如果你在天空下待大约一个小时,你看到至少一颗流星从天空划过的百分比机会是多少?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ed6 | 官方: 否 | 付费: 否
答案:
Let us say that Prob is the probability that we may see a minimum of one shooting star in 15 minutes.
让我们说Prob是我们在15分钟内至少看到一颗流星的概率。
So, Prob = 0.2
所以,Prob = 0.2
Now, the probability that we may not see any shooting star in the time duration of 15 minutes is = 1 - Prob
现在,在15分钟的时间段内我们看不到任何流星的概率是 = 1 - Prob
1-0.2 = 0.8
The probability that we may not see any shooting star for an hour is:
我们在一小时内看不到任何流星的概率是:
= (1-Prob)(1-Prob)(1-Prob)(1-Prob) = 0.8 0.8 0.8 0.8 = (0.8)⁴ ≈ 0.40
= (1-Prob)(1-Prob)(1-Prob)(1-Prob) = 0.8 0.8 0.8 0.8 = (0.8)⁴ ≈ 0.40
So, the probability that we will see one shooting star in the time interval of an hour is = 1-0.4 = 0.6
所以,在一小时的时间间隔内我们将看到一颗流星的概率是 = 1-0.4 = 0.6
So, there are approximately 60% chances that we may see a shooting star in the time span of an hour.
因此,在一个小时的时间跨度内我们可能看到流星的机会大约为60%。
201. What is deep learning? What is the difference between deep learning and machine learning?
什么是深度学习?深度学习和机器学习之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-science, analytics;标签: interviewbit, data-science, topic-specific, analytics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a5e58d557c902ba5ed9 | 官方: 否 | 付费: 否
答案:
Deep learning is a paradigm of machine learning. In deep learning, multiple layers of processing are involved in order to extract high features from the data. The neural networks are designed in such a way that they try to simulate the human brain.
深度学习是机器学习的一种范式。在深度学习中,涉及多层处理以从数据中提取高级特征。神经网络的设计方式使其试图模拟人脑。
Deep learning has shown incredible performance in recent years because of the fact that it shows great analogy with the human brain.
近年来,深度学习表现出惊人的性能,因为它与人脑有很好的类比性。
The difference between machine learning and deep learning is that deep learning is a paradigm or a part of machine learning that is inspired by the structure and functions of the human brain called the artificial neural networks. Learn More .
机器学习和深度学习之间的区别在于,深度学习是机器学习的一个范式或部分,它受到人脑结构和功能的启发,称为人工神经网络。了解更多。
202. What do you understand about metadata and why is it used for?
你如何理解元数据,以及为什么使用它?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba603d | 官方: 否 | 付费: 否
答案:
Metadata is defined as information about data. Metadata is the context that provides data a more complete identity and serves as the foundation for its interactions with other data. It can also be a useful tool for saving time, staying organised, and getting the most out of the files you're working with. Structural Metadata describes how an object should be classified in order to fit into a wider system of things. Structural Metadata makes a link with other files that allows them to be categorized and used in a variety of ways. Administrative Metadata contains information about an object's history, who owned it previously, and what it can be used for. Rights, licences, and permissions are examples. This information is useful for persons who are in charge of managing and caring for an asset.
元数据被定义为关于数据的信息。元数据是上下文,为数据提供更完整的身份,并作为其与其他数据交互的基础。它也是节省时间、保持组织和充分利用工作文件的实用工具。结构元数据描述对象应如何分类以适应更广泛的系统。结构元数据与其他文件建立链接,使其能够被分类并以多种方式使用。管理元数据包含关于对象历史、先前所有者及其用途的信息。权利、许可证和许可是示例。这些信息对负责管理和维护资产的人员很有用。
When a piece of information is placed in the correct context, it takes on a whole new meaning. Furthermore, better-organized Metadata will considerably reduce search time.
当一条信息被放置在正确的上下文中时,它会呈现出全新的含义。此外,组织更好的元数据将显著减少搜索时间。
203. What do you understand about a data cube in the context of data warehousing?
在数据仓库的背景下,你如何理解数据立方体?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6040 | 官方: 否 | 付费: 否
答案:
A data cube is a multidimensional data model that stores optimized, summarized, or aggregated data for quick and easy analysis using OLAP technologies. The precomputed data is stored in a data cube, which makes online analytical processing easier. We all think of a cube as a three-dimensional structure, however in data warehousing, an n-dimensional data cube can be implemented. A data cube stores information in terms of dimensions and facts.
数据立方体是一种多维数据模型,存储优化、汇总或聚合的数据,以便使用OLAP技术快速轻松分析。预计算的数据存储在数据立方体中,这使得在线分析处理更容易。我们通常认为立方体是三维结构,但在数据仓库中,可以实现n维数据立方体。数据立方体以维度和事实的方式存储信息。
Data Cubes have two categories. They are as follows : - Multidimensional Data Cube : Data is stored in multidimensional arrays, which allows for a multidimensional view of the data. A multidimensional data cube aids in the storage of vast amounts of information. A multidimensional data cube uses indexing to represent each dimension of the data cube, making it easier to access, retrieve, and store data.
数据立方体有两类。如下所示:- 多维数据立方体:数据存储在多维数组中,这允许数据的多维视图。多维数据立方体有助于存储大量信息。多维数据立方体使用索引来表示数据立方体的每个维度,使其更易于访问、检索和存储数据。
- Relational Data Cube : The relational data cube can be thought of as an "expanded version of relational DBMS." Data is stored in relational tables, and each relational table represents a data cube's dimension. The relational data cube uses SQL to produce aggregated data, although it is slower than the multidimensional data cube in terms of performance. The relational data cube, on the other hand, is scalable for data that grows over time.
204. What do you mean by snowflake schema in the context of data warehousing?
在数据仓库的背景下,你所说的雪花模式是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6043 | 官方: 否 | 付费: 否
答案:
Snowflake Schema is a multidimensional model that is also used in data warehouses. The fact tables, dimension tables, and sub dimension tables are all contained in the snowflake schema. With fact tables, dimension tables, and sub-dimension tables, this schema forms a snowflake.
雪花模式是一种多维模型,也用于数据仓库。事实表、维度表和子维度表都包含在雪花模式中。通过事实表、维度表和子维度表,此模式形成雪花形状。
205. Explain what you mean by a star schema in the context of data warehousing.
在数据仓库的背景下,解释你所说的星型模式是什么意思。
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6046 | 官方: 否 | 付费: 否
答案:
Star schema is a sort of multidimensional model and is used in a data warehouse. The fact tables and dimension tables are both contained in the star schema. There are fewer foreign-key joins in this design. With fact and dimension tables, this schema forms a star.
星型模式是一种多维模型,用于数据仓库。事实表和维度表都包含在星型模式中。此设计中外键连接较少。通过事实表和维度表,此模式形成星形。
206. Enlist some of the renowned ETL tools currently used in the industry.
列出当前行业中一些知名的ETL工具。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6049 | 官方: 否 | 付费: 否
答案:
Some of the renowned ETL tools currently used in the industry are as follows : - Informatica
当前行业中一些知名的ETL工具如下:- Informatica
- Talend
- Pentaho
- Abnitio
- Oracle Data Integrator
- Xplenty
- Skyvia
- Microsoft – SQL Server Integrated Services (SSIS)
207. Enlist a few data warehouse solutions that are currently being used in the industry.
列举几种目前在业界使用的数据仓库解决方案。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba604c | 官方: 否 | 付费: 否
答案:
Some of the major data warehouse solutions currently being used in the industry are as follows : - Snowflakes
目前在业界使用的一些主要数据仓库解决方案如下:- Snowflake
- Oracle Exadata
- Apache Hadoop
- SAP BW4HANA
- Microfocus Vertica
- Teradata
- AWS Redshift
- GCP Big Query
208. What do you mean by data mining? Differentiate between data mining and data warehousing.
数据挖掘是什么意思?区分数据挖掘和数据仓库。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba604f | 官方: 否 | 付费: 否
答案:
Data mining is the process of collecting information in order to find patterns, trends, and usable data that will help a company to make data-driven decisions from large amounts of data. In other words, Data Mining is the method of analysing hidden patterns of data from various perspectives for categorization into useful data, which is gathered and assembled in specific areas such as data warehouses, efficient analysis, data mining algorithm, assisting decision making, and other data requirements, ultimately resulting in cost-cutting and revenue generation. Data mining is the process of automatically examining enormous amounts of data for patterns and trends that go beyond simple analysis. Data mining estimates the probability of future events by utilising advanced mathematical algorithms for data segments.
数据挖掘是从大量数据中收集信息以发现模式、趋势和可用数据的过程,这些数据将帮助公司做出数据驱动的决策。换句话说,数据挖掘是一种从不同角度分析数据隐藏模式的方法,以将其分类为有用数据,这些数据收集并汇总在特定领域,如数据仓库、高效分析、数据挖掘算法、辅助决策和其他数据需求,最终实现成本削减和收入增长。数据挖掘是自动检查大量数据以发现超越简单分析的模式和趋势的过程。数据挖掘通过利用高级数学算法对数据段进行未来事件概率的估算。
Following are the differences between data warehousing and data mining :-
以下是数据仓库和数据挖掘之间的区别:-
| Data Warehousing 数据仓库 | Data Mining 数据挖掘 |
|---|---|
| A data warehouse is a database system that is intended for analytical rather than transactional purposes. 数据仓库是一个数据库系统,旨在用于分析而非事务处理目的。 | The technique of examining data patterns is known as data mining. 检查数据模式的技术称为数据挖掘。 |
| In data warehousing, data is saved on a regular basis. 在数据仓库中,数据会定期保存。 | In data mining, data is evaluated on a regular basis. 在数据挖掘中,数据会定期评估。 |
| Engineers are the only ones that do data warehousing. 只有工程师进行数据仓库工作。 | With the assistance of technologists, business users conduct data mining. 在技术人员的协助下,业务用户进行数据挖掘。 |
| Data warehousing is the process of bringing all relevant data together. 数据仓库是将所有相关数据汇集在一起的过程。 | Data mining is the process of extracting information from big datasets. 数据挖掘是从大型数据集中提取信息的过程。 |
| Data warehousing can be referred to as a subset of data mining. 数据仓库可以称为数据挖掘的子集。 | Data Mining can be referred to as a super set of data warehousing. 数据挖掘可以称为数据仓库的超集。 |
209. What are the characteristics of a data warehouse?
数据仓库具有哪些特征?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6052 | 官方: 否 | 付费: 否
答案:
Following are the characteristics of a data warehouse:-
以下是数据仓库的特征:-
- Subject-oriented : Because it distributes information about a theme rather than an organization's actual operations, a data warehouse is always subject-oriented. It is possible to do so with a certain theme. That is to say, the data warehousing procedure is intended to deal with a more defined theme. These themes could include sales, distribution, and marketing, for example. The focus of a data warehouse is never solely on present activities. Instead, it concentrates on demonstrating and analyzing evidence in order to reach diverse conclusions. It also provides a simple and precise demonstration around a specific theme by removing info that isn't needed to make conclusions.
- Integrated : It is similar to subject orientation in that it is created in a dependable format. Integration entails the creation of a single entity to scale all related data from several databases. The data has to be stored in several data warehouses in a shared and widely accessible manner. A data warehouse is created by combining information from a variety of sources, such as a mainframe and a relational database. It must also have dependable naming conventions, formats, and codes. The utilization of a data warehouse allows for more effective data analysis. The consistency of name conventions, column scaling, and encoding structure, among other things, should be validated. The data warehouse integration handles a variety of subject-related warehouses.
- Time-Variant : Data is kept in this system at various time intervals, such as weekly, monthly, or annually. It discovers a number of time limits that are structured between massive datasets and held in the online transaction process (OLTP). Data warehouse time limitations are more flexible than those of operational systems. The data in the data warehouse is predictable over a set period of time and provides information from a historical standpoint. It contains explicit or implicit time elements. Another property of time-variance is that data cannot be edited, altered, or updated once it has been placed in the data warehouse.
- Non-volatile : The data in a data warehouse is permanent, as the name implies. It also means that when new data is put, it is not erased or removed. It incorporates a massive amount of data that is placed into logical business alteration between the designated quantity. It assesses the analysis in the context of warehousing technologies. Data is read-only and refreshed at scheduled intervals. This is useful for analyzing historical data and understanding how things work. It is not required to have a transaction process, a recapture mechanism, or a concurrency control mechanism. In a data warehouse environment, operations like delete, update, and insert that are performed in an operational application are lost.
210. What do you mean by Active Data Warehousing?
活动数据仓库是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6055 | 官方: 否 | 付费: 否
答案:
The technical capacity to collect transactions as they change and integrate them into the warehouse, as well as maintaining batch or planned cycle refreshes, is known as active data warehousing. Automating routine processes and choices is possible with an active data warehouse. The active data warehouse sends decisions to the On-Line Transaction Processing (OLTP) systems automatically. An active data warehouse is designed to capture and distribute data in real time. They give you a unified view of your customers across all of your business lines. Business Intelligence Systems are linked to it.
活动数据仓库是指技术能力上在事务变化时收集它们并将其集成到仓库中,同时维持批处理或计划周期刷新的能力。通过活动数据仓库可以实现常规流程和决策的自动化。活动数据仓库会自动将决策发送到在线事务处理(OLTP)系统。活动数据仓库旨在实时捕获和分发数据。它们可让你在所有业务线中统一查看客户。它与商业智能系统相关联。
211. What do you mean by Real time data warehousing?
实时数据仓库是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6058 | 官方: 否 | 付费: 否
答案:
A system that reflects the condition of the warehouse in real time is referred to as real-time data warehousing. If you perform a query on the real-time data warehouse to learn more about a specific aspect of the company or entity described by the warehouse, the result reflects the status of that entity at the time the query was run. Most data warehouses contain data that is highly latent — that is, data that reflects the business at a specific point in time. A real-time data warehouse provides current (or real-time) data with low latency.
反映仓库实时状态的系统称为实时数据仓库。如果你在实时数据仓库上执行查询以了解更多关于仓库所描述的特定方面或实体的信息,结果将反映该实体在查询执行时的状态。大多数数据仓库包含高度延迟的数据——即反映业务在特定时间点的数据。实时数据仓库提供低延迟的当前(或实时)数据。
212. What do you mean by a factless fact table in the context of data warehousing?
在数据仓库上下文中,无事实事实表是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba605b | 官方: 否 | 付费: 否
答案:
A fact table with no measures is known as a factless fact table. It's essentially a crossroads of dimensions (it contains nothing but dimensional keys). One form of factless table is used to capture an event, while the other is used to describe conditions.
没有度量的事实表称为无事实事实表。它本质上是维度的交叉点(它只包含维度键)。一种类型的无事实表用于捕获事件,另一种用于描述条件。
In the first type of factless fact table, there is no measured value for an event, but it develops the relationship among the dimension members from several dimensions. The existence of the relationship is itself the fact. This type of fact table can be utilised to create valuable reports on its own. Various criteria can be used to count the number of occurrences.
在第一种类型的无事实事实表中,事件没有度量值,但它建立了来自多个维度的维度成员之间的关系。关系的存在本身就是事实。这种类型的事实表可以单独用于创建有价值的报表。可以使用各种标准来计算发生的次数。
The second type of factless fact table is a tool that's used to back up negative analytical reports. Consider a store that did not sell a product for a period of time. To create such a report, you'll need a factless fact table that captures all of the conceivable product combinations that were on offer. By comparing the factless table to the sales table for the list of things that did sell, you can figure out what's missing.
第二种类型的无事实事实表是一种用于支持负向分析报表的工具。考虑一个在某个时间段内未销售某产品的商店。要创建这样的报表,你需要一个无事实事实表来捕获所有可提供的产品组合。通过将无事实表与销售表进行比较,以确定哪些商品未售出,你可以找出缺失的内容。
213. Differentiate between data warehouse and database.
区分数据仓库和数据库。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba605e | 官方: 否 | 付费: 否
答案:
Database: A database is a logically organized collection of structured data kept electronically in a computer system. A database management system is usually in charge of a database (DBMS). The data, the DBMS, and the applications that go with them are referred to as a database system, which is commonly abbreviated to just a database.
数据库:数据库是计算机系统中电子存储的逻辑组织化结构化数据集合。通常由数据库管理系统(DBMS)负责管理。数据、DBMS及其相关应用程序统称为数据库系统,通常简称为数据库。
The following table enlists the difference between data warehouse and database:-
下表列举了数据仓库和数据库之间的区别:-
| Data Warehouse 数据仓库 | Database 数据库 |
|---|---|
| Data Warehouse uses the OnLine Analytical Processing (OLAP). 数据仓库使用联机分析处理(OLAP)。 | Database uses the OnLine Transactional Processing (OLTP). 数据库使用联机事务处理(OLTP)。 |
| Data Warehouse is mainly used for analyzing the historical data so as to make future decisions based on them. 数据仓库主要用于分析历史数据,以便基于这些数据做出未来决策。 | The database aids in the execution of basic business procedures. 数据库有助于执行基本业务流程。 |
| Because a data warehouse is denormalized, tables and joins are straightforward. 由于数据仓库是反规范化的,表和连接操作简单。 | A database's tables and joins are complicated because they are normalised. 数据库的表和连接因规范化而复杂。 |
| It can be referred to as a subject-oriented collection of data. 它可以被称为面向主题的数据集合。 | It can be referred to as an application-oriented collection of data. 它可以被称为面向应用程序的数据集合。 |
| In this, data modelling techniques are used for designing. 在此中,使用数据建模技术进行设计。 | In this, Entity-Relationship (ER) modelling techniques are used for designing. 在此中,使用实体-关系(ER)建模技术进行设计。 |
| Data may not be up to date in this. 此中的数据可能不是最新的。 | Data is generally up to date in this. 此中的数据通常是最新的。 |
| The data structure of Data Warehouse is based on a dimensional and normalised approach. For example, a star and snowflake schema is employed. 数据仓库的数据结构基于维度和规范化方法。例如,采用星型和雪花型模式。 | For data storing, the Flat Relational Approach approach is employed. 对于数据存储,采用扁平关系方法。 |
| Generally, highly summarized data is stored in a data warehouse. 通常,高度汇总的数据存储在数据仓库中。 | Generally, detailed data is stored in a database. 通常,详细数据存储在数据库中。 |
214. What are the different types of data marts in the context of data warehousing?
在数据仓库背景下,有哪些不同类型的数据集市?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6061 | 官方: 否 | 付费: 否
答案:
Following are the different types of data mart in data warehousing:
以下是数据仓库中不同类型的数据集市:
- Dependent Data Mart: A dependent data mart can be developed using data from operational, external, or both sources. It enables the data of the source company to be accessed from a single data warehouse. All data is centralized, which can aid in the development of further data marts.
- Independent Data Mart: There is no need for a central data warehouse with this data mart. This is typically established for smaller groups that exist within a company. It has no connection to Enterprise Data Warehouse or any other data warehouse. Each piece of information is self-contained and can be used independently. The analysis can also be carried out independently. It's critical to maintain a consistent and centralized data repository that numerous users can access.
- Hybrid Data Mart: A hybrid data mart is utilized when a data warehouse contains inputs from multiple sources, as the name implies. When a user requires an ad hoc integration, this feature comes in handy. This solution can be utilized if an organization requires various database environments and quick implementation. It necessitates the least amount of data purification, and the data mart may accommodate huge storage structures. When smaller data-centric applications are employed, a data mart is most effective.
215. What are the different types of data warehouse?
有哪些不同类型的数据仓库?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6064 | 官方: 否 | 付费: 否
答案:
Following are the different types of data warehouse:
以下是不同类型的数据仓库:
Enterprise Data Warehouse:
An enterprise database is a database that brings together the various functional areas of an organisation in a cohesive manner. It's a centralised location where all corporate data from various sources and apps can be accessed. They can be utilised for analytics and by everyone in the organisation once they've been saved. The data can be categorised by subject, and access is granted according to the necessary division. The tasks of extracting, converting, and conforming are taken care of in an Enterprise Datawarehouse.企业数据库是一个以连贯方式整合组织各功能领域的数据库。它是一个集中位置,可访问来自各种来源和应用程序的所有企业数据。一旦保存,即可供组织内的所有人用于分析和使用。数据可按主题分类,并根据必要部门授予访问权限。企业数据仓库中负责提取、转换和整合的任务。
Enterprise Datawarehouse's purpose is to provide a comprehensive overview of any object in the data model. This is performed by finding and wrangling the data from different systems. This is then loaded into a model that is consistent and conformed. The data is acquired by Enterprise Datawarehouse, which can provide access to a single site where various tools can be used to execute analytical functions and generate various predictions. New trends or patterns can be identified by research teams, which can then be focused on to help the company expand.
企业数据仓库的目的是提供数据模型中任何对象的全面概览。这通过查找和整理来自不同系统的数据来实现,然后加载到一致且整合的模型中。数据由企业数据仓库获取,可提供对单一站点的访问,使用各种工具执行分析功能并生成各种预测。研究团队可识别新趋势或模式,并专注于这些以帮助公司扩展。Operational Data Store (ODS):
An operational data store is utilised instead of having an operational decision support system application. It facilitates data access directly from the database, as well as transaction processing. By checking the associated business rules, the data in the Operational Data Store may be cleansed, and any redundancy found can be checked and rectified. It also aids in the integration of disparate data from many sources so that business activities, analysis, and reporting may be carried out quickly and effectively while the process is still ongoing.使用操作数据存储而非操作决策支持系统应用程序。它便于直接从数据库访问数据以及事务处理。通过检查相关业务规则,可清理操作数据存储中的数据,并检查和纠正发现的任何冗余。它还有助于整合来自多个来源的不同数据,以便在流程进行时快速有效地执行业务活动、分析和报告。
The majority of current operations are stored here before being migrated to the data warehouse for a longer period of time. It is particularly useful for simple searches and little amounts of data. It functions as short-term or temporary memory, storing recent data. The data warehouse keeps data for a long time and also keeps information that is generally permanent.
当前大部分操作都存储在此处,然后再迁移到数据仓库以长期保存。它特别适用于简单搜索和小量数据。它充当短期或临时记忆,存储最近的数据。数据仓库长期保存数据,并保留通常永久的信息。- Data Mart:Data Mart is referred to as a pattern to get client data in a data warehouse environment. It's a data warehouse-specific structure that's employed by the team's business domain. Every company has its own data mart, which is kept in the data warehouse repository. Dependent, independent, and hybrid data marts are the three types of data marts. Independent data marts collect data from external sources and data warehouses, whereas dependent data marts take data that has already been developed. Data marts can be thought of as logical subsets of a data warehouse.
216. What are the disadvantages of using a data warehouse?
使用数据仓库的缺点是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6067 | 官方: 否 | 付费: 否
答案:
Following are the disadvantages of using a data warehouse:- - Loading time of data resources is undervalued: We frequently underestimate the time it will take to gather, sanitize, and post data to the warehouse. Although some resources are in place to minimize the time and effort spent on the process, it may require a significant amount of the overall production time.
以下是使用数据仓库的缺点:- - 数据资源的加载时间被低估:我们经常低估收集、清理和发布数据到仓库所需的时间。尽管已有一些资源来减少此过程的时间和精力,但可能需要占用总生产时间的显著部分。
- Source system flaws that go unnoticed: After years of non-discovery, hidden flaws linked with the source networks that provide the data warehouse may be discovered. Some fields, for example, may accept nulls when entering new property information, resulting in workers inputting incomplete property data, even if it was available and relevant.
- Homogenization of data: Data warehousing also deals with data formats that are comparable across diverse data sources. It's possible that some important data will be lost as a result.
217. What are the advantages of a data warehouse?
数据仓库的优点是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba606a | 官方: 否 | 付费: 否
答案:
Following are the advantages of using a data warehouse: - Helps you save time:
以下是使用数据仓库的优点:- 帮助您节省时间:
To stay ahead of your competitors in today's fast-paced world of cutthroat competition, your company's ability to make smart judgments quickly is critical. A Data warehouse gives you instant access to all of your essential data, so you and your staff don't have to worry about missing a deadline. All you have to do now is deploy your data model to start collecting data in a matter of seconds. You can do this with most warehousing solutions without utilising a sophisticated query or machine learning. With data warehousing, your company won't have to rely on a technical professional to troubleshoot data retrieval issues 24 hours a day, seven days a week. You will save a lot of time this way. - Enhances the quality of data:
要在当今竞争激烈的快节奏世界中保持领先于竞争对手,您的公司快速做出明智判断的能力至关重要。数据仓库让您能即时访问所有关键数据,因此您和您的团队不必担心错过截止日期。您现在只需部署数据模型,即可在几秒钟内开始收集数据。您可以通过大多数仓库解决方案实现这一点,而无需使用复杂的查询或机器学习。借助数据仓库,您的公司无需依赖技术专业人员全天候24小时、每周7天来排除数据检索问题。这样您将节省大量时间。- 提升数据质量:
The high-quality data ensures that your company's policies are founded on accurate information about your operations. You can turn data from numerous sources into a shared structure using data warehousing. You can assure the consistency and integrity of your company's data this way. This allows you to spot and eliminate duplicate data, inaccurately reported data and disinformation. For your firm, implementing a data quality management program may be both costly and time-consuming. You can easily use a data warehouse to reduce the number of these annoyances while saving money and increasing the general productivity of your company. - Enhances Business Intelligence (BI):Throughout your commercial endeavours, you can use a data warehouse to gather, absorb, and derive data from any source. As a result of the capacity to easily consolidate data from several sources, your BI will improve by leaps and bounds.
高质量的数据确保您公司的政策基于关于运营的准确信息。您可以使用数据仓库将来自众多来源的数据转化为共享结构。这样您可以确保公司数据的一致性和完整性。这使您能够发现并消除重复数据、错误报告的数据和虚假信息。对于您的公司来说,实施数据质量管理计划可能既昂贵又耗时。您可以轻松利用数据仓库来减少这些烦扰的数量,同时节省资金并提高公司的整体生产力。- 增强商业智能(BI):在您的商业活动中,您可以使用数据仓库从任何来源收集、吸收和推导数据。由于能够轻松整合来自多个来源的数据,您的BI将突飞猛进地提升。
- Data standardization and Consistency are achieved:The uniformity of huge data is another key benefit of having central data repositories. In a similar manner, a data storage or data mart might benefit your company. Because data warehousing stores data from various sources in a consistent manner, such as a transactional system, each source will produce results that are synchronized with other sources. This ensures that data is of higher quality and homogeneous. As a result, you and your team can rest assured that your data is accurate, resulting in more informed corporate decisions.
- Enhances Data Security:A data warehouse improves security by incorporating cutting-edge security features into its design. For any business, consumer data is a vital resource. You can keep all of your data sources integrated and properly protected by adopting a warehousing solution. The risk of a data breach will be greatly reduced as a result of this.
- Ability to store historical data:Because a data warehouse can hold enormous amounts of historical data from operational systems, you can readily study different time periods and inclinations that could be game-changing for your business. You can make better corporate judgments about your business plans if you have the correct facts in your hands.
218. Differentiate between fact table and dimension table.
区分事实表和维度表。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba606d | 官方: 否 | 付费: 否
答案:
The record of a reality or fact table could be made up of attributes from various dimension tables. The Fact Table, also known as the Reality Table, assists the user in investigating the business aspects that aid him in call taking in order to improve his firm. Dimension Tables, on the other hand, make it easier for the reality table or fact table to collect dimensions from which measurements must be taken.
事实表或现实表的记录可能由来自各种维度表的属性组成。事实表,也称为现实表,帮助用户调查有助于其改善公司的业务方面,以协助其呼叫处理。另一方面,维度表使现实表或事实表更容易收集必须从中进行测量的维度。
The following table enlists the difference between a fact table and a dimension table:-
下表列出了事实表和维度表之间的区别:-
| Fact Table 事实表 | Dimension Table 维度表 |
|---|---|
| It contains the attributes' measurements, facts, or metrics. 它包含属性的度量、事实或指标。 | It is the companion table that has the attributes that the fact table uses to derive the facts. 它是包含事实表用于推导事实的属性的伴随表。 |
| Data grain (the most atomic level by which facts may be defined) is what defines it. 数据粒度(定义事实的最原子级别)是其定义标准。 | It is detailed, comprehensive, and lengthy. 它是详细、全面且冗长的。 |
| It is used for analysis and decision-making and contains measures. 它用于分析和决策,并包含度量。 | It contains information regarding a company's operations and procedures. 它包含有关公司运营和流程的信息。 |
| It contains information in both numeric and textual formats. 它以数字和文本格式包含信息。 | It only contains textual information. 它仅包含文本信息。 |
| It has a primary key that works as a foreign key in the dimension table. 它有一个主键,在维度表中作为外键工作。 | It has a foreign key that is linked to the fact table's primary key. 它有一个外键,连接到事实表的主键。 |
| It stores the filter domain and reports labels in dimension tables. 它在维度表中存储过滤器域和报告标签。 | It organizes the atomic data into dimensional structures. 它将原子数据组织成维度结构。 |
| It does not have a hierarchy. 它没有层次结构。 | It has a hierarchy. 它有层次结构。 |
| It has lesser attributes than a dimension table. 它比维度表具有更少的属性。 | It has more attributes than a fact table. 它比事实表具有更多属性。 |
| It has more records as compared to a dimension table. 与维度表相比,它有更多记录。 | It has fewer records than a fact table. 它比事实表有更少的记录。 |
| Here, the table grows vertically. 在这里,表垂直增长。 | Here, the table grows horizontally. 在这里,表水平增长。 |
| It is created after the corresponding dimension table has been created. 它在相应的维度表创建后创建。 | It is created prior to the creation of the fact table. 它在事实表创建之前创建。 |
219. What are the different types of dimension tables in the context of data warehousing?
在数据仓库的背景下,有哪些不同类型的维度表?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6070 | 官方: 否 | 付费: 否
答案:
Following are the different types of dimension tables in the context of data warehousing:-
以下是在数据仓库背景下不同类型的维度表:-
Slowly Changing Dimensions (SCD): Slowly changing dimensions are dimension attributes that tend to vary slowly over time rather than at a regular period of time. For example, the address and phone number may change, but not on a regular basis. Consider the case of a man who travels to several nations and must change his address according to the place he is visiting. This can be accomplished in one of three ways:
Type 1: Replaces the value that was previously entered. This strategy is simple to implement and aids in the reduction of costs by saving space. However, in this circumstance, history is lost.类型1:替换之前输入的值。此策略实现简单,并通过节省空间帮助降低成本。然而,在这种情况下,历史记录会丢失。
Type 2: Insert a new row containing the new value. This method saves the history and allows it to be accessed at any time. However, it takes up a lot of space, which raises the price.
类型2:插入包含新值的新行。此方法保存历史记录并允许随时访问。然而,它占用大量空间,这会提高价格。
Type 3: Add a new column to the table. It is the ideal strategy because history can be easily preserved.
类型3:向表中添加新列。这是理想策略,因为历史记录可以轻松保留。- Junk Dimension: A trash dimension is a collection of low-cardinality attributes. It contains a number of varied or disparate features that are unrelated to one another. These can be used to implement RCD (rapidly changing dimension) features like flags and weights, among other things.
- Conformed Dimension: Multiple subject areas or data marts share this dimension. It can be utilised in a variety of projects without requiring any changes. This is used to keep things in order. Dimensions that are exactly the same as or a proper subset of any other dimension are known as conformed dimensions.
- Roleplay Dimension: Role-play dimension refers to the dimension table that has many relationships with the fact table. In other words, it occurs when the same dimension key and all of its associated attributes are linked to a large number of foreign keys in the fact table. Within the same database, it might serve several roles.
- Degenerate Dimension: Degenerate dimension attributes are those that are contained in the fact table itself rather than in a separate dimension table. For instance, a ticket number, an invoice number, a transaction number, and so on.
220. What do you mean by dimension table in the context of data warehousing? What are the advantages of using a dimension table?
在数据仓库的背景下,维度表是什么意思?使用维度表有哪些优势?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6073 | 官方: 否 | 付费: 否
答案:
A table in a data warehouse's star schema is referred to as a dimension table. Dimensional data models, which are made up of fact and dimension tables, are used to create data warehouses. Dimension tables contain dimension keys, values, and attributes and are used to describe dimensions. It is usually of a tiny size. The number of rows might range from a few to thousands. It is a description of the objects in the fact table. The term "dimension table" refers to a collection or group of data pertaining to any quantifiable occurrence. They serve as the foundation for dimensional modelling. It includes a column that serves as a primary key, allowing each dimension row or record to be uniquely identified. Through this key, it is linked to the fact tables. When it's constructed, a system-generated key called the surrogate key is used to uniquely identify the rows in the dimension.
数据仓库星型模式中的表被称为维度表。维度数据模型,由事实表和维度表组成,用于创建数据仓库。维度表包含维度键、值和属性,并用于描述维度。它通常尺寸较小。行数可能从几行到几千行不等。它是对事实表中对象的描述。术语“维度表”指的是与任何可量化事件相关的数据集合或组。它们作为维度建模的基础。它包含一个用作主键的列,使每个维度行或记录能被唯一识别。通过此键,它与事实表连接。当构建时,使用系统生成的称为代理键的键来唯一识别维度中的行。
Following are the advantages of using a dimension table : - It features a straightforward design.
以下是使用维度表的优势:- 它具有简单直接的设计。
- It is simple to study and comprehend.
- It stores data that has been de-normalized.
- It aids in the preservation of historical data for any dimension.
- It's simple to get info from it.
- It's simple to build and put into action.
- It provides the context for any business operation.
221. What do you understand about a fact table in the context of a data warehouse? What are the different types of fact tables?
在数据仓库的背景下,您如何理解事实表?有哪些不同类型的事实表?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6076 | 官方: 否 | 付费: 否
答案:
In a Data Warehouse system, a Fact table is simply a table that holds all of the facts or business information that can be exposed to reporting and analysis when needed. Fields that reflect direct facts, as well as foreign fields that connect the fact table to other dimension tables in the Data Warehouse system, are stored in these tables. Depending on the model type used to construct the Data Warehouse, a Data Warehouse system can have one or more fact tables.
在数据仓库系统中,事实表只是一个包含所有事实或业务信息的表,这些信息在需要时可以用于报告和分析。这些表存储反映直接事实的字段,以及将事实表连接到数据仓库系统中其他维度表的外键字段。根据用于构建数据仓库的模型类型,数据仓库系统可以有一个或多个事实表。
Following are the three types of fact tables:-
以下是事实表的三种类型:-
- Transactional Fact Table: This is a very basic and fundamental view of corporate processes. It can be used to depict the occurrence of an event at any given time. The facts measure are only valid at that specific time and for that specific incident. "One row per line in a transaction," according to the grain associated with the transaction table. It typically comprises data at the detailed level, resulting in a huge number of dimensions linked with it. It captures the smallest or atomic level of dimension measurement. This allows the table to provide users with extensive dimensional grouping, roll-up, and drill-down reporting features. It's packed yet sparse at the same time. It can also be big at the same time, depending on the number of events (transactions) that have occurred.
- Snapshot Fact Table: The snapshot depicts the condition of things at a specific point in time, sometimes known as a "picture of the moment." It usually contains a greater number of non-additive and semi-additive information. It aids in the examination of the company's overall performance at regular and predictable times. Unlike the transaction fact table, which adds a new row for each occurrence of an event, this represents the performance of an activity at the end of each day, week, month, or any other time interval. However, to retrieve the detailed data in the transaction fact table, snapshot fact tables or periodic snapshots rely on the transaction fact table. The periodic snapshot tables are typically large and take up a lot of space.
- Accumulating Fact Table: These are used to depict the activity of any process with a well-defined beginning and end. Multiple data stamps are commonly found in accumulating snapshots, which reflect the predictable stages or events that occur over the course of a lifespan. There is sometimes an extra column with the date that indicates when the row was last updated.
222. What do you mean by OLAP in the context of data warehousing? What guidelines should be followed while selecting an OLAP system?
在数据仓库上下文中,OLAP 是什么意思?选择 OLAP 系统时应遵循哪些指导原则?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6079 | 官方: 否 | 付费: 否
答案:
OLAP is an acronym for On-Line Analytical Processing . OLAP is a software technology classification that allows analysts, managers, and executives to get insight into information through quick, reliable, interactive access to data that has been converted from raw data to reflect the true dimensionality of the company as perceived by the clients. OLAP allows for multidimensional examination of corporate data while also allowing for complex estimations, trend analysis, and advanced data modelling. It's rapidly improving the foundation for Intelligent Solutions, which includes Business Performance Management, Strategy, Budgeting, Predicting, Financial Documentation, Analysis, Modeling, Knowledge Discovery, and Data Warehouses Reporting. End-clients can use OLAP to perform ad hoc record analysis in several dimensions, giving them the information and understanding they need to make better choices.
OLAP 是联机分析处理(On-Line Analytical Processing)的缩写。OLAP 是一种软件技术分类,允许分析师、经理和高管通过快速、可靠、交互式访问数据来洞察信息,这些数据已从原始数据转换为反映客户所感知的公司真实维度。OLAP 允许对公司数据进行多维检查,同时还允许进行复杂的估算、趋势分析和高级数据建模。它正在迅速改进智能解决方案的基础,包括业务绩效管理、战略、预算、预测、财务文档、分析、建模、知识发现和数据仓库报告。终端用户可以使用 OLAP 在多个维度上执行临时记录分析,为他们提供做出更好选择所需的信息和理解。
Following guidelines must be followed while selecting an OLAP system:-
选择 OLAP 系统时必须遵循以下指导原则:-
- Multidimensional Conceptual View: This is one of an OLAP system's most important capabilities. It is feasible to use methods like slice and dice that require a multidimensional view.
- Transparency: Make the technology, the underlying data repository, computing operations, and the disparate nature of source data completely accessible to consumers. Users' efficiency and productivity are improved as a result of this transparency.
- Accessibility: OLAP systems must only allow access to the data that is truly needed to do the analysis, giving clients a single, coherent, and consistent picture. The OLAP system must map its own logical schema to the disparate physical data storage, as well as to conduct any required transformations.
- Consistent Reporting Performance: As the number of dimensions or the size of the database grows, users should not experience any substantial reduction in documenting performance. That is, as the number of dimensions grows, OLAP performance should not deteriorate.
- Client/Server Architecture: Make the OLAP tool's server component clever enough that the various clients can be connected with minimal effort and integration code. The server should be able to map and consolidate data from disparate databases.
- Generic Dimensionality: Each dimension in an OLAP method should be seen as equal in terms of structure and operational capabilities. Select dimensions may be granted additional operational capabilities, although such duties should be available to all dimensions.
- Dynamic Sparse Matrix Handling: To optimise sparse matrix handling by adapting the physical schema to the unique analytical model being built and loaded. When confronted with a sparse matrix, the system must be able to dynamically assume the information distribution and change storage and access in order to achieve and maintain a constant level of performance.
- Multiuser Support: OLAP technologies must allow several users to access data at the same time while maintaining data integrity and security.
- Unrestricted cross-dimensional Operations: It gives techniques the ability to determine dimensional order and to perform roll-up and drill-down operations within and across dimensions.
- Intuitive Data Manipulation: Reorientation (pivoting), drill-down and roll-up, and other manipulations can be done intuitively and precisely on the cells of the scientific model using point-and-click and drag-and-drop methods. It does away with the need for a menu or several visits to the user interface.
- Flexible Reporting: It provides efficiency to corporate clients by allowing them to organize columns, rows, and cells in a way that allows for easy data manipulation, analysis, and synthesis.
- Infinite Dimensions and Aggregation Levels: There should be no limit to the number of data dimensions. Within any given consolidation path, each of these common dimensions must allow for an almost infinite number of customer-defined aggregation levels.
Data Warehouse Questions for Experienced
223. What are the advantages of a cloud based data warehouse?
基于云的数据仓库有哪些优势?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba607c | 官方: 否 | 付费: 否
答案:
Following are the advantages of a cloud-based data warehouse:
以下是基于云的数据仓库的优势:
- Total cost of ownership is low: The low cost of cloud data warehouses is one of the reasons they are becoming more popular. On-premises data warehouses necessitate high-cost technology, lengthy upgrades, ongoing maintenance, and outage management.
- Increased performance and speed: To keep up with the expanding number of data sources, cloud data warehouses are crucial. Cloud data warehouses can easily and quickly integrate with additional data sources as needed, and deploy the updated solution to production. Cloud data warehouses significantly improve speed and performance, allowing IT to focus on more innovative projects.
- Enhanced Security: Cloud security engineers can create and iterate on precise data-protection measures. Furthermore, cloud encryption technologies such as multi-factor authentication make data transfer between regions and resources extremely safe.
- Improved Disaster Recovery: Physical assets are not required to prepare cloud data warehouses for disasters. Instead, almost all cloud data warehouses offer asynchronous data duplication and execute automatic snapshots and backups. This data is kept across multiple nodes, allowing duplicate data to be accessed at any time without stopping present activity.
Conclusion:
结论:
In this article, we have covered the most frequently asked interview questions on data warehousing. ETL tools are often required in a data warehouse and so one can expect interview questions on ETL tools as well in a data warehouse interview.
在本文中,我们涵盖了数据仓库中最常被问及的面试问题。ETL 工具在数据仓库中通常是必需的,因此在数据仓库面试中,人们也可能会遇到关于 ETL 工具的面试问题。
References and Resources: - Data Warehouse Concepts
参考资料和资源:- 数据仓库概念
- Difference Between Data Warehouse and Data Mart
- Characteristics of Data Warehouse
- Data Engineer
- ETL Testing
- Azure
- Azure Data Factory
- DBMS
- Data Warehouse Tools
- Tableau Interview Questions
- Highest Paying Jobs
224. Differentiate between Agglomerative hierarchical clustering and Divisive clustering.
区分凝聚层次聚类和分裂聚类。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba607f | 官方: 否 | 付费: 否
答案:
Agglomerative hierarchical clustering : Flat clustering returns an unstructured set of clusters. On the other hand, this structure is more informative. We don't have to define the number of clusters in advance with this clustering procedure. Bottom-up algorithms start by treating each piece of data as a singleton cluster, then agglomerate pairs of clusters until all of them are merged into a single cluster that contains all of the data.
凝聚层次聚类:平面聚类返回一组无结构的簇。另一方面,这种结构更具信息性。使用这种聚类过程时,我们不必预先定义簇的数量。自底向上算法首先将每条数据视为一个单一簇,然后聚合簇对,直到所有簇合并为一个包含所有数据的簇。
Divisive Clustering : This approach also eliminates the need to define the number of clusters ahead of time. It necessitates a method for breaking a cluster that contains all of the data and then recursively splitting clusters until all of the data has been split into singletons.
分裂聚类:这种方法也消除了提前定义簇数量的需求。它需要一种方法来拆分包含所有数据的簇,然后递归地拆分簇,直到所有数据被拆分为单一簇。
Following are the differences between the two : - When compared to agglomerative clustering, divisive clustering is more complicated since we require a flat clustering algorithm as a "subroutine" to split each cluster until each data has its own singleton cluster.
以下是两者之间的差异:- 与凝聚聚类相比,分裂聚类更复杂,因为我们需要一个平面聚类算法作为“子程序”来拆分每个簇,直到每个数据都有自己的单一簇。
- If we don't create a complete hierarchy all the way down to individual data leaves, divisive clustering is more efficient.
- A divisive algorithm is also more precise. Without first examining the global distribution of data, agglomerative clustering makes judgments based on local patterns or neighbour points. These early decisions are irreversible. When generating top-level dividing decisions, divisive clustering takes into account the global distribution of data.
225. Differentiate between star schema and snowflake schema in the context of data warehousing.
在数据仓库上下文中,区分星型模式和中型模式。
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6082 | 官方: 否 | 付费: 否
答案:
Following table enlists the difference between the star schema and the snowflake schema:
下表列出了星型模式和中型模式之间的差异:
| Star Schema 星型模式 | Snowflake Schema 中型模式 |
|---|---|
| The fact tables and dimension tables are both contained in the star schema. 星型模式包含事实表和维度表。 | The fact tables, dimension tables, and sub dimension tables are all contained in the snowflake schema. 中型模式包含事实表、维度表和子维度表。 |
| It is a top-down model. 它是一种自上而下的模型。 | It is, however, a bottom-up model. 然而,它是一种自下而上的模型。 |
| The star schema takes up more room. 星型模式占据更多空间。 | It takes up less space. 它占据更少的空间。 |
| Star schema has a low query complexity. 星型模式的查询复杂度较低。 | Snowflake schema has a higher query complexity than star schema. 中型模式的查询复杂度高于星型模式。 |
| It is really simple to comprehend. 它非常容易理解。 | It is tough to comprehend. 它很难理解。 |
| It contains less foreign keys. 它包含较少的外键。 | It has a greater number of foreign keys. 它有更多的外键。 |
| It has a lot of redundancy in its data. 它的数据冗余度很高。 | It has a low level of data redundancy. 它的数据冗余度较低。 |
| The execution of queries takes less time. 查询执行时间较短。 | The execution of queries takes longer than star schema. 查询执行时间比星型模式长。 |
| Normalization is not employed in the star schema. 星型模式不使用规范化。 | Both normalisation and denormalization are used in this. 这既使用规范化也使用反规范化。 |
| It has a pretty simple design. 它有一个相对简单的设计。 | It has a complicated design. 它有一个复杂的设计。 |
226. What do you understand by data lake in the context of data warehousing? Differentiate between data lake and data warehouse.
在数据仓库上下文中,你如何理解数据湖?区分数据湖和数据仓库。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6085 | 官方: 否 | 付费: 否
答案:
A Data Lake is a large-scale storage repository for structured, semi-structured, and unstructured data. It's a location where you can save any type of data in its original format, with no restrictions on account size or file size. It provides a significant amount of data for improved analytical performance and native integration.
数据湖是一种大规模存储库,用于存储结构化、半结构化和非结构化数据。它是一个可以以原始格式保存任何类型数据的位置,对账户大小或文件大小没有限制。它提供了大量数据,以实现改进的分析性能和原生集成。
A data lake is a huge container that looks a lot like a lake or a river. Similar to how a lake has various tributaries, a data lake has structured data, unstructured data, machine-to-machine communication, and logs flowing through in real-time.
数据湖是一个巨大的容器,看起来很像湖泊或河流。类似于湖泊有各种支流,数据湖有结构化数据、非结构化数据、机器对机器通信和日志实时流动。
The following table enlists the differences between data lake and data warehouse:
下表列出了数据湖和数据仓库之间的区别:
| Data Lake 数据湖 | Data Warehouse 数据仓库 |
|---|---|
| All data is stored in the data lake, regardless of its source or structure. The data is stored in its unprocessed state. When it is ready to be used, it is converted. 所有数据都存储在数据湖中,无论其来源或结构如何。数据以未处理状态存储。当准备使用时,会被转换。 | Data extracted from transactional systems or data consisting of quantitative measures and their properties will be stored in a data warehouse. The information has been cleansed and changed. 从事务系统提取的数据或由定量度量及其属性组成的数据将存储在数据仓库中。信息已被清理和更改。 |
| Captures semi-structured and unstructured data in their original form from source systems. 以原始形式从源系统捕获半结构化和非结构化数据。 | Captures structured data and organises it according to defined standards for data warehouse purposes. 捕获结构化数据,并根据为数据仓库目的定义的标准进行组织。 |
| The data lake is appropriate for those that perform in-depth analysis. Data scientists, for example, require advanced analytical techniques that include predictive modelling and statistical analysis. 数据湖适用于进行深入分析的人员。例如,数据科学家需要高级分析技术,包括预测建模和统计分析。 | Because it is highly structured, easy to use, and understand, the data warehouse is perfect for operational users. 因为数据仓库高度结构化、易于使用和理解,非常适合操作用户。 |
| The cost of storing data in big data technology is less than that of storing data in a data warehouse. 在大数据技术中存储数据的成本低于在数据仓库中存储数据的成本。 | Data warehouse storage is more expensive and time-consuming. 数据仓库存储更昂贵且耗时。 |
| The schema is usually developed after the data has been stored. This provides a great level of flexibility and convenience of data collecting, but it necessitates labour at the end of the process. 模式通常在数据存储后开发。这提供了数据收集的高度灵活性和便利性,但需要在过程结束时付出劳动。 | Schema is usually defined before data is saved. Work is required at the start of the process, but performance, security, and integration are all advantages. 模式通常在数据保存前定义。过程开始时需要工作,但性能、安全性和集成都是优势。 |
| Users can access data in data lakes before it has been transformed, cleansed, or structured. In comparison to a traditional data warehouse, it allows consumers to get to their results faster. 用户可以在数据湖中的数据被转换、清理或结构化之前访问它。与传统数据仓库相比,它允许消费者更快地获得结果。 | Pre-defined inquiries for pre-defined data kinds are answered by data warehouses. As a result, any updates to the data warehouse take longer. 数据仓库回答预定义数据类型预定义查询。因此,对数据仓库的任何更新都需要更长时间。 |
227. What do you mean by dimensional modelling in the context of data warehousing?
在数据仓库上下文中,维度建模是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba6088 | 官方: 否 | 付费: 否
答案:
Dimensional Modelling (DM) is a data structure technique that is specifically designed for data storage in a data warehouse. The goal of dimensional modelling is to optimise the database so that data can be retrieved more quickly. In a data warehouse, a dimensional model is used to read, summarise, and analyse numeric data such as values, balances, counts, weights, and so on. Relation models, on the other hand, are designed for adding, modifying, and deleting data in a real-time Online Transaction System.
维度建模(DM)是一种数据结构技术,专门设计用于数据仓库中的数据存储。维度建模的目标是优化数据库,以便更快地检索数据。在数据仓库中,维度模型用于读取、汇总和分析数值数据,如值、余额、计数、权重等。另一方面,关系模型设计用于在实时在线事务系统中添加、修改和删除数据。
Following are the steps that should be followed while creating a dimensional model:
以下是创建维度模型时应遵循的步骤:
- Identifying the business process : The first step is to identify the specific business processes that a data warehouse should address. This might be Marketing, Sales, or Human Resources, depending on the organization's data analytic needs. The quality of data available for that process is also a factor in deciding which business process to use. It is the most crucial step in the Data Modeling process, and a failure here would result in a cascade of irreversible flaws.
- Identifying the grain : The level of detail for the business problem/solution is described by the grain. It's the procedure for determining the lowest level of data in any table in your data warehouse. If a table contains sales data for each day, the granularity should be daily. Monthly granularity is defined as a table that contains total sales data for each month.
- Identifying the dimension : Date, shop, inventory, and other nouns are examples of dimensions. All of the data should be saved in these dimensions. The date dimension, for example, could include information such as the year, month, and weekday.
- Identifying the fact : This stage is linked to the system's business users because it is here that they gain access to data housed in the data warehouse. The majority of the rows in the fact table are numerical values such as price or cost per unit.
- Building the schema : The Dimension Model is implemented in this step. The database structure is referred to as a schema (arrangement of tables).
228. What do you mean by data purging in the context of data warehousing?
在数据仓库上下文中,数据清除是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba608b | 官方: 否 | 付费: 否
答案:
Data purging is a term that describes techniques for permanently erasing and removing data from a storage space. Data purging, which is typically contrasted with data deletion, involves a variety of procedures and techniques.
数据清除是一个术语,描述永久擦除和从存储空间移除数据的技术。数据清除通常与数据删除相对比,涉及各种程序和技术。
Purging removes data permanently and frees up memory or storage space for other purposes, whereas deletion is commonly thought of as a temporary preference. Automatic data purging features are one of the methods for data cleansing in database administration. Some Microsoft products, for example, feature an automatic purge strategy that uses a circular buffer mechanism, in which older data is purged to create room for fresh data. Administrators must manually remove data from the database in other circumstances.
清除永久移除数据并为其他目的释放内存或存储空间,而删除通常被认为是临时偏好。自动数据清除功能是数据库管理中数据清理的方法之一。例如,一些Microsoft产品具有自动清除策略,使用循环缓冲区机制,旧数据被清除以为新数据腾出空间。在其他情况下,管理员必须手动从数据库中移除数据。
229. Differentiate between a data warehouse and a data mart.
区分数据仓库和数据集市。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6058d557c902ba608e | 官方: 否 | 付费: 否
答案:
Following table enlists the difference between a data warehouse and a data mart:
下表列出了数据仓库和数据集市之间的区别:
| Data Warehouse 数据仓库 | Data Mart 数据集市 |
|---|---|
| A data warehouse is a huge collection of data gathered from several departments or groups inside a company. 数据仓库是公司内多个部门或组收集的大量数据集合。 | A data mart is a Data Warehouse's single subtype. It is created to fulfill the requirements of a certain user group. 数据集市是数据仓库的单一子类型。它是为了满足特定用户组的需求而创建的。 |
| It aids in strategic decision-making. 它有助于战略决策。 | It aids in the making of tactical business decisions. 它有助于战术业务决策。 |
| The process of designing a Data Warehouse is fairly challenging. 设计数据仓库的过程相当复杂。 | The Data Mart design procedure is simple. 数据集市设计过程简单。 |
| Data warehousing involves a big portion of the company, which is why it takes so long to process. 数据仓库涉及公司的大部分,这就是处理时间长的原因。 | Because they can only handle tiny amounts of data, data marts are simple to use, create, and install. 因为只能处理少量数据,数据集市易于使用、创建和安装。 |
| The primary goal of a Data Warehouse is to create a unified environment and a consistent view of the business at any given moment in time. 数据仓库的主要目标是在任何给定时刻创建统一环境和业务的一致视图。 | A data mart is primarily used at the department level in a business division. 数据集市主要用于业务部门的部门级。 |
| When opposed to data mart, the data kept in the Data Warehouse is always detailed. 与数据集市相比,数据仓库中保存的数据总是详细的。 | Data Marts are designed for certain user groups. As a result, the data is brief and limited. 数据集市是为特定用户组设计的。因此,数据简短且有限。 |
| Data is collected from a variety of sources in a data warehouse. 数据仓库中的数据从多种来源收集。 | Data in Data Mart comes from a limited number of sources. 数据集市中的数据来自有限数量的来源。 |
| The Data Warehouse might be anywhere from 100 GB to 1 TB+ in size. 数据仓库大小可能在100 GB到1 TB+之间。 | Data Mart is less than 100 GB in size. 数据集市小于100 GB。 |
| The time it takes to implement a Data Warehouse might range from months to years. 实施数据仓库的时间可能从几个月到几年不等。 | The Data Mart implementation process is only a few months long. 数据集市实施过程只需几个月。 |
| From the perspective of the end-users, the data stored is read-only. 从最终用户的角度来看,存储的数据是只读的。 | The transaction data is provided straight from the Data Warehouse. 事务数据直接从数据仓库提供。 |
230. What are the advantages and disadvantages of the bottom up approach of data warehouse architecture?
数据仓库架构自下而上方法的优缺点是什么?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37a6058d557c902ba6091 | 官方: 否 | 付费: 否
答案:
Following are the advantages of the bottom up approach : - The reports are generated quickly since the data marts are created first.
以下是自下而上方法的优点:- 由于首先创建数据集市,报告生成迅速。
- We can fit a greater number of data marts here, allowing us to expand our data warehouse.
In addition, the cost and effort required to build this model are quite minimal.
Because the dimensional view of data marts is not consistent as it is in the top-down approach, this model is not as strong as the top-down approach and this is a disadvantage of the bottom up approach.因为数据集市的维度视图不像自上而下方法那样一致,此模型不如自上而下方法强大,这是自下而上方法的一个缺点。
231. What are the advantages and disadvantages of the top down approach of data warehouse architecture?
数据仓库架构的自上而下方法有哪些优点和缺点?
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37a6058d557c902ba6094 | 官方: 否 | 付费: 否
答案:
Following are the advantages of the top down approach : - Because data marts are formed from data warehouses, they have a consistent dimensional perspective.
以下是自上而下方法的优点:- 由于数据集市是从数据仓库形成的,它们具有一致的维度视角。
- This methodology is also thought to be the most effective for corporate reforms. As a result, large corporations choose to take this method.
It is simple to create a data mart from a data warehouse.
The disadvantage of the top down approach is that the cost, time, and effort required to design and maintain it are all very expensive.自上而下方法的缺点是设计、维护所需的成本、时间和精力都非常昂贵。
232. Explain the architecture of a data warehouse.
解释数据仓库的架构。
- 知识点: 数据工程与数据科学/AI (主题: data-warehouse;标签: interviewbit, data-warehouse, topic-specific)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37a6058d557c902ba6097 | 官方: 否 | 付费: 否
答案:
A data warehouse is a single schema that organizes a heterogeneous collection of multiple data sources. There are two techniques to building a data warehouse. They are as follows:
数据仓库是一个单一模式,组织了多个数据源的异构集合。构建数据仓库有两种技术。它们如下:
Top-Down Approach in Data Warehouse:
数据仓库中的自上而下方法:
Following are the major components : - External Sources - An external source is a location from which data is collected, regardless of the data format. Structured, semi-structured, and unstructured data are all possibilities.
以下是主要组件:- 外部源 - 外部源是数据收集的位置,无论数据格式如何。结构化、半结构化和非结构化数据都是可能的。
- Stage Area - Because the data gathered from external sources does not follow a specific format, it must be validated before being loaded into the data warehouse. ETL tool is used for this purpose in the stage area.
- Data-warehouse - After data has been cleansed, it is kept as a central repository in the data warehouse. The meta data is saved here, while the real data is housed in data marts. In this top-down approach, the data warehouse stores the data in its purest form.
- Data Marts - A data mart is a storage component as well. It maintains information about a single organization's function that is managed by a single authority. Depending on the functions, an organization can have as many data marts as it wants.
Data Mining - Data mining is the process of analyzing large amounts of data in a data warehouse. With the use of a data mining algorithm, it is used to discover hidden patterns in databases and data warehouses.
Bottom Up Approach in Data Warehouse:数据仓库中的自下而上方法:
Following are the steps involved in the bottom up approach: - The data is first gathered from external sources (same as happens in top-down approach).
以下是自下而上方法涉及的步骤:- 首先从外部源收集数据(与自上而下方法中发生的相同)。
- The data is then imported into data marts rather than data warehouses after passing through the staging area (as stated above). The data marts are built first, and they allow for reporting. It focuses on a specific industry.
- After that, the data marts are incorporated into the data warehouse.
233. What are the Applications of deep learning?
深度学习有哪些应用?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba687d | 官方: 否 | 付费: 否
答案:
Following are some of the applications of deep learning: - Pattern recognition and natural language processing.
以下是深度学习的一些应用:- 模式识别和自然语言处理。
- Recognition and processing of images.
- Automated translation.
- Analysis of sentiment.
- System for answering questions.
- Classification and Detection of Objects.
- Handwriting Generation by Machine.
- Automated text generation.
Colorization of Black and White images.
Learn More .了解更多。
234. What are Neural Networks?
什么是神经网络?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba6880 | 官方: 否 | 付费: 否
答案:
Neural Networks are artificial systems that have a lot of resemblance to the biological neural networks in the human body. A neural network is a set of algorithms that attempts to recognize underlying relationships in a batch of data using a method that mimics how the human brain works. Without any task-specific rules, these systems learn to do tasks by being exposed to a variety of datasets and examples. The notion is that instead of being programmed with a pre-coded understanding of these datasets, the system derives identifying traits from the data it is fed to. Neural networks are built on threshold logic computational models. Because neural networks can adapt to changing input, they can produce the best possible outcome without requiring the output criteria to be redesigned.
神经网络是与人体的生物神经网络有很多相似之处的人工系统。神经网络是一组算法,它试图通过模仿人脑工作的方法来识别一批数据中的潜在关系。在没有特定任务规则的情况下,这些系统通过接触各种数据集和示例来学习执行任务。其理念是,系统并非通过预设的代码化理解来操作这些数据集,而是从提供给它的数据中推导出识别特征。神经网络建立在阈值逻辑计算模型之上。由于神经网络能适应不断变化的输入,它们可以在无需重新设计输出标准的情况下产生最佳可能结果。
235. What are the advantages of neural networks?
神经网络有哪些优点?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba6887 | 官方: 否 | 付费: 否
答案:
Following are the advantages of neural networks: - Neural networks are extremely adaptable, and they may be used for both classification and regression problems, as well as much more complex problems. Neural networks are also quite scalable. We can create as many layers as we wish, each with its own set of neurons. When there are a lot of data points, neural networks have been shown to generate the best outcomes. They are best used with non-linear data such as images, text, and so on. They can be applied to any data that can be transformed into a numerical value.
以下是神经网络的优点:- 神经网络极具适应性,可用于分类和回归问题,以及更复杂的问题。神经网络也具有很强的可扩展性。我们可以根据需要创建任意多的层,每层都有自己的神经元。当数据点很多时,神经网络已被证明能产生最佳结果。它们最适合用于非线性数据,如图像、文本等。它们可应用于任何能转换为数值的数据。
- Once the neural network mode has been trained, they deliver output very fast. Thus, they are time-effective.
236. What are the disadvantages of neural networks?
神经网络的缺点是什么?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba688a | 官方: 否 | 付费: 否
答案:
Following are the disadvantages of neural networks:- - The "black box" aspect of neural networks is a well-known disadvantage. That is, we have no idea how or why our neural network produced a certain result. When we enter a dog image into a neural network and it predicts that it is a duck, we may find it challenging to understand what prompted it to make this prediction.
以下是神经网络的缺点:- - 神经网络的“黑盒”特性是一个众所周知的缺点。也就是说,我们不知道神经网络是如何或为何产生某个特定结果的。当我们向神经网络输入一张狗的图像,它预测为鸭子时,我们可能难以理解是什么促使它做出此预测。
- It takes a long time to create a neural network model.
- Neural networks models are computationally expensive to build because a lot of computations need to be done at each layer.
- A neural network model requires significantly more data than a traditional machine learning model to train.
- Data Science
- All Events
- My Events
237. Explain learning rate in the context of neural network models. What happens if the learning rate is too high or too low?
在神经网络模型背景下解释学习率。学习率过高或过低会发生什么?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba688d | 官方: 否 | 付费: 否
答案:
Learning rate is a number that ranges from 0 to 1. It is one of the most important tunable hyperparameters in neural network training models. The learning rate determines how quickly or slowly a neural network model adapts to a given situation and learns. A higher learning rate value indicates that the model only needs a few training epochs and produces rapid changes, whereas a lower learning rate indicates that the model may take a long time to converge or may never converge and become stuck on a poor solution. As a result, it is recommended that a good learning rate value be established by trial and error rather than using a learning rate that is too low or too high.
学习率是一个范围从0到1的数字。它是神经网络训练模型中最重要的可调超参数之一。学习率决定了神经网络模型适应给定情况并学习的快慢。较高的学习率值表示模型只需几个训练周期就能产生快速变化,而较低的学习率表示模型可能需要很长时间才能收敛,或者可能永不收敛,陷入较差的解决方案。因此,建议通过反复试验来确定一个良好的学习率值,而不是使用过低或过高的学习率。
In the above image, we can clearly see that a big learning rate leads us to move away from the desired output. However, having a small learning rate leads us to the desired output eventually.
在上图中,我们可以清楚看到较大的学习率会导致我们偏离期望的输出。然而,较小的学习率最终会引导我们达到期望的输出。
238. Explain what a deep neural network is.
解释什么是深度神经网络。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba6891 | 官方: 否 | 付费: 否
答案:
An artificial neural network (ANN) having numerous layers between the input and output layers is known as a deep neural network (DNN). Deep neural networks are neural networks that use deep architectures. The term "deep" refers to functions that have a higher number of layers and units in a single layer. It is possible to create more accurate models by adding more and larger layers to capture higher levels of patterns. The below image depicts a deep neural network.
在输入层和输出层之间具有多个层的人工神经网络(ANN)被称为深度神经网络(DNN)。深度神经网络是使用深层架构的神经网络。术语“深”指的是具有更多层数和单层内更多单元的函数。通过添加更多且更大的层来捕获更高级别的模式,可以创建更准确的模型。下图描绘了一个深度神经网络。
239. What are the different types of deep neural networks?
深度神经网络有哪些不同类型?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba6895 | 官方: 否 | 付费: 否
答案:
Following are the different types of deep neural networks:- - FeedForward Neural Network:- This is the most basic type of neural network, in which flow control starts at the input layer and moves to the output layer. These networks only have a single layer or a single hidden layer. There is no backpropagation mechanism in this network because data only flows in one way. The input layer of this network receives the sum of the weights present in the input. These networks are utilised in the computer vision-based facial recognition method.
以下是深度神经网络的不同类型:- - 前馈神经网络:- 这是最基本的神经网络类型,其中流程控制从输入层开始,并移动到输出层。这些网络只有单层或单隐藏层。由于数据仅以单向流动,此网络中没有反向传播机制。该网络的输入层接收输入中存在的权重之和。这些网络用于基于计算机视觉的人脸识别方法。
- Radial Basis Function Neural Network:- This type of neural network usually has more than one layer, preferably two. The relative distance from any location to the center is determined in this type of network and passed on to the next layer. In order to avoid blackouts, radial basis networks are commonly employed in power restoration systems to restore power in the shortest period possible.
- Multi-Layer Perceptrons (MLP):- A multilayer perceptron (MLP) is a type of feedforward artificial neural network (ANN). MLPs are the simplest deep neural networks, consisting of a succession of completely linked layers. Each successive layer is made up of a collection of nonlinear functions that are the weighted sum of all the previous layer's outputs (completely linked). Speech recognition and other machine learning systems rely heavily on these networks.
- Convolutional Neural Network (CNN):- Convolutional Neural Networks are mostly used in computer vision. In contrast to fully linked layers in MLPs, one or more convolution layers extract simple characteristics from input by performing convolution operations in CNN models. Each layer is made up of nonlinear functions of weighted sums at various coordinates of spatially close subsets of the previous layer's outputs, allowing the weights to be reused.The AI system learns to automatically extract the properties of these inputs to fulfill a specific task, such as picture classification, face identification, and image semantic segmentation, given a sequence of images or videos from the actual world.
- Recurrent Neural Network (RNN):- Recurrent Neural Networks were created to solve the sequential input data time-series problem. RNN's input is made up of the current input and prior samples. As a result, the node connections create a directed graph. Furthermore, each neuron in an RNN has an internal memory that stores the information from previous samples' computations. Because of their superiority in processing data with a variable input length, RNN models are commonly employed in natural language processing (NLP). The goal of AI in this case is to create a system that can understand human-spoken natural languages, such as natural language modeling, word embedding, and machine translation.Each successive layer in an RNN is made up of nonlinear functions of weighted sums of outputs and the preceding state. As a result, the basic unit of RNN is termed "cell," and each cell is made up of layers and a succession of cells that allow recurrent neural network models to be processed sequentially.
- Modular Neural Network:- This network is made up of numerous tiny neural networks, rather than being a single network. The sub-networks combine to form a larger neural network, which operates independently to achieve a common goal. These networks are extremely useful for breaking down a large-small problem into smaller chunks and then solving it.
- Sequence to Sequence Model:- In most cases, this network is made up of two RNN networks. The network is based on encoding and decoding, which means it has an encoder that processes the input and a decoder that processes the output. This type of network is commonly employed for text processing when the length of the inputting text differs from the length of the outputted text.
240. What do you mean by end-to-end learning?
端到端学习是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba6898 | 官方: 否 | 付费: 否
答案:
It's a deep learning procedure in which a model is fed raw data and the entire data is trained at the same time to create the desired result with no intermediate steps. It is a deep learning method in which all of the different steps are trained simultaneously rather than sequentially. End-to-end learning has the advantage of eliminating the requirement for implicit feature engineering, which usually results in lower bias. Driverless automobiles are an excellent example that you may use in your end-to-end learning content. They are guided by human input and are programmed to learn and interpret information automatically using a CNN to fulfill tasks. Another good example is the generation of a written transcript (output) from a recorded audio clip (input). The model here skips all of the steps in the middle, focusing instead on the fact that it can manage the entire sequence of steps and tasks.
这是一种深度学习过程,其中模型输入原始数据,整个数据同时训练以产生期望结果,没有任何中间步骤。这是一种深度学习方法,其中所有不同步骤同时训练,而不是顺序训练。端到端学习的优点是消除了隐式特征工程的需求,这通常会降低偏差。无人驾驶汽车是您可以在端到端学习内容中使用的一个极好示例。它们由人类输入引导,并使用CNN编程自动学习和解释信息以完成任务。另一个好例子是从录制的音频片段(输入)生成书面转录(输出)。这里的模型跳过中间的所有步骤,而是专注于它可以管理整个步骤和任务序列这一事实。
241. What do you understand about gradient clipping in the context of deep learning?
在深度学习背景下,你如何理解梯度裁剪?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba689b | 官方: 否 | 付费: 否
答案:
Gradient Clipping is a technique for dealing with the problem of exploding gradients (a situation in which huge error gradients build up over time, resulting in massive modifications to neural network model weights during training) that happens during backpropagation. The problem of exploding gradients occurs when the gradients get excessively big during training, causing the model to become unstable. If the gradient has crossed the anticipated range, the gradient values are driven element-by-element to a specific minimum or maximum value. Gradient clipping improves numerical stability while training a neural network, but it has little effect on the performance of the model.
梯度裁剪是一种处理梯度爆炸问题的技术(梯度爆炸是指巨大的误差梯度随时间累积,导致训练期间神经网络模型权重发生剧烈修改的情况)。梯度爆炸问题发生在训练过程中梯度变得过大时,导致模型不稳定。如果梯度已超出预期范围,则梯度值会逐元素地被强制限制到特定的最小值或最大值。梯度裁剪在训练神经网络时提高了数值稳定性,但对模型性能影响不大。
242. Explain Forward and Back Propagation in the context of deep learning.
在深度学习背景下解释前向传播和反向传播。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba689e | 官方: 否 | 付费: 否
答案:
- Forward Propagation: The hidden layer, between the input layer and the output layer of the network, receives inputs with weights. We calculate the output of the activation at each node at each hidden layer, and this propagates to the next layer until we reach the final output layer. We go forward from the inputs to the final output layer, which is known as the forward propagation.
- Back Propagation: It sends error information from the network's last layer to all of the weights within the network. It's a technique for fine-tuning the weights of a neural network based on the previous epoch's (i.e., iteration) error rate. By fine-tuning the weights, you may lower error rates and improve the model's generalization, making it more dependable. The process of backpropagation can be broken down into the following steps: It can generate output by propagating training data through the network. It, then, computes the error derivative for output activations using the target and output values. It can backpropagate to compute the derivative of the error in the previous layer's output activation, and so on for all hidden layers. It calculates the error derivative for weights using the previously obtained derivatives and all hidden layers. The weights are updated based on the error derivatives obtained from the next layer.
243. Explain Data Normalisation. What is the need for it?
解释数据归一化。为什么需要它?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68a1 | 官方: 否 | 付费: 否
答案:
Data Normalisation is a technique in which data is transformed in such a way that they are either dimensionless or have a similar distribution. It is also known as standardization and feature scaling. It's a pre-processing procedure for the input data that removes redundant data from the dataset.
数据规范化是一种技术,将数据转换为无量纲或具有相似分布的形式。它也被称为标准化和特征缩放。这是对输入数据的预处理步骤,用于从数据集中去除冗余数据。
Normalization provides each variable equal weights/importance, ensuring that no single variable biases model performance in its favour simply because it is larger. It vastly improves model precision by converting the values of numeric columns in a dataset to a similar scale without distorting the range of values.
规范化赋予每个变量相等的权重/重要性,确保没有单个变量仅因其数值较大而偏向于模型性能。通过将数据集中数值列的值转换到相似的尺度而不扭曲值的范围,它大大提高了模型的精度。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
244. What are the different techniques to achieve data normalization?
实现数据规范化有哪些不同的技术?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68a9 | 官方: 否 | 付费: 否
答案:
Following are the different techniques employed to achieve data normalization:- - Rescaling: Rescaling data is the process of multiplying each member of a data set by a constant term k, or changing each integer x to f(X), where f(x) = kx and k and x are both real values. The simplest of all approaches, rescaling (also known as "min-max normalization"), is calculated as: x'=x-min(x)max(x)-min(x){"detectHand":false} This represents the rescaling factor for every data point x.
以下是用于实现数据规范化的不同技术:- 重缩放:重缩放数据是将数据集中的每个成员乘以常数项k,或将每个整数x转换为f(X),其中f(x)=kx,且k和x均为实数值。在所有方法中,重缩放(也称为“最小-最大规范化”)的计算公式为:x'=x-min(x)max(x)-min(x){"detectHand":false} 这表示每个数据点x的重缩放因子。
- Mean Normalisation: In the transformation process, this approach employs the mean of the observations: x'=x-average(x)max(x)-min(x){"detectHand":false}This represents the mean normalizing factor for every data point x.
- Z-score Normalisation: This technique, also known as standardization, employs the Z-score or "standard score." SVM and logistic regression are two examples of machine learning algorithms that utilise it: z=x-μσ{"detectHand":false}This represents the Z-score.
245. What do you mean by hyperparameters in the context of deep learning?
在深度学习背景下,超参数是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68ae | 官方: 否 | 付费: 否
答案:
Hyperparameters are variables that determine the network topology (for example, the number of hidden units) and how the network is trained (Eg: Learning Rate). They are set before training the model, that is, before optimizing the weights and the bias.
超参数是决定网络拓扑结构(例如,隐藏单元的数量)以及网络如何训练(例如,学习率)的变量。它们是在训练模型之前设置的,即在优化权重和偏差之前。
Following are some of the examples of hyperparameters:- - Number of hidden layers: With regularisation techniques, many hidden units inside a layer can boost accuracy. Underfitting may occur if the number of units is reduced.
以下是超参数的一些示例:- 隐藏层数:使用正则化技术,一层内的多个隐藏单元可以提高准确性。如果单元数量减少,可能会发生欠拟合。
- Learning Rate: The learning rate is the rate at which a network's parameters are updated. The learning process is slowed by a low learning rate, but it eventually converges. A faster learning rate accelerates the learning process, but it may not converge. A declining Learning rate is usually desired.
246. Difference between multi-class and multi-label classification problems.
多类和多标签分类问题的区别。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68b1 | 官方: 否 | 付费: 否
答案:
The classification task in a multi-class classification problem has more than two mutually exclusive classes (classes that have no intersection or no attributes in common), whereas in a multi-label classification problem, each label has a different classification task, although the tasks are related in some way. For example, classifying a group of photographs of animals that could be cats, dogs, or bears is a multi-class classification problem that assumes each sample can be of only one type, implying that an image can be categorized as either a cat or a dog, but not both at the same time.
多类分类问题中的分类任务有超过两个互斥的类别(即没有交集或没有共同属性的类别),而在多标签分类问题中,每个标签有一个不同的分类任务,尽管这些任务以某种方式相关。例如,将一组可能是猫、狗或熊的动物照片进行分类是一个多类分类问题,假设每个样本只能是一种类型,这意味着一张图片可以归类为猫或狗,但不能同时是两者。
Now let us assume you wish to manipulate the image below.
现在让我们假设您希望处理下面的图片。
The image above must be categorized as both a cat and a dog because it depicts both creatures. A set of labels is allocated to each sample in a multi-label classification issue, and the classes are not mutually exclusive. In a multi-label classification problem, a pattern can belong to one or more classes.
上面的图片必须被归类为猫和狗,因为它描绘了这两种生物。在多标签分类问题中,一组标签被分配给每个样本,且类别不是互斥的。在多标签分类中,一个模式可以属于一个或多个类别。
247. Explain transfer learning in the context of deep learning.
在深度学习背景下解释迁移学习。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68b4 | 官方: 否 | 付费: 否
答案:
Transfer learning is a learning technique that allows data scientists to use what they've learned from a previous machine learning model that was used for a similar task. The ability of humans to transfer their knowledge is used as an example in this learning. You can learn to operate other two-wheeled vehicles more simply if you learn to ride a bicycle. A model trained for autonomous automobile driving can also be used for autonomous truck driving. The features and weights can be used to train the new model, allowing it to be reused. When there is limited data, transfer learning works effectively for quickly training a model.
迁移学习是一种学习技术,允许数据科学家利用他们从之前用于类似任务的机器学习模型中学到的知识。人类转移知识的能力被用作这种学习的示例。如果您学会骑自行车,您可以更容易地学习操作其他两轮车辆。用于自动驾驶汽车训练的模型也可以用于自动驾驶卡车。特征和权重可以用于训练新模型,从而实现重用。当数据有限时,迁移学习能有效地快速训练模型。
In the above image, the first diagram represents training a model from scratch while the second diagram represents using a model already trained on cats and dogs to classify the different class of vehicles, thereby representing transfer learning.
在上图中,第一个图表表示从头开始训练模型,而第二个图表表示使用已经训练好的猫和狗模型来分类不同类别的车辆,从而代表迁移学习。
248. What are the advantages of transfer learning?
迁移学习的优点是什么?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68b7 | 官方: 否 | 付费: 否
答案:
Following are the advantages of transfer learning : - Better initial model: In other methods of learning, you must create a model from scratch. Transfer learning is a better starting point because it allows us to perform tasks at a higher level without having to know the details of the starting model.
以下是迁移学习的优点:- 更好的初始模型:在其他学习方法中,您必须从头创建模型。迁移学习是一个更好的起点,因为它允许我们在不了解初始模型细节的情况下完成更高层次的任务。
- Higher learning rate: Because the problem has already been taught for a similar task, transfer learning allows for a faster learning rate during training.
- Higher accuracy after training: Transfer learning allows a deep learning model to converge at a higher performance level, resulting in more accurate output, thanks to a better starting point and higher learning rate.
249. Is it possible to train a neural network model by setting all biases to 0? Also, is it possible to train a neural network model by setting all of the weights to 0?
是否可以通过将所有偏置设置为0来训练神经网络模型?另外,是否可以通过将所有权重设置为0来训练神经网络模型?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68ba | 官方: 否 | 付费: 否
答案:
Yes, even if all of the biases are set to zero, the neural network model has a chance of learning.
是的,即使所有偏置都设置为零,神经网络模型仍有机会学习。
No, training a model by setting all of the weights to 0 is impossible since the neural network will never learn to complete a task. When all weights are set to zero, the derivatives for each w remain constant, resulting in neurons learning the same features in each iteration. Any constant initialization of weights, not simply zero, is likely to generate a poor result.
不,将所有权重设置为0来训练模型是不可能的,因为神经网络将永远无法学会完成任务。当所有权重设置为零时,每个w的导数保持恒定,导致神经元在每次迭代中学习相同的特征。任何权重的恒定初始化(不仅仅是零)都可能产生较差的结果。
250. What is a tensor in deep learning?
在深度学习中,什么是张量?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68bd | 官方: 否 | 付费: 否
答案:
A tensor is a multidimensional array that represents a generalization of vectors and matrices. It is one of the key data structures used in deep learning. Tensors are represented as n-dimensional arrays of base data types. The data type of each element in the Tensor is the same, and the data type is always known. It's possible that only a portion of the shape (that is, the number of dimensions and the size of each dimension) is known. Most operations yield fully-known tensors if their inputs are likewise fully known, however, in other circumstances, the shape of a tensor can only be determined at graph execution time.
张量是一个多维数组,表示向量和矩阵的推广。它是深度学习中使用的关键数据结构之一。张量表示为基本数据类型的n维数组。张量中每个元素的数据类型相同,且数据类型始终已知。可能只有部分形状(即维数和每个维的大小)已知。如果输入也是完全已知的,大多数操作会产生完全已知的张量,但在其他情况下,张量的形状只能在图执行时确定。
251. Explain the difference between a shallow network and a deep network.
解释浅层网络和深层网络之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68c0 | 官方: 否 | 付费: 否
答案:
A hidden layer, as well as input and output layers, are present in every neural network. Shallow neural networks are those that have only one hidden layer, whereas deep neural networks include numerous hidden layers. Both shallow and deep networks can fit into any function, however, shallow networks require a large number of input parameters, whereas deep networks, because of their several layers, can fit functions with a small number of input parameters. Deep networks are currently favored over shallow networks because the model learns a new and abstract representation of the input at each layer. In comparison to shallow networks, they are also far more efficient in terms of the number of parameters and computations.
每个神经网络都有隐藏层以及输入和输出层。浅层神经网络是那些只有一个隐藏层的网络,而深层神经网络包含多个隐藏层。浅层和深层网络都能拟合任何函数,但浅层网络需要大量输入参数,而深层网络由于其多层结构,可以用少量输入参数拟合函数。目前深层网络比浅层网络更受青睐,因为模型在每一层学习输入的新的抽象表示。与浅层网络相比,它们在参数数量和计算方面也高效得多。
252. In a Convolutional Neural Network (CNN), how can you fix the constant validation accuracy?
在卷积神经网络(CNN)中,如何修复恒定的验证准确率?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68c3 | 官方: 否 | 付费: 否
答案:
When training any neural network, constant validation accuracy is a common issue because the network just remembers the sample, resulting in an over-fitting problem. Over-fitting a model indicates that the neural network model performs admirably on the training sample, but the model's performance deteriorates on the validation set. Following are some ways for improving CNN's constant validation accuracy: - It is always a good idea to split the dataset into three sections: training, validation, and testing.
在训练任何神经网络时,恒定的验证准确率是一个常见问题,因为网络只是记忆样本,导致过拟合问题。过拟合模型意味着神经网络模型在训练样本上表现极佳,但在验证集上性能下降。以下是提高CNN恒定验证准确率的一些方法:- 将数据集分为三部分(训练、验证和测试)始终是个好主意。
- When working with limited data, this difficulty can be handled by experimenting with the neural network's parameters.
- By increasing the training dataset's size.
- By using batch normalization.
- By implementing regularization
- By reducing the complexity of the network
253. Explain Batch Gradient Descent.
解释批量梯度下降。
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68c6 | 官方: 否 | 付费: 否
答案:
Batch Gradient Descent: Batch Gradient Descent entails computation (involved in each step of gradient descent) over the entire training set at each step and hence it is highly slow on very big training sets. As a result, Batch Gradient Descent becomes extremely computationally expensive. This is ideal for error manifolds that are convex or somewhat smooth. Batch Gradient Descent also scales nicely as the number of features grows.
批量梯度下降:批量梯度下降在每一步都涉及对整个训练集的计算(在梯度下降的每一步中),因此对于非常大的训练集来说非常慢。因此,批量梯度下降变得极其计算昂贵。这适用于凸或稍微平滑的误差流形。批量梯度下降随着特征数量的增加也能很好地扩展。
254. Explain Stochastic Gradient Descent. How is it different from Batch Gradient Descent?
解释随机梯度下降。它与批量梯度下降有何不同?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68c9 | 官方: 否 | 付费: 否
答案:
Stochastic Gradient Descent: Stochastic Gradient Descent seeks to tackle the major difficulty with Batch Gradient Descent, which is the use of the entire training set to calculate gradients at each step. It is stochastic in nature, which means it chooses up a "random" instance of training data at each step and then computes the gradient, which is significantly faster than Batch Gradient Descent because there are much fewer data to modify at once. Stochastic Gradient Descent is best suited for unconstrained optimization problems. The stochastic nature of SGD has a drawback in that once it gets close to the minimum value, it doesn't settle down and instead bounces around, giving us a good but not optimal value for model parameters. This can be solved by lowering the learning rate at each step, which will reduce the bouncing and allow SGD to settle down at the global minimum after some time.
随机梯度下降:随机梯度下降旨在解决批量梯度下降的主要难题,即在每一步使用整个训练集来计算梯度。它本质上是随机的,这意味着每一步选择“随机”的训练数据实例,然后计算梯度,这比批量梯度下降快得多,因为每次需要修改的数据少得多。随机梯度下降最适合无约束优化问题。SGD的随机性质有一个缺点:一旦接近最小值,它不会稳定下来,而是在附近反弹,这给我们一个很好但不是最佳的模型参数值。这可以通过在每一步降低学习率来解决,这将减少反弹,并允许SGD在一段时间后稳定在全局最小值。
Following are the differences between the two:-
以下是两者之间的区别:-
| Batch Gradient Descent 批量梯度下降 | Stochastic Gradient Descent 随机梯度下降 |
|---|---|
| The gradient is calculated using the entire training dataset. 使用整个训练数据集计算梯度。 | A single training sample is used to compute the gradient. 使用单个训练样本计算梯度。 |
| It is slow and computationally more expensive than Stochastic Gradient Descent. 它比随机梯度下降慢且计算更昂贵。 | It is faster and less computationally expensive than Batch Gradient Descent. 它比批量梯度下降更快且计算成本更低。 |
| It is not recommended for large training samples. 不推荐用于大型训练样本。 | It is recommended for large training samples. 推荐用于大型训练样本。 |
| It is deterministic (not random) in nature. 本质上是确定性的(非随机)。 | It is stochastic (random) in nature. 本质上是随机的(随机)。 |
| Given enough time to converge, it returns the best answer. 只要有足够的时间收敛,它返回最佳答案。 | It provides a good solution, but not the best. 它提供好的解决方案,但不是最佳。 |
| There is no need to shuffle the data points at random. 无需随机打乱数据点。 | Because we want the data sample to be in a random order, we'll shuffle the training set for each epoch. 因为我们希望数据样本按随机顺序,所以每个epoch都会打乱训练集。 |
| In this, it is difficult to get out of shallow local minimas. 在其中很难跳出浅层局部最小值。 | It has a better chance of escaping shallow local minima. 它有更好的机会跳出浅层局部最小值。 |
| In this, the convergence is slow. 在其中收敛缓慢。 | It arrives at the convergence point substantially faster. 它到达收敛点的速度大大加快。 |
255. Which deep learning algorithm is the best for face detection?
哪种深度学习算法最适合人脸检测?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37a6d58d557c902ba68cc | 官方: 否 | 付费: 否
答案:
Face identification may be accomplished using a variety of machine learning methods, but the best ones use Convolutional Neural Networks and deep learning. The following are some notable face detection algorithms: FaceNet, Probablisit, Face Embedding, ArcFace, Cosface, and Spherface.
人脸识别可以通过多种机器学习方法实现,但最佳方法使用卷积神经网络和深度学习。以下是一些著名的面部检测算法:FaceNet、Probablisit、Face Embedding、ArcFace、Cosface 和 Spherface。
256. What is an activation function? What is the use of an activation function?
什么是激活函数?激活函数的用途是什么?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37a6d58d557c902ba68cf | 官方: 否 | 付费: 否
答案:
An artificial neural network's activation function is a function that is introduced to help the network learn complex patterns in the data. When compared to a neuron-based model seen in our brains, the activation function is responsible for determining what is to be fired to the next neuron at the end of the process. In an ANN, an activation function performs the same job. It takes the preceding cell's output signal and turns it into a format that may be used as input to the next cell.
人工神经网络的激活函数是一种引入以帮助网络学习数据中复杂模式的函数。与我们大脑中基于神经元的模型相比,激活函数负责在过程结束时决定什么应被激发到下一个神经元。在人工神经网络中,激活函数执行相同的工作。它接收前一个细胞的输出信号,并将其转换为可作为下一个细胞输入的形式。
Here, x0 and x1 are the inputs. w1 is the weight and a is the activation function.
这里,x0 和 x1 是输入。w1 是权重,a 是激活函数。
The activation function introduces non-linearity into the neural network, allowing it to learn more complex functions. The neural network would only be able to learn a function that is a linear combination of its input data if it didn't have the Activation function.
激活函数向神经网络引入非线性,使其能够学习更复杂的函数。如果没有激活函数,神经网络只能学习输入数据的线性组合函数。
The activation function converts inputs to outputs. The activation function is in charge of determining whether or not a neuron should be stimulated. It arrives at a decision by calculating the weighted total and then adds bias. The activation function's main goal is to introduce non-linearity into a neuron's output.
激活函数将输入转换为输出。激活函数负责决定神经元是否应被刺激。它通过计算加权总和并添加偏置来做出决定。激活函数的主要目标是在神经元的输出中引入非线性。
257. What do you mean by an epochs in the context of deep learning?
在深度学习背景下,你所说的周期(epoch)是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: deep-learning, ai;标签: interviewbit, deep-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37a6d58d557c902ba68d2 | 官方: 否 | 付费: 否
答案:
An epoch is a terminology used in deep learning that refers to the number of passes the deep learning algorithm has made across the full training dataset. Batches are commonly used to group data sets (especially when the amount of data is very large). The term "iteration" refers to the process of running one batch through the model.
周期(epoch)是深度学习中使用的术语,指的是深度学习算法对整个训练数据集进行的遍数。批次通常用于对数据集进行分组(尤其是当数据量非常大时)。术语“迭代”指的是通过模型运行一个批次的过程。
The number of epochs equals the number of iterations if the batch size is the entire training dataset. This is frequently not the case for practical reasons. Several epochs are used in the creation of many models.
如果批次大小等于整个训练数据集,则周期数等于迭代数。由于实际原因,这通常不是这种情况。许多模型的创建中使用多个周期。
There is a general relation which is given by:-
存在一个一般关系,由下式给出:-
d e = i b
d e = i b
where,
其中,
d is the dataset size
d 是数据集大小
e is the number of epochs
e 是周期数
i is the number of iterations
i 是迭代数
b is the batch size
b 是批次大小
258. What role does Distributed Cache play in Apache Hadoop?
分布式缓存(Distributed Cache)在Apache Hadoop中扮演什么角色?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, deloitte, company-specific)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: general
- 公司: 德勤
- id: 69b37a6f58d557c902ba6999 | 官方: 否 | 付费: 否
答案:
Hadoop offers a valuable utility feature called Distributed Cache that boosts job performance by caching files used by applications. Read-only files, zips, and jar files can all be distributed using Distributed Cache. Using JobConf settings, an application can designate a file for the cache. The Hadoop framework copies these files to the nodes where a task must be completed. This is done before the task execution begins.
Hadoop提供了一个名为分布式缓存的宝贵实用功能,通过缓存应用程序使用的文件来提升作业性能。只读文件、压缩包和jar文件都可以通过分布式缓存进行分发。应用程序可以使用JobConf设置指定要缓存的文件。Hadoop框架会将这些文件复制到需要执行任务的节点上。这一过程在任务执行开始之前完成。
Useful Interview Preparation Resources:
有用的面试准备资源:
Java Interview
Java面试
Power BI Interview
Power BI面试
Automation Testing Interview
自动化测试面试
Salesforce Interview
Salesforce面试
Data Scientist Interview
数据科学家面试
Hadoop Interview
Hadoop 面试
Online Coding Platform
在线编码平台
259. What is YARN in Hadoop?
Hadoop 中的 YARN 是什么?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, deloitte, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 德勤
- id: 69b37a6f58d557c902ba69b1 | 官方: 否 | 付费: 否
答案:
Yet Another Resource Negotiator is abbreviated as yarn. It is Hadoop's resource management layer. YARN was first released in Hadoop 2.x. To execute and process data saved in the Hadoop Distributed File System, Yarn includes a number of data processing engines, including graph processing, batch processing, interactive processing, and stream processing. Yarn also provides employment scheduling services. It extends Hadoop's capabilities to other emerging technologies, allowing them to benefit from HDFS and cost-effective clusters.
另一个资源协调器缩写为 YARN。它是 Hadoop 的资源管理层。YARN 最初在 Hadoop 2.x 中发布。为了执行和处理存储在 Hadoop 分布式文件系统中的数据,YARN 包含多种数据处理引擎,包括图处理、批处理、交互式处理和流处理。YARN 还提供作业调度服务。它将 Hadoop 的功能扩展到其他新兴技术,使它们能够受益于 HDFS 和成本高效的集群。
Hadoop 2.x's data operating technique is Apache Yarn. It comprises a "Resource Manager" master daemon, a "Node Manager" slave daemon, and Application Master.
Hadoop 2.x 的数据操作技术是 Apache YARN。它包含一个“资源管理器”主守护进程、一个“节点管理器”从守护进程以及应用程序主进程。
260. What is Heartbeat in Hadoop?
Hadoop 中的心跳是什么?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, deloitte, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: 德勤
- id: 69b37a6f58d557c902ba69b5 | 官方: 否 | 付费: 否
答案:
Because the Namenode and Datanode in Hadoop are two physically separate machines, Heartbeat is the signal transmitted by the Datanode to the Namenode at regular intervals to confirm its existence, i.e. that it is alive. If Namenode does not receive a heartbeat from a Datanode within a specific timeframe (usually 10 minutes), Namenode considers the Datanode to be dead. Along with the heartbeat, the Datanode also transmits the block report to Namenode, which normally contains a list of all the blocks on the Datanode.
由于 Hadoop 中的 Namenode 和 Datanode 是两个物理上分离的机器,心跳是 Datanode 定期发送给 Namenode 的信号,以确认其存在,即它是否存活。如果 Namenode 在特定时间范围(通常为 10 分钟)内未收到 Datanode 的心跳,则 Namenode 认为该 Datanode 已死亡。伴随心跳,Datanode 还会向 Namenode 发送块报告,该报告通常包含 Datanode 上所有块的列表。
261. What is the ribbon in excel?
什么是 Excel 中的功能区?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab423 | 官方: 否 | 付费: 否
答案:
The term "ribbon" refers to the region at the top of the application that houses the MS Excel toolbars and menu items. With CTRL+F1, the ribbon can be displayed or hidden. The toolbars and menus have been replaced by the ribbon, which runs across the application's top. The top of the ribbons has a number of tabs, and each tab has its own set of commands. It has numerous tabs, including File, Home, View, Insert, and others. The ribbon can be altered to fit your requirements. Right-click on the Ribbon and choose "Customise the Ribbon" from the menu that appears. The following window appears as shown below. Each of these options is available for you to select or deselect.
“ribbon”(功能区)一词指的是应用程序顶部包含 MS Excel 工具栏和菜单项的区域。通过 CTRL+F1,可以显示或隐藏功能区。工具栏和菜单已被跨越应用程序顶部的功能区所取代。功能区顶部有许多选项卡,每个选项卡都有自己的命令集。它有多个选项卡,包括“文件”、“开始”、“视图”、“插入”等。功能区可以根据你的需求进行更改。右键单击功能区,并从出现的菜单中选择“自定义功能区”。如下所示,将出现以下窗口。这些选项中的每一个都可以供你选择或取消选择。
Source: SpreadsheetWeb
来源:SpreadsheetWeb
262. What are wildcards in Excel?
Excel 中的通配符是什么?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab426 | 官方: 否 | 付费: 否
答案:
Excel has three wildcards : - Asterisk(): It represents zero or more characters. Ex, for instance, might stand for Excel, Extra, Expertise, etc.
Excel 有三个通配符:- 星号():它表示零个或多个字符。例如,可能代表 Excel、Extra、Expertise 等。
- Question mark(?): It represents a single character. R?in, for instance, might be either Rain or Ruin.
- Tilde(~): A literal asterisk (*), a literal question mark (? ), or a literal tilde (~) can be created by adding a tilde (~) before a wildcard character to negate its effect.
263. Explain data validation in excel.
解释 Excel 中的数据验证。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab429 | 官方: 否 | 付费: 否
答案:
The types of values that a person may enter into a specific cell or a range of cells are limited by data validation. Choose the "Data Validation" option under "Data Tools" on the Data tab. Choose the data validation type you want to use. For example, a 'Name' column has data validation applied to it so that it will only take text entries. It will throw an error if you enter anything other than text.
数据验证限制了个人可以输入到特定单元格或一系列单元格中的值的类型。在“数据”选项卡上的“数据工具”下选择“数据验证”选项。选择要使用的数据验证类型。例如,一个“姓名”列应用了数据验证,因此它只会接受文本条目。如果你输入除文本之外的任何内容,它将抛出错误。
264. A student table is provided below. The following criteria should be used to write a function that adds pass/fail to the results column.The student will pass if their grade is greater than 60 and their attendance is higher than 75%.
下面提供了一个学生表。应使用以下条件编写一个函数,向结果列添加“通过/失败”。如果学生的成绩大于 60 且出勤率高于 75%,则该学生将通过。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab42c | 官方: 否 | 付费: 否
答案:
To fill in the results column, use the IF() function and a check with an AND condition.
要填充结果列,请使用 IF() 函数并进行 AND 条件检查。
Source: Simplilearn
来源:Simplilearn
265. Explain the difference between SUBSTITUTE and REPLACE in excel.
解释 Excel 中 SUBSTITUTE 和 REPLACE 的区别。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab42f | 官方: 否 | 付费: 否
答案:
- A string can have one or more instances of any old text substituted with fresh text using the SUBSTITUTE function.
Syntax:
语法:
SUBSTITUTE(text, prevText, newText, instanceNumber)
SUBSTITUTE(文本, 原文本, 新文本, 实例编号)
Example:
示例:
Let text at A1 be happy77
假设 A1 中的文本为 happy77
SUBSTITUTE(A1,”7″,”8″,1) =>happy87
SUBSTITUTE(A1,”7″,”8″,1) =>happy87
SUBSTITUTE(A1,”7″,”8″,2) =>happy88 - The REPLACE function changes any portion of the old text string with new text.
SUBSTITUTE(A1,”7″,”8″,2) =>happy88 - REPLACE 函数会更改旧文本字符串的任何部分为新文本。
Syntax:
语法:
REPLACE(oldText, startNumber, NumberCharacters, newText)
REPLACE(旧文本, 开始位置, 字符数, 新文本)
Example:
示例:
Let text at A1 be happy77
假设 A1 中的文本为 happy77
REPLACE(A1,6,1,”00″) =>happy007
REPLACE(A1,6,1,”00″) =>happy007
266. Which two macro languages are there in Microsoft Excel?
Microsoft Excel中有哪两种宏语言?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab432 | 官方: 否 | 付费: 否
答案:
VBA and XLM (Visual Basic Applications). XLM was utilized in Excel's past editions. VBA was first used in Excel 5 and is now primarily used.
VBA和XLM(Visual Basic应用程序)。XLM曾在Excel的早期版本中使用。VBA首次在Excel 5中使用,现在主要使用。
267. What is a macro in excel?
什么是Excel中的宏?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab435 | 官方: 否 | 付费: 否
答案:
Users can automate straightforward, repetitive chores and instructions using macros. For instance, rather than having to manually calculate sales, profits, losses, etc. every day, you could develop a macro that automatically calculates them at the end of the day and use it going ahead. Macros can be recorded and played at a later time or written down for use. Either go to the Developer tab and select Record Macro or go to the View tab to access it.
用户可以使用宏自动化简单、重复的任务和指令。例如,与其每天手动计算销售、利润、损失等,你可以开发一个宏,在每天结束时自动计算这些数据,并将其用于后续操作。宏可以录制并在稍后播放,也可以写下来以供使用。可以通过转到“开发人员”选项卡并选择“录制宏”,或转到“视图”选项卡来访问它。
268. What is a pivot table?
什么是数据透视表?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab438 | 官方: 否 | 付费: 否
答案:
One of Excel's most effective tools, a pivot table is always helpful when examining data. Excel pivot tables let you easily count, compare patterns, and confirm data trends while also analyzing large amounts of data.
数据透视表是Excel中最有效的工具之一,在分析数据时总是很有帮助。Excel数据透视表让你轻松计数、比较模式和确认数据趋势,同时分析大量数据。
A pivot table summarises your data. The information is presented as a chart. You can report on and investigate patterns using a pivot table and the data you've already given it. When working with large datasets, pivot tables are useful. To process data and information in our Excel spreadsheets, pivot tables are versatile and useful reports.
数据透视表汇总你的数据。信息以图表形式呈现。你可以使用数据透视表和你已经提供给它的数据来报告和调查模式。在处理大型数据集时,数据透视表非常有用。为了处理我们Excel电子表格中的数据和信息,数据透视表是多功能且有用的报告。
The following are some of the features of Excel pivot tables: - Allow the precise facts you need to evaluate to be displayed
以下是Excel数据透视表的一些功能:- 允许显示你需要评估的精确事实
- Provide several vantage points to view the data
- Allow you to concentrate on crucial details
- Data comparison is quite useful.
- Pivot tables may recognize a variety of patterns, connections, data trends, etc.
- They can produce data instantly.
- Reliable reports
- Act as the foundation for pivot charts
Source: Excelcampus
来源:Excelcampus
269. How do you create a pivot table?
如何创建数据透视表?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab43b | 官方: 否 | 付费: 否
答案:
It's not as difficult as it first appears to make a pivot table. To get the most out of this process, it is necessary to be aware of all its specifics. - Make the data ready
创建数据透视表并不像看起来那么难。要充分利用这个过程,有必要了解其所有细节。- 准备数据
- Put your information in the excel sheet.
- To construct a pivot table, highlight your cells.
- In "Row Labels" or "Column Labels," drag and drop a field.
- Drag a field into the "Values" section.
- Adjust your calculations.
While creating a pivot table, keep these in mind: - Each of the columns' first-row headings should be distinctive.
创建数据透视表时,请记住以下几点:- 每列的第一行标题应该是唯一的。
- There should only be one type of data in each column.
- Rows can only include information for a single recording.
- no empty rows
- Columns shouldn't be left entirely empty.
The data needed to create the pivot table must be kept apart from the other data in the sheet.
Select the table, then click on the Insert tab to create a pivot table. Then choose the Pivot Table command, and the following window will appear:选择表格,然后点击“插入”选项卡来创建数据透视表。然后选择“数据透视表”命令,将出现以下窗口:
Click OK after specifying the location where the table will be created. You will observe that a blank pivot table has been created once this is complete. Moreover, the PivotTables Fields window, which aids with pivot table configuration, will open.
指定表格创建位置后点击确定。完成后,你会看到一个空白的数据透视表已创建。此外,将打开“数据透视表字段”窗口,该窗口有助于配置数据透视表。
270. Differentiate between Pivot charts and standard charts.
区分数据透视图和标准图表。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab43e | 官方: 否 | 付费: 否
答案:
The following are a few differences between Pivot charts and standard charts: - The row/column format: A Pivot Chart's row/column orientation cannot be changed using the Select Data Source dialog box, in contrast to a normal chart. Instead, you can achieve the same result by pivoting the Row and Column labels of the corresponding PivotTable.
以下是数据透视图与标准图表之间的一些差异:- 行/列格式:数据透视图的行/列方向不能像普通图表那样通过“选择数据源”对话框更改。相反,您可以通过调整相应数据透视表的行和列标签来实现相同的结果。
- Chart type: A Pivot Chart can be changed into any form of a chart, with the exception of a xy (scatter), stock, or bubble chart.
- Source of data: Pivot Charts are based on the data source of the related Pivot Table, whereas standard charts are tied directly to worksheet cells. In contrast to a standard chart, the Pivot Chart's Choose Data Source dialog box does not allow you to alter the chart's data range.
- Formatting The majority of formatting, including newly added chart elements, structure, and style, is kept when you reload a Pivot Chart. Trendlines, data labels, error bars, and other modifications to data sets, however, are not kept. After being applied, standard charts retain their formatting. Although you can't directly modify the data labels in a Pivot Chart, you may still do it by increasing the text's font size.
271. How does a slicer work in Excel?
Excel 中的切片器是如何工作的?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab441 | 官方: 否 | 付费: 否
答案:
Excel uses slicers to easily filter Pivot Tables. Even more, you can link numerous slicers to numerous pivot tables.
Excel 使用切片器来轻松筛选数据透视表。更进一步,您可以将多个切片器链接到多个数据透视表。
Do the following to add a slicer to the pivot tables: - Choose any cell in the pivot table by clicking it.
按照以下步骤向数据透视表添加切片器:- 单击数据透视表中的任意单元格以选中它。
- Select Analyze, then Filter, then Insert Slicer.
272. What are the steps to split a column into two or more columns?
将一列拆分成两列或多列的步骤是什么?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab444 | 官方: 否 | 付费: 否
答案:
The following are the steps to split a column into two or more: - Choose the cell you would like to split. Then, click on Text to Columns under the Data tab.
以下是将一列拆分成两列或多列的步骤:- 选择您想要拆分的单元格。然后,在“数据”选项卡下单击“分列”。
- Decide on a delimiter.
- Choose the location where you wish to display the split after selecting the column data format.
273. What is a cell address?
什么是单元格地址?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab447 | 官方: 否 | 付费: 否
答案:
On a worksheet, a specific cell is identified by its cell address. It is determined by the appropriate column letter and the corresponding row number.
在工作表上,特定单元格由其单元格地址标识。它由相应的列字母和对应的行号决定。
The highlighted cell's address is D3 because, as shown, it is in row 3 and column 'D'.
高亮显示的单元格地址是 D3,因为如图所示,它位于第 3 行和“D”列。
274. Differentiate between the terms "absolute cell referencing" and "relative cell referencing" in Microsoft Excel.
在 Microsoft Excel 中区分“绝对单元格引用”和“相对单元格引用”这两个术语。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab44a | 官方: 否 | 付费: 否
答案:
Instead of using values while generating a formula, we use cell references. In this method, as we alter the values of the cells, the formula's outcome also alters. References come in two varieties: - Relative Reference: Relative references indicate the precise location of the cell, and it is the row and column in which the cell that has a value or a formula is situated. If we try taking that same cell to relocate it to another cell, worth the redundancy, it will refer to the new cells according to where they are located. As a result, we can claim that Excel predetermines relative references. Example: See the illustration below, where there is a formula written in C9 and copied to C10. As you can see, C10, as opposed to A9 and B9, displays the total of A10 and B10.
在生成公式时,我们使用单元格引用而非数值。在这种方法中,当我们更改单元格的值时,公式的结果也会随之改变。引用有两种类型:- 相对引用:相对引用指示单元格的精确位置,即包含值或公式的单元格所在的行和列。如果我们尝试将同一单元格移动到另一个位置,值得重复的是,它将根据新位置引用新单元格。因此,我们可以说 Excel 预设了相对引用。示例:请看下面的图示,其中在 C9 中写入了一个公式并复制到 C10。如您所见,C10 显示的是 A10 和 B10 的总和,而不是 A9 和 B9 的总和。
- Absolute Reference: An exact address is represented by the absolute reference. In other words, it constantly refers to the same cell, making it impossible to change them during copying. Absolute references are crucial since they are fixed, which is excellent when using Excel functions or formulae. Example: The $ symbol must come before the column and row numbers if you want to use absolute referencing. The row and column addresses do not change when absolute cell references are used; they stay the same. Look at the illustration in the following image:
Image Source: Edureka
图片来源:Edureka
275. What do you understand by “freeze panes” in MS excel?
你如何理解 MS Excel 中的“冻结窗格”?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab44d | 官方: 否 | 付费: 否
答案:
With freeze panes, any row or column can be locked. Even if we vertically or horizontally scroll the sheet, the locked row or column will still be visible on the screen. Observe the instructions below to freeze panes in Excel. - Choose the Rows and Columns you want to Freeze first.
使用冻结窗格,可以锁定任何行或列。即使我们垂直或水平滚动工作表,锁定的行或列仍将显示在屏幕上。请按照以下说明在 Excel 中冻结窗格。- 首先选择您要冻结的行和列。
- Then choose Freeze Pane from the View tab.
- Now, you have the following three options to pick and choose which rows and columns to freeze.
276. How can one restrict copying a cell from a worksheet?
如何限制从工作表中复制单元格?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab450 | 官方: 否 | 付费: 否
答案:
To restrict someone from copying a cell from our worksheet, we need to follow the steps given below: - Select the data you wish to safeguard first.
要限制某人从我们的工作表中复制单元格,我们需要按照以下步骤操作:- 首先选择您要保护的数据。
- Press Ctrl, Shift, and F. It then shows the Format Cells tab. Select the Protection tab. Click OK after selecting Locked.
- Then, click Protect Sheet from the Review menu. To secure the sheet, enter the password.
Gif Source: WPS Academy
动图来源:WPS学院
277. Differentiate a formula from a function in excel.
区分Excel中的公式与函数。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab453 | 官方: 否 | 付费: 否
答案:
Formula:
The user types in the formula, which looks like an Excel equation. Based on the user's preference, it might be any kind of calculation. It takes longer to manually type a formula each time you need to make a computation.用户输入公式,其形式看起来像Excel方程式。根据用户的偏好,它可以是任何类型的计算。每次需要进行计算时,手动输入公式会花费更长时间。
Example: B1 + B2 + B3
示例:B1 + B2 + B3Function:
An Excel function is a built-in computation that has been predefined. Using functions makes conducting computations quicker and more comfortable.Excel函数是一种预定义的内置计算。使用函数可以使计算更快、更方便。
Example: SUM(B1 : B3)
示例:SUM(B1 : B3)
278. Discuss how Excel evaluates formulas in terms of the order of operations.
讨论Excel如何按照运算顺序来计算公式。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab456 | 官方: 否 | 付费: 否
答案:
PEDMAS is the term used to describe the Excel operation order. The precedence list for an Excel operation is displayed below. - Parentheses
PEDMAS是描述Excel运算顺序的术语。Excel运算的优先级列表如下所示。- 括号
- Exponentiation
- Division/Multiplication
- Addition
Subtraction
As can be seen above, the exponentiation process is performed after the data in the parenthesis is processed. Following that, either the division or multiplication procedures may be performed. The outcome is then added and finally subtracted, to provide the result.如上所示,括号内的数据处理完成后,会进行幂运算。之后,可以进行除法或乘法运算。然后将结果相加,最后相减,以给出最终结果。
279. Write the differences between COUNT, COUNTA and COUNTBLANK.
写出COUNT、COUNTA和COUNTBLANK之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab459 | 官方: 否 | 付费: 否
答案:
- COUNT: The number of cells with simply numerical values is counted. Blank cells, special characters, and cells with string values will not be included in the calculation.
- COUNTA: The number of cells with any kind of content is counted. Numeric data, special characters, and string values contained in cells will all be counted. A blank cell will not be taken into account, though.
- COUNTBLANK: It solely counts the number of blank cells, as the name would imply. Content-containing cells will not be taken into account.
280. How can we combine text strings from several cells into one cell?
我们如何将多个单元格中的文本字符串合并到一个单元格中?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab45c | 官方: 否 | 付费: 否
答案:
Use the CONCATENATE command to combine text strings that are contained in numerous cells into one cell. Up to 30 text pieces can be joined using the Excel CONCATENATE function, which returns the result as text.
使用CONCATENATE命令将许多单元格中包含的文本字符串合并到一个单元格中。Excel的CONCATENATE函数可以连接最多30段文本,并以文本形式返回结果。
The Excel Concatenate function has the following syntax: CONCATENATE (text1, text2, ..)
Excel CONCATENATE函数的语法如下:CONCATENATE (text1, text2, ..)
The following formula can be used to CONCATENATE the values of two cells, A2 and B2: CONCATENATE (A2, B2). There will not be any delimiters used when combining the values. Use a space (" ") to demarcate the values: CONCATENATE(A3, " ", B3).
以下公式可用于连接两个单元格A2和B2的值:CONCATENATE (A2, B2)。合并值时不会使用任何分隔符。使用空格(" ")来分隔值:CONCATENATE(A3, " ", B3)。
281. How would you add comments to your cells?
如何向单元格添加注释?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab45f | 官方: 否 | 付费: 否
答案:
You must right-click a cell and select add comment from the cell menu to add a comment to it. Write your comment in the space provided for comments. There is a comment associated with that specific cell if there is a red triangle in the upper right corner of the cell. Right-click the cell and choose "Delete Comment" from the cell menu to get rid of a comment.
要向单元格添加注释,您必须右键单击该单元格,并从单元格菜单中选择“添加注释”。在提供的注释区域中输入您的注释。如果单元格右上角有红色三角形,则表示该特定单元格有关联的注释。要删除注释,请右键单击该单元格,并从单元格菜单中选择“删除注释”。
282. What are spreadsheets?
什么是电子表格?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab462 | 官方: 否 | 付费: 否
答案:
Spreadsheets are software programs that facilitate effective data organization, calculation, and sorting. A spreadsheet consists of rows and columns spread throughout. The total number of rows and columns on an MS excel worksheet is 1,048,576 rows by 16,384 columns.
电子表格是促进数据有效组织、计算和排序的软件程序。电子表格由遍布的行和列组成。MS Excel 工作表中的总行数和列数为 1,048,576 行乘以 16,384 列。
There is a worksheet (labeled "Sheet1") as shown below, and we also notice a "+" sign somewhere at the bottom, which indicates we can create a new sheet. We can add, rename, remove, hide, show, and perform other actions on sheets. Worksheets are added by default as Sheet1, Sheet2, etc. Such sheets are simple to rename as necessary.
下面有一个工作表(标记为“Sheet1”),我们还在底部注意到一个“+”号,这表示我们可以创建新工作表。我们可以对工作表执行添加、重命名、删除、隐藏、显示以及其他操作。工作表默认添加为 Sheet1、Sheet2 等。这些工作表可根据需要轻松重命名。
283. What is VLOOKUP in excel? How does the VLOOKUP function work?
Excel 中的 VLOOKUP 是什么?VLOOKUP 函数如何工作?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab465 | 官方: 否 | 付费: 否
答案:
Excel's VLOOKUP (which stands for Vertical Lookup) function is used to find and produce data from a specific set. To make use of this functionality, we need to arrange the data vertically because V is for Vertical in VLOOKUP. Whenever we need to find a certain amount of data from a vast amount of data, VLOOKUP is tremendously helpful.
Excel 的 VLOOKUP(代表垂直查找)函数用于从特定数据集中查找并生成数据。要使用此功能,我们需要垂直排列数据,因为 VLOOKUP 中的 V 代表垂直。每当我们需要从大量数据中查找一定量的数据时,VLOOKUP 非常有用。
The VLOOKUP function in Excel has a lookup value and starts searching in the left-hand column. VLOOKUP will move right, or into the search value row if the value of that search appears first. It keeps on until the specified column number is returned. This function compares estimated and true search values. Nonetheless, the default match is approximate.
Excel 中的 VLOOKUP 函数有一个查找值,并从左侧列开始搜索。如果该搜索值首先出现,VLOOKUP 将向右移动,或进入搜索值行。它一直持续到返回指定列号为止。此函数比较估计值和真实搜索值。尽管如此,默认匹配是近似匹配。
Here, - lookup_value: The value that you wish to check for is known as the lookup value.
这里,- lookup_value:您希望检查的值称为查找值。
- table_index: The set of data to be taken from is the table index.
- col_index_num: col index num specifies the column you wish to extract the value from.
- range_lookup: Logical value, i.e., TRUE or FALSE, is the range lookup (TRUE finds the closest match; FALSE will check for an exact match)
284. Can VLOOKUP be used on many tables?
VLOOKUP 可以在多个表上使用吗?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab468 | 官方: 否 | 付费: 否
答案:
Indeed, you can use VLOOKUP for several tables. If you have two search tables, create named fields for each of them and use the IF function to choose from each table in accordance with a predetermined set of criteria.
确实,您可以对多个表使用 VLOOKUP。如果您有两个搜索表,为每个表创建命名区域,并使用 IF 函数根据预定的标准集从每个表中选择。
Source: Excel Tip
来源:Excel Tip
285. How is VLOOKUP different from LOOKUP?
VLOOKUP 与 LOOKUP 有何不同?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab46b | 官方: 否 | 付费: 否
答案:
The user can use VLOOKUP to search for a value in a table's leftmost column. The value is then returned in a left-to-right way. On the other hand, the user can search for data in a row or column using the LOOKUP function. It shows up the value in a different row or column.
用户可以使用 VLOOKUP 在表格最左侧列中搜索值。然后从左到右返回该值。另一方面,用户可以使用 LOOKUP 函数在行或列中搜索数据。它会显示在另一行或列中的值。
286. Discuss the functionality of IF() in Excel.
讨论 Excel 中 IF() 的功能。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab46e | 官方: 否 | 付费: 否
答案:
The IF() function in Excel does a logical test. If the test results in true, it returns a value; if the test results in false, it returns a different value. Whether the condition holds for the full chosen range determines what value is returned.
Excel 中的 IF() 函数执行逻辑测试。如果测试结果为真,则返回一个值;如果测试结果为假,则返回不同的值。返回的值取决于条件是否适用于整个选定范围。
Source: My Online Training Hub
来源:My Online Training Hub
287. Discuss the functionality of SUMIF() in Excel.
讨论 Excel 中 SUMIF() 的功能。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab471 | 官方: 否 | 付费: 否
答案:
Cell values described by a particular condition or set of criteria are added by the SUMIF() function.
由SUMIF()函数根据特定条件或标准集添加的单元格值会被相加。
Syntax: =SUMIF(range, criteria, [sum_range])
语法:=SUMIF(范围, 条件, [求和范围])
Source: Excel Practice Online
来源:Excel在线实践
Note: - range (necessary): the set of cells you want to subject to criterion. Each range must include only numbers, names, arrays, or references containing numbers. Values that are blank or text are ignored. Dates in the typical Excel format could be found in the selected range.
注意: - 范围(必要):您想要应用标准的单元格集合。每个范围必须仅包含数字、名称、数组或包含数字的引用。空白或文本值将被忽略。所选范围中可能包含典型Excel格式的日期。
- criteria (necessary): A number, expression, cell reference, text, or function that specifies which cells will be added can all be used as criteria
- sum_range (optional): the actual cells to add if you wish to add cells that are not listed in the range argument. The cells that are given in the range parameter are added by Excel if the sum_range argument is not present (those cells to which the criteria are imposed).
288. How do you create a dropdown list in excel?
如何在Excel中创建下拉列表?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab474 | 官方: 否 | 付费: 否
答案:
The 'Data Validation' option found in the Data tab can accomplish this. - Select the cells in which the drop-down lists are to be added.
数据选项卡中的“数据验证”选项可以实现此功能。- 选择要添加下拉列表的单元格。
- Select Data, then click on Data Validation.
- Select List from the menu under Allow.
Give the input for the items (separated by a comma) in your dropdown list in the Source tab.
The dropdown list is ready.下拉列表已准备好。
Source: Trump Excel
来源:特朗普Excel
289. Highlight the cells with total sales > $5000 using the sales information below.
使用下面的销售信息突出显示总销售额> $5000的单元格。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab477 | 官方: 否 | 付费: 否
答案:
Cells that meet the criterion are highlighted in this case using conditional formatting. Choose "Conditional Formatting" from the home tab, then "Greater Than option" under the Highlight Cells Rules section. Choose the color for the highlighted cells and specify the criterion.
在这种情况下,满足标准的单元格使用条件格式突出显示。从“开始”选项卡中选择“条件格式”,然后在“突出显示单元格规则”部分下选择“大于”选项。为突出显示的单元格选择颜色并指定标准。
290. How do you identify repeated values in a column?
如何识别列中的重复值?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab47a | 官方: 否 | 付费: 否
答案:
You may utilize conditional formatting or the COUNTIF() function to identify duplicate values in a column. - Conditional Formatting: Choose "Highlight Cells Rules" under Conditional Formatting after first selecting the Home tab. Next, select "Duplicate Values."
您可以使用条件格式或COUNTIF()函数来识别列中的重复值。- 条件格式:首先选择“开始”选项卡后,在“条件格式”下选择“突出显示单元格规则”。然后,选择“重复值”。
- COUNTIF(): To determine whether the values in a given column are repeated, you can implement a COUNTIF() method.
291. How can duplicate values be eliminated from a cell range?
如何从单元格范围中消除重复值?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab47d | 官方: 否 | 付费: 否
答案:
You may eliminate duplicate values by choosing the 'Remove Duplicates' option from the Data Tools menu on the Data tab.
您可以通过在“数据”选项卡的“数据工具”菜单中选择“删除重复项”选项来消除重复值。
292. What is the difference between VLOOKUP and HLOOKUP in Excel?
Excel中VLOOKUP和HLOOKUP有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab480 | 官方: 否 | 付费: 否
答案:
VLOOKUP and HLOOKUP both help you search for data in a table, but the direction is different. VLOOKUP searches vertically in the first (leftmost) column and returns a value from a column you specify, while HLOOKUP searches horizontally in the top row and returns a value from a row you choose. The syntax is similar:
VLOOKUP和HLOOKUP都帮助您在表中搜索数据,但方向不同。VLOOKUP在第一(最左)列中垂直搜索,并从您指定的列返回一个值,而HLOOKUP在顶行中水平搜索,并从您选择的行返回一个值。语法类似:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
=VLOOKUP(查找值, 表格数组, 列序号, [范围查找])
and
和
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
=HLOOKUP(查找值, 表格数组, 行序号, [范围查找])
. You use VLOOKUP when data is arranged in columns and HLOOKUP when it is arranged in rows. Both cannot look to the left (VLOOKUP) or above (HLOOKUP) the lookup area.
。当数据按列排列时使用VLOOKUP,按行排列时使用HLOOKUP。两者都不能向左(VLOOKUP)或向上(HLOOKUP)查找区域。
293. What is the difference between the FIND and SEARCH functions in Excel?
Excel中FIND和SEARCH函数有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab483 | 官方: 否 | 付费: 否
答案:
FIND and SEARCH are used to locate the position of text inside another text string. The main difference is that FIND is case-sensitive and does not allow wildcards, while SEARCH is case-insensitive and supports wildcards like * and ?. The syntax is
FIND和SEARCH用于定位文本在另一个文本字符串中的位置。主要区别是FIND区分大小写且不允许通配符,而SEARCH不区分大小写并支持*和?等通配符。语法为
=FIND(find_text, within_text, [start_num])
=FIND(查找文本, 在其中查找的文本, [起始位置])
and
和
=SEARCH(find_text, within_text, [start_num])
=SEARCH(查找文本, 在其中查找的文本, [起始位置])
. If you need exact case matching, use FIND. If you want flexible matching without worrying about capital letters, use SEARCH.
。如果需要精确匹配大小写,请使用FIND。如果希望灵活匹配而不担心大小写字母,请使用SEARCH。
294. What are named ranges in Excel? How do you create and use them?
什么是Excel中的命名区域?如何创建和使用它们?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37aec58d557c902bab486 | 官方: 否 | 付费: 否
答案:
Named ranges are labels given to a cell or group of cells so you don’t have to use references like
命名区域是给一个单元格或一组单元格赋予的标签,这样就不必使用像
A2:A500
A2:A500
. For example, instead of
这样的引用。例如,代替
=SUM(A2:A500)
=SUM(A2:A500)
, you can name it “SalesData” and write
,你可以将其命名为“SalesData”并写
=SUM(SalesData)
=SUM(SalesData)
. You can create one using the Name Box near the formula bar or through Formulas → Define Name. Named ranges make formulas easier to read and help in quickly navigating large worksheets.
您可以使用公式栏附近的“名称框”或通过“公式”→“定义名称”来创建命名区域。命名区域使公式更易于阅读,并有助于快速浏览大型工作表。
295. What is the IFERROR function in Excel? Why is it important?
Excel中的IFERROR函数是什么?为什么它很重要?
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aec58d557c902bab489 | 官方: 否 | 付费: 否
答案:
IFERROR is used to handle errors in formulas in a simple way. Its syntax is
IFERROR用于以简单方式处理公式中的错误。其语法为
=IFERROR(value, value_if_error)
=IFERROR(value, value_if_error)
, meaning if the formula returns an error, Excel will show the value you choose instead. For example, when VLOOKUP shows #N/A, you can display “Not Found” instead. It works for all error types and is cleaner than using nested
,意思是如果公式返回错误,Excel将显示您选择的值。例如,当VLOOKUP显示#N/A时,您可以显示“未找到”。它适用于所有错误类型,并且比嵌套使用
IF(ISERROR())
IF(ISERROR())
formulas. This makes reports look more clear and professional.
公式更简洁。这使报告看起来更清晰和专业。
296. What is the TEXT function in Excel? Provide examples.
Excel中的TEXT函数是什么?请提供示例。
- 知识点: 数据工程与数据科学/AI (主题: excel, data-analysis;标签: interviewbit, excel, topic-specific, data-analysis)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37aed58d557c902bab48c | 官方: 否 | 付费: 否
答案:
“Total Sales: ” & TEXT(A1, "$#,##0")
"总销售额:" & TEXT(A1, "$#,##0")
. This helps control how dates, numbers, and percentages appear in your final result.
。这有助于控制日期、数字和百分比在最终结果中的显示方式。
=TEXT(1234.5, "$#,##0.00")
=TEXT(1234.5, "$#,##0.00")
shows a formatted currency value. It is useful when combining numbers with text, like
显示格式化后的货币值。当需要将数字与文本结合时非常有用,例如
=TEXT(TODAY(), "DD-MMM-YYYY")
=TEXT(TODAY(), "DD-MMM-YYYY")
shows a formatted date, and
显示格式化后的日期,以及
The TEXT function converts numbers into text in a specific format using=TEXT(value, format_text)
TEXT函数使用=TEXT(value, format_text)将数字按特定格式转换为文本
. For example,
。例如,
297. Explain big data and list its characteristics.
解释大数据并列出其特征。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902bada8a | 官方: 否 | 付费: 否
答案:
Gartner defined Big Data as– “ Big data” is high-volume, velocity, and variety information assets that demand cost-effective, innovative forms of information processing for enhanced insight and decision making. ”
高德纳将大数据定义为——“大数据”是高容量、高速度和高多样性的信息资产,需要经济高效、创新的信息处理形式,以增强洞察力和决策能力。
Simply, big data is larger, more complex data sets, particularly from new data sources. These data sets are so large that conventional data processing software can’t manage them. But these massive volumes of data can be used to address business problems you wouldn’t have been able to tackle before.
简单来说,大数据是更大、更复杂的数据集,特别是来自新数据源的数据集。这些数据集规模巨大,以至于传统的数据处理软件无法管理它们。但这些海量数据可用于解决你以前无法应对的业务问题。
Image Source: ResearchGate
图片来源:ResearchGate
Characteristics of Big Data are: - Volume: A large amount of data stored in data warehouses refers to Volume.
大数据的特征包括:- 容量:存储在数据仓库中的大量数据指容量。
- Velocity: Velocity typically refers to the pace at which data is being generated in real-time.
- Variety: Variety of Big Data relates to structured, unstructured, and semistructured data that is collected from multiple sources.
- Veracity: Data veracity generally refers to how accurate the data is.
- Value: No matter how fast the data is produced or its amount, it has to be reliable and valuable. Otherwise, the information is not good enough for processing or analysis.
298. Explain Hadoop. List the core components of Hadoop
解释Hadoop。列出Hadoop的核心组件
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902bada91 | 官方: 否 | 付费: 否
答案:
Hadoop is a famous big data tool utilized by many companies globally. Few successful Hadoop users: - Uber
Hadoop是一种著名的大数据工具,被全球许多公司使用。少数成功的Hadoop用户:- Uber
- The Bank of Scotland
- Netflix
- The National Security Agency (NSA) of the United States
Twitter
There are three components of Hadoop are:Hadoop有三个组件:
Hadoop YARN - It is a resource management unit of Hadoop. 2. Hadoop Distributed File System (HDFS) - It is the storage unit of Hadoop. 3. Hadoop MapReduce - It is the processing unit of Hadoop.
- Hadoop YARN - 它是Hadoop的资源管理单元。 2. Hadoop分布式文件系统(HDFS) - 它是Hadoop的存储单元。 3. Hadoop MapReduce - 它是Hadoop的处理单元。
299. Explain the Storage Unit In Hadoop (HDFS).
解释Hadoop中的存储单元(HDFS)。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902bada94 | 官方: 否 | 付费: 否
答案:
HDFS is the Hadoop Distributed File System, is the storage layer for Hadoop. The files in HDFS are split into block-size parts called data blocks. These blocks are saved on the slave nodes in the cluster. By default, the size of the block is 128 MB by default, which can be configured as per our necessities. It follows the master-slave architecture. It contains two daemons- DataNodes and NameNode.
HDFS是Hadoop分布式文件系统,是Hadoop的存储层。HDFS中的文件被分成块大小的部分,称为数据块。这些块保存在集群中的从节点上。默认情况下,块大小为128 MB,可以根据需要配置。它遵循主从架构。它包含两个守护进程——DataNode和NameNode。
NameNode The NameNode is the master daemon that operates on the master node. It saves the filesystem metadata, that is, files names, data about blocks of a file, blocks locations, permissions, etc. It manages the Datanodes. DataNode The DataNodes are the slave daemon that operates on the slave nodes. It saves the actual business data. It serves the client read/write requests based on the NameNode instructions. It stores the blocks of the files, and NameNode stores the metadata like block locations, permission, etc.
NameNode NameNode是运行在主节点上的主守护进程。它保存文件系统元数据,即文件名、文件块的数据、块位置、权限等。它管理DataNode。DataNode DataNode是运行在从节点上的从守护进程。它保存实际的业务数据。它根据NameNode的指令为客户端的读/写请求提供服务。它存储文件的块,而NameNode存储诸如块位置、权限等元数据。
300. Mention different Features of HDFS.
提及HDFS的不同特性。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902bada97 | 官方: 否 | 付费: 否
答案:
- Fault ToleranceHadoop framework divides data into blocks and creates various copies of blocks on several machines in the cluster. So, when any device in the cluster fails, clients can still access their data from the other machine containing the exact copy of data blocks.
- High AvailabilityIn the HDFS environment, the data is duplicated by generating a copy of the blocks. So, whenever a user wants to obtain this data, or in case of an unfortunate situation, users can simply access their data from the other nodes because duplicate images of blocks are already present in the other nodes of the HDFS cluster.
- High ReliabilityHDFS splits the data into blocks, these blocks are stored by the Hadoop framework on nodes existing in the cluster. It saves data by generating a duplicate of every block current in the cluster. Hence presents a fault tolerance facility. By default, it creates 3 duplicates of each block containing information present in the nodes. Therefore, the data is promptly obtainable to the users. Hence the user does not face the difficulty of data loss. Therefore, HDFS is very reliable.
- ReplicationReplication resolves the problem of data loss in adverse conditions like device failure, crashing of nodes, etc. It manages the process of replication at frequent intervals of time. Thus, there is a low probability of a loss of user data.
- ScalabilityHDFS stocks the data on multiple nodes. So, in case of an increase in demand, it can scale the cluster.
- Data Science
- All Events
- My Events
301. What are the Limitations of Hadoop 1.0 ?
Hadoop 1.0有哪些局限性?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902bada9a | 官方: 否 | 付费: 否
答案:
- Only one NameNode is possible to configure.
- Secondary NameNode was to take hourly backup of MetaData from NameNode.
- It is only suitable for Batch Processing of a vast amount of Data, which is already in the Hadoop System.
- It is not ideal for Real-time Data Processing.
- It supports up to 4000 Nodes per Cluster.
- It has a single component: JobTracker to perform many activities like Resource Management, Job Scheduling, Job Monitoring, Re-scheduling Jobs etc.
- JobTracker is the single point of failure.
- It supports only one Name No and One Namespace per Cluster.
- It does not help the Horizontal Scalability of NameNode.
- It runs only Map/Reduce jobs.
302. Compare the main differences between HDFS (Hadoop Distributed File System ) and Network Attached Storage(NAS) ?
比较HDFS(Hadoop分布式文件系统)和网络附加存储(NAS)之间的主要区别?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37b2e58d557c902bada9d | 官方: 否 | 付费: 否
答案:
| HDFS | NAS |
|---|---|
| HDFS is a Distributed File system that is mainly used to store data by commodity hardware. HDFS 是一种分布式文件系统,主要用于通过商品硬件存储数据。 | NAS is a file-level computer data storage server connected to a computer network that provides network access to a heterogeneous group of clients. NAS 是一种连接到计算机网络的文件级计算机数据存储服务器,为异构客户端组提供网络访问。 |
| HDFS is programmed to work with the MapReduce paradigm. HDFS 被编程为与 MapReduce 范式配合使用。 | NAS is not suitable to work with a MapReduce paradigm. NAS 不适合与 MapReduce 范式配合使用。 |
| HDFS is Cost-effective. HDFS 成本效益高。 | NAS is a high-end storage device that is highly expensive. NAS 是一种高端存储设备,价格非常昂贵。 |
303. List Hadoop Configuration files.
列出 Hadoop 配置文件。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badaa0 | 官方: 否 | 付费: 否
答案:
(补充答案·AI 生成(AI-Generated))
Hadoop 主要配置文件(位于 $HADOOP_HOME/etc/hadoop):①core-site.xml —— 核心参数,如 fs.defaultFS、hadoop.tmp.dir、I/O 设置;②hdfs-site.xml —— HDFS 参数,如 dfs.replication、namenode/datanode 目录、dfs.blocksize;③mapred-site.xml —— MapReduce 参数,如 mapreduce.framework.name(设定为 yarn 时用 YARN 跑 MR);④yarn-site.xml —— YARN 参数,如 yarn.resourcemanager.hostname、yarn.nodemanager.aux-services;⑤hadoop-env.sh —— Java 环境变量与 JVM 参数;⑥workers/slaves —— 集群 DataNode/NodeManager 节点列表;⑦(多机部署)还包括 hdfs-site 的 HA/联邦相关配置。
304. Explain Hadoop MapReduce.
解释 Hadoop MapReduce。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badaa4 | 官方: 否 | 付费: 否
答案:
Hadoop MapReduce is a software framework for processing enormous data sets. It is the main component for data processing in the Hadoop framework. It divides the input data into several parts and runs a program on every data component parallel at one. The word MapReduce refers to two separate and different tasks.
Hadoop MapReduce 是一个用于处理海量数据集的软件框架。它是 Hadoop 框架中数据处理的主要组件。它将输入数据分成若干部分,并在每个数据组件上并行运行一个程序。单词 MapReduce 指的是两个独立且不同的任务。
The first is the map operation, which takes a set of data and transforms it into a different collection of data, where individual elements are divided into tuples. The reduce operation consolidates those data tuples based on the key and subsequently modifies the value of the key.
第一个是 map 操作,它接收一组数据并将其转换为不同的数据集,其中单个元素被划分为元组。reduce 操作根据键合并这些数据元组,然后修改键的值。
Let us take an example of a text file called example_data.txt and understand how MapReduce works.
让我们以名为 example_data.txt 的文本文件为例,了解 MapReduce 是如何工作的。
The content of the example_data.txt file is: coding,jamming,ice,river,man,driving
example_data.txt 文件的内容是:coding,jamming,ice,river,man,driving
Now, assume we have to find out the word count on the example_data.txt using MapReduce. So, we will be looking for the unique words and the number of times those unique words appeared.
现在,假设我们必须使用 MapReduce 找出 example_data.txt 中的单词计数。因此,我们将查找唯一单词以及这些唯一单词出现的次数。
- First, we break the input into three divisions, as seen in the figure. This will share the work among all the map nodes.
- Then, all the words are tokenized in each of the mappers, and a hardcoded value (1) to each of the tokens is given. The reason behind giving a hardcoded value equal to 1 is that every word by itself will, at least, occur once.
- Now, a list of key-value pairs will be created where the key is nothing but the individual words and value is one. So, for the first line (Coding Ice Jamming), we have three key-value pairs – Coding, 1; Ice, 1; Jamming, 1.
- The mapping process persists the same on all the nodes.
- Next, a partition process occurs where sorting and shuffling follow so that all the tuples with the same key are sent to the identical reducer.
- Subsequent to the sorting and shuffling phase, every reducer will have a unique key and a list of values matching that very key. For example, Coding, [1,1]; Ice, [1,1,1].., etc.
- Now, each Reducer adds the values which are present in that list of values. As shown in the example, the reducer gets a list of values [1,1] for the key Jamming. Then, it adds the number of ones in the same list and gives the final output as – Jamming, 2.
- Lastly, all the output key/value pairs are then assembled and written in the output file.
305. What is shuffling in MapReduce?
在 MapReduce 中,什么是洗牌?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badaa8 | 官方: 否 | 付费: 否
答案:
In Hadoop MapReduce, shuffling is used to transfer data from the mappers to the important reducers. It is the process in which the system sorts the unstructured data and transfers the output of the map as an input to the reducer. It is a significant process for reducers. Otherwise, they would not accept any information. Moreover, since this process can begin even before the map phase is completed, it helps to save time and complete the process in a lesser amount of time.
在 Hadoop MapReduce 中,洗牌用于将数据从映射器传输到重要的归约器。它是系统对非结构化数据进行排序并将 map 的输出作为输入传输给 reducer 的过程。这对 reducer 来说是一个重要的过程。否则,它们不会接受任何信息。此外,由于此过程甚至可以在 map 阶段完成之前开始,因此它有助于节省时间并在更短的时间内完成该过程。
306. List the components of Apache Spark.
列出 Apache Spark 的组件。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badaab | 官方: 否 | 付费: 否
答案:
Apache Spark comprises the Spark Core Engine, Spark Streaming, MLlib, GraphX, Spark SQL, and Spark R.
Apache Spark 包括 Spark Core 引擎、Spark Streaming、MLlib、GraphX、Spark SQL 和 Spark R。
The Spark Core Engine can be used along with any of the other five components specified. It is not required to use all the Spark components collectively. Depending on the use case and request, one or more can be used along with Spark Core.
Spark Core 引擎可以与指定其他五个组件中的任何一个一起使用。不需要集体使用所有 Spark 组件。根据用例和请求,可以单独或与 Spark Core 一起使用一个或多个组件。
307. What is an Apache Hive?
什么是 Apache Hive?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badab2 | 官方: 否 | 付费: 否
答案:
Hive is an open-source system that processes structured data in Hadoop, living on top of the latter for summing Big Data and facilitating analysis and queries. In addition, hive enables SQL developers to write Hive Query Language statements similar to standard SQL statements for data query and analysis. It is created to make MapReduce programming easier because you don’t know and write lengthy Java code.
Hive 是一个在 Hadoop 中处理结构化数据的开源系统,它构建在 Hadoop 之上,用于汇总大数据并促进分析和查询。此外,Hive 使 SQL 开发人员能够编写类似于标准 SQL 语句的 Hive 查询语言语句,用于数据查询和分析。它旨在使 MapReduce 编程更简单,因为您无需了解并编写冗长的 Java 代码。
308. What is Apache Pig?
什么是 Apache Pig?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badab5 | 官方: 否 | 付费: 否
答案:
MapReduce needs programs to be translated into map and reduce stages. As not all data analysts are accustomed to MapReduce, Yahoo researchers introduced Apache pig to bridge the gap. Apache Pig was created on top of Hadoop, producing a high level of abstraction and enabling programmers to spend less time writing complex MapReduce programs.
MapReduce 需要将程序转换为 map 和 reduce 阶段。由于并非所有数据分析师都熟悉 MapReduce,雅虎研究人员引入了 Apache Pig 来弥合这一差距。Apache Pig 构建在 Hadoop 之上,提供了高层次的抽象,使程序员能够花更少的时间编写复杂的 MapReduce 程序。
309. Explain the Apache Pig architecture.
解释 Apache Pig 架构。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37b2e58d557c902badab8 | 官方: 否 | 付费: 否
答案:
Apache Pig architecture includes a Pig Latin interpreter that applies Pig Latin scripts to process and interpret massive datasets. Programmers use Pig Latin language to examine huge datasets in the Hadoop environment. Apache pig has a vibrant set of datasets showing different data operations like join, filter, sort, load, group, etc. Programmers must practice Pig Latin language to address a Pig script to perform a particular task. Pig transforms these Pig scripts into a series of Map-Reduce jobs to reduce programmers’ work. Pig Latin programs are performed via various mechanisms such as UDFs, embedded, and Grunt shells.
Apache Pig 架构包括一个 Pig Latin 解释器,该解释器应用 Pig Latin 脚本处理并解释海量数据集。程序员使用 Pig Latin 语言在 Hadoop 环境中检查大型数据集。Apache Pig 拥有丰富的数据集,展示不同的数据操作,如连接、过滤、排序、加载、分组等。程序员必须练习 Pig Latin 语言来编写 Pig 脚本以执行特定任务。Pig 将这些 Pig 脚本转换为一系列 Map-Reduce 作业,以减少程序员的工作量。Pig Latin 程序通过多种机制执行,如 UDF、嵌入式和 Grunt shell。
Apache Pig architecture consists of the following major components: - Parser: The Parser handles the Pig Scripts and checks the syntax of the script.
Apache Pig 架构包含以下主要组件:- 解析器:解析器处理 Pig 脚本并检查脚本的语法。
- Optimizer: The optimizer receives the logical plan (DAG). And carries out the logical optimization such as projection and push down.
- Compiler: The compiler converts the logical plan into a series of MapReduce jobs.
- Execution Engine: In the end, the MapReduce jobs get submitted to Hadoop in sorted order.
- Execution Mode: Apache Pig is executed in local and Map Reduce modes. The selection of execution mode depends on where the data is stored and where you want to run the Pig script.
310. What is Yarn?
什么是 Yarn?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badabb | 官方: 否 | 付费: 否
答案:
Yarn stands for Yet Another Resource Negotiator. It is the resource management layer of Hadoop. The Yarn was launched in Hadoop 2.x. Yarn provides many data processing engines like graph processing, batch processing, interactive processing, and stream processing to execute and process data saved in the Hadoop Distributed File System. Yarn also offers job scheduling. It extends the capability of Hadoop to other evolving technologies so that they can take good advantage of HDFS and economic clusters. Apache Yarn is the data operating method for Hadoop 2.x. It consists of a master daemon known as “Resource Manager,” a slave daemon called node manager, and Application Master.
Yarn 代表 Yet Another Resource Negotiator(另一种资源协调器)。它是 Hadoop 的资源管理层。Yarn 在 Hadoop 2.x 中推出。Yarn 提供许多数据处理引擎,如图形处理、批处理、交互处理和流处理,以执行和处理存储在 Hadoop 分布式文件系统中的数据。Yarn 还提供作业调度。它扩展了 Hadoop 的功能到其他新兴技术,使它们能够充分利用 HDFS 和经济型集群。Apache Yarn 是 Hadoop 2.x 的数据操作方法。它由一个主守护进程(称为“资源管理器”)、一个从守护进程(称为节点管理器)和应用程序主控组成。
311. List the YARN components.
列出 YARN 的组件。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badabe | 官方: 否 | 付费: 否
答案:
- Resource Manager: It runs on a master daemon and controls the resource allocation in the cluster.
- Node Manager: It runs on the slave daemons and executes a task on each single Data Node.
- Application Master: It controls the user job lifecycle and resource demands of single applications. It works with the Node Manager and monitors the execution of tasks.
- Container: It is a combination of resources, including RAM, CPU, Network, HDD, etc., on a single node.
312. What is Apache ZooKeeper?
什么是 Apache ZooKeeper?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badac1 | 官方: 否 | 付费: 否
答案:
Apache Zookeeper is an open-source service that supports controlling a huge set of hosts. Management and coordination in a distributed environment are complex. Zookeeper automates this process and enables developers to concentrate on building software features rather than bother about its distributed nature.
Apache Zookeeper 是一个开源服务,支持控制大量主机。在分布式环境中,管理和协调是复杂的。Zookeeper 自动化了这一过程,使开发人员能够专注于构建软件功能,而不是担心其分布式特性。
Zookeeper helps to maintain configuration knowledge, naming, group services for distributed applications. It implements various protocols on the cluster so that the application should not execute them on its own. It provides a single coherent view of many machines.
Zookeeper 帮助维护分布式应用的配置知识、命名和组服务。它在集群上实现各种协议,因此应用程序无需自行执行这些协议。它提供了多台机器的单一一致性视图。
313. What are the Benefits of using zookeeper?
使用 Zookeeper 有哪些好处?
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badac4 | 官方: 否 | 付费: 否
答案:
- Simple distributed coordination process: The coordination process among all nodes in Zookeeper is straightforward.
- Synchronization: Mutual exclusion and co-operation among server processes.
- Ordered Messages: Zookeeper tracks with a number by denoting its order with the stamping of each update; with the help of all this, messages are ordered here.
- Serialization: Encode the data according to specific rules. Ensure your application runs consistently.
- Reliability: The zookeeper is very reliable. In case of an update, it keeps all the data until forwarded.
- Atomicity: Data transfer either succeeds or fails, but no transaction is partial.
314. Mention the types of Znode.
提及 Znode 的类型。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badac7 | 官方: 否 | 付费: 否
答案:
- Persistent Znodes:The default znode in ZooKeeper is the Persistent Znode. It permanently stays in the zookeeper server until any other clients leave it apart.
- Ephemeral Znodes:These are the temporary znodes. It is smashed whenever the creator client logs out of the ZooKeeper server. For example, assume client1 created eznode1. Once client1 logs out of the ZooKeeper server, the eznode1 gets destroyed.
- Sequential Znodes:Sequential znode is assigned a 10-digit number in numerical order at the end of its name. Assume client1 produced a sznode1. In the ZooKeeper server, the sznode1 will be named like this:sznode0000000001If the client1 generates another sequential znode, it will bear the following number in a sequence. So the subsequent sequential znode is 0000000002.
315. List Hadoop HDFS Commands.
列出 Hadoop HDFS 命令。
- 知识点: 数据工程与数据科学/AI (主题: hadoop, data-engineering;标签: interviewbit, hadoop, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b2e58d557c902badaca | 官方: 否 | 付费: 否
答案:
A) version : hadoop version
A) 版本:hadoop version
interviewbit:~$ hadoop version
interviewbit:~$ hadoop version
Hadoop 3.1.2
Hadoop 3.1.2
Source code repository https://github.com/apache/hadoop.git -r
源代码仓库 https://github.com/apache/hadoop.git -r
Compiled by sunlig on 2019-01-29T01:39Z
由 sunlig 于 2019-01-29T01:39Z 编译
interviewbit:~$
interviewbit:~$
B) mkdir : Used to create a new directory.
B) mkdir:用于创建新目录。
interviewbit:~$ hadoop FD -mkdir/interviewbit
interviewbit:~$ hadoop FD -mkdir/interviewbit
interviewbit:~$
interviewbit:~$
C) cat : We are using the cat command to display the content of the file present in the directory of HDFS. hadoop fs –cat /path_to_file_in_hdfs
C) cat:我们使用 cat 命令来显示 HDFS 目录中文件的内容。hadoop fs –cat /path_to_file_in_hdfs
interviewbit:~$ hadoop fs -cat/interviewbit/sample
interviewbit:~$ hadoop fs -cat/interviewbit/sample
Hello from InterviewBit…
来自 InterviewBit 的问候…
File in HDFS …
HDFS 中的文件…
interviewbit:~$
interviewbit:~$
D) mv : The HDFS mv command moves the files or directories from the source to a destination within HDFS. hadoop fs -mv
D) mv:HDFS 的 mv 命令将文件或目录从源移至 HDFS 内的目标位置。hadoop fs -mv
interviewbit:~$ hadoop fs -ls/
interviewbit:~$ hadoop fs -ls/
Found 2 Items
找到 2 个项目
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Intr1
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Intr1
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Interviewbit
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Interviewbit
interviewbit:~$ hadoop fs -mv/ Intr1/ Interviewbit
interviewbit:~$ hadoop fs -mv/ Intr1/ Interviewbit
interviewbit:~$ hadoop fs -ls/
interviewbit:~$ hadoop fs -ls/
Found 1 Item
发现 1 项
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Interviewbit
drwxv -xv -x - interviewbit supergroup 0 2020-01-29:11:11/ Interviewbit
E) copyToLocal : This command copies the file from the file present in the newDataFlair directory of HDFS to the local file system. hadoop fs -copyToLocal
E) copyToLocal :此命令将文件从 HDFS 的 newDataFlair 目录中存在的文件复制到本地文件系统。hadoop fs -copyToLocal
interviewbit:~$ hadoop fs -copyFromLocal -/test1/interviewbit/CopyTest
interviewbit:~$ hadoop fs -copyFromLocal -/test1/interviewbit/CopyTest
interviewbit:~$
interviewbit:~$
F) get : Copies the file from the Hadoop File System to the Local File System. hadoop fs -get
F) get :将文件从 Hadoop 文件系统复制到本地文件系统。hadoop fs -get
interviewbit:~$ hadoop fs - get/testFile ~/copyFromHadoop
interviewbit:~$ hadoop fs - get/testFile ~/copyFromHadoop
interviewbit:~$
interviewbit:~$
316. What is the meaning of the term Big Data?
术语“大数据”的含义是什么?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, hcl, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: HCL Technologies
- id: 69b37b3658d557c902badf83 | 官方: 否 | 付费: 否
答案:
Big data , as the name suggests, means large volumes of data. The data available to us from multiple online platforms today is complex and huge. For traditional systems to analyze and process, and to interpret something meaningful from the data is quite challenging. Here is where big data comes into the picture. Big data is helpful to solve a large number of business problems right from predictive maintenance, machine learning, customer experience, and so on.
大数据,顾名思义,指的是大量的数据。如今我们可从多个在线平台获得的数据复杂且庞大。传统系统对其进行分析和处理,并从中解读出有意义的信息相当具有挑战性。这正是大数据发挥作用的地方。大数据有助于解决大量业务问题,从预测性维护、机器学习、客户体验到等等。
Following are some of the features of big data: - Velocity
以下是大数据的一些特性:- 速度
- Volume
- Value
- Variety.
- Veracity.
- Validity.
- Volatility.
- Visualization.
317. State difference between List in python and NumPy array.
说明 Python 中的列表和 NumPy 数组之间的区别。
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (标签: interviewbit, hexaware, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Hexaware Technologies
- id: 69b37b3758d557c902badff8 | 官方: 否 | 付费: 否
答案:
NumPy array and List differ in the following ways:
NumPy 数组和列表在以下方面不同:
| Python List Python 列表 | NumPy Array NumPy 数组 |
|---|---|
| Lists are provided by the Python core library. 列表由 Python 核心库提供。 | NumPy is a Python package that facilitates scientific computing. NumPy 是一个促进科学计算的 Python 包。 |
| Python lists are similar to arrays, but they can be resized and contain elements of different types. Python 列表类似于数组,但它们可以调整大小并包含不同类型的元素。 | Contains only elements with similar data types. 仅包含具有相似数据类型的元素。 |
| It's possible to store an integer or afloat in a list, but you can't perform any mathematical operations on it. 可以在列表中存储整数或浮点数,但无法对其进行任何数学运算。 | Mathematical and other operations can be performed on large numbers of data using NumPy arrays. 可以使用 NumPy 数组对大量数据执行数学和其他操作。 |
| Elements are stored at random locations in memory. 元素存储在内存中的随机位置。 | Elements are stored sequentially. 元素按顺序存储。 |
| It consumes more memory than the NumPy array. 它比 NumPy 数组消耗更多内存。 | It consumes less memory than Python List. 它比 Python 列表消耗更少内存。 |
| Modifying a list is easier than modifying an array. Unlike arrays, lists store each element individually, making it easier to add and remove elements. 修改列表比修改数组更容易。与数组不同,列表单独存储每个元素,这使得添加和删除元素更容易。 | Modifying an array is more difficult than modifying a list. 修改数组比修改列表更困难。 |
318. What is a .hiverc file?
什么是 .hiverc 文件?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0d4 | 官方: 否 | 付费: 否
答案:
A ".hiverc" file is a Hive configuration file that specifies default Hive shell settings and options. Hive reads the ".hiverc" file at startup and applies any settings or options specified in the file to the Hive shell.
“.hiverc” 文件是一个 Hive 配置文件,用于指定默认的 Hive shell 设置和选项。Hive 在启动时读取 “.hiverc” 文件,并将文件中指定的任何设置或选项应用到 Hive shell。
The ".hiverc" file is a text file that can be edited with any text editor. It can contain any valid Hive command, such as setting environment variables, specifying default Hive command options, and defining aliases for commonly used commands. The ".hiverc" file is commonly used for the following purposes:
“.hiverc” 文件是一个文本文件,可以使用任何文本编辑器进行编辑。它可以包含任何有效的 Hive 命令,例如设置环境变量、指定默认的 Hive 命令选项,以及为常用命令定义别名。“.hiverc” 文件通常用于以下目的:
Changing the default Hive options: The ".hiverc" file can be used to set default options for commonly used Hive commands, such as the default output format or delimiter for query results. 2. Creating aliases: To save time and improve productivity, we can create aliases for commonly used Hive commands. For example, we could make "SELECT FROM table" an alias of "sel ". 3. Setting environment variables: The ".hiverc" file can be used to set environment variables used by Hive, such as the HADOOP_HOME and HIVE_CON_DIR variables.
- 更改默认的 Hive 选项:“.hiverc” 文件可用于为常用 Hive 命令设置默认选项,例如查询结果的默认输出格式或分隔符。2. 创建别名:为了节省时间并提高生产力,我们可以为常用 Hive 命令创建别名。例如,我们可以将 “SELECT FROM table” 设为 “sel ” 的别名。3. 设置环境变量:“.hiverc” 文件可用于设置 Hive 使用的环境变量,例如 HADOOP_HOME 和 HIVE_CON_DIR 变量。
Overall, the ".hiverc" file is a helpful tool for customizing and configuring the Hive shell to our specific requirements and preferences. When working with Hive, we can streamline our workflow and increase our productivity by defining default settings and options in the ".hiverc" file.
总的来说,“.hiverc” 文件是一个有用的工具,用于根据我们的特定需求和偏好定制和配置 Hive shell。在使用 Hive 时,通过在 “.hiverc” 文件中定义默认设置和选项,我们可以简化工作流程并提高生产力。
319. What does /streamtable(table_name)/ do?
/streamtable(table_name)/ 有什么作用?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0d7 | 官方: 否 | 付费: 否
答案:
/streamtable(table_name)/ is a special comment syntax in Hive that allows users to indicate that a particular table should be treated as a stream table. A stream table is a table that is continuously updated with new data, such as a stream of events or messages. By designating a table as a stream table using this comment syntax, Hive can automatically detect and process new data as it becomes available, rather than requiring users to manually update the table.
/streamtable(table_name)/ 是 Hive 中的一种特殊注释语法,允许用户指示特定表应被视为流表。流表是持续更新新数据的表,例如事件或消息流。通过使用此注释语法将表指定为流表,Hive 可以自动检测和处理新数据,而无需用户手动更新表。
When a table is marked as a stream table using the /streamtable(table_name)/ syntax, Hive sets up a continuous processing pipeline that can handle data in real time. This pipeline typically involves a combination of tools and technologies, such as Flume or Kafka for data ingestion, Spark Streaming or Storm for real-time processing, and Hadoop or HBase for storage and retrieval.
当使用 /streamtable(table_name)/ 语法将表标记为流表时,Hive 会设置一个持续处理管道,能够实时处理数据。此管道通常涉及工具和技术的组合,例如用于数据摄入的 Flume 或 Kafka,用于实时处理的 Spark Streaming 或 Storm,以及用于存储和检索的 Hadoop 或 HBase。
Using a stream table in Hive can be useful for a wide range of use cases, such as monitoring and analyzing log data, processing social media feeds, or handling real-time financial transactions. However, it is important to note that setting up and maintaining a stream table in Hive can be complex and requires careful planning and coordination between different tools and technologies.
在 Hive 中使用流表对于各种用例很有用,例如监控和分析日志数据、处理社交媒体流或处理实时金融交易。然而,需要注意的是,在 Hive 中设置和维护流表可能很复杂,需要仔细规划和协调不同工具和技术。
320. What is UDF in Hive?
Hive 中的 UDF 是什么?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0da | 官方: 否 | 付费: 否
答案:
“UDF” stands for a User-Defined Function, and refers to a custom function written by the user to perform a specific task on the data in Hive. Hive has a number of built-in functions for manipulating and processing data. In some cases, these functions may not be sufficient to meet the needs of a specific use case. In such cases, users can create their own custom Hive functions in Java or any other programming language supported by Hive.
“UDF” 代表用户自定义函数,指由用户编写的自定义函数,用于在 Hive 中对数据执行特定任务。Hive 有许多内置函数用于操作和处理数据。在某些情况下,这些函数可能不足以满足特定用例的需求。在这种情况下,用户可以使用 Java 或 Hive 支持的其他编程语言创建自己的自定义 Hive 函数。
Hive UDFs can be scalar, aggregate, or table functions, and they can take one or more input arguments and return a single value or a collection of values. Some common examples of UDFs in Hive include functions to parse, extract, and transform data, perform custom aggregations, and implement complex business logic.
Hive UDF 可以是标量、聚合或表函数,它们可以接受一个或多个输入参数,并返回单个值或值集合。Hive 中 UDF 的一些常见示例包括解析、提取和转换数据的函数,执行自定义聚合以及实现复杂业务逻辑的函数。
Users must first write the function code and then compile it into a JAR file in order to create a UDF in Hive. They can then use the CREATE FUNCTION statement to register the function in Hive, providing information such as the function's name, input arguments, and return type. The UDF, once registered, can be used in Hive queries just like any other built-in function. UDFs in Hive can be a powerful tool for data processing and analysis because they enable users to implement custom logic and manipulate data in ways that built-in functions alone cannot.
用户必须首先编写函数代码,然后将其编译成 JAR 文件以在 Hive 中创建 UDF。然后,他们可以使用 CREATE FUNCTION 语句在 Hive 中注册该函数,提供诸如函数名称、输入参数和返回类型等信息。一旦注册,UDF 就可以像任何其他内置函数一样在 Hive 查询中使用。Hive 中的 UDF 可以是数据处理和分析的强大工具,因为它们使用户能够实现自定义逻辑,并以仅靠内置函数无法实现的方式操作数据。
It is important to note that UDFs can cause performance issues if they are not written efficiently or used excessively in queries. As a result, it is critical to carefully assess the need for a UDF and optimize its implementation for maximum performance.
重要的是要注意,如果 UDF 编写效率不高或在查询中过度使用,可能会导致性能问题。因此,仔细评估 UDF 的需求并优化其实现以获得最大性能至关重要。
321. What is HCatalog?
HCatalog 是什么?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0dd | 官方: 否 | 付费: 否
答案:
HCatalog is an Apache Hive project component that serves as a storage and table management layer for the Hadoop clusters.
HCatalog 是 Apache Hive 项目的一个组件,作为 Hadoop 集群的存储和表管理层。
HCatalog is a tool for accessing Hive metastore tables from Pig, Spark SQL, and/or custom MapReduce applications. We can create tables and perform other operations with HCatalog's REST interface and command line client. We then write your applications to access the tables using HCatalog libraries. It offers a consolidated schema and metadata model for data in Hadoop. It enables the users to manage and access the data using multiple programming languages and tools.
HCatalog 是一种从 Pig、Spark SQL 和/或自定义 MapReduce 应用程序访问 Hive metastore 表的工具。我们可以使用 HCatalog 的 REST 接口和命令行客户端创建表并执行其他操作。然后编写应用程序以使用 HCatalog 库访问这些表。它为 Hadoop 中的数据提供了统一的模式和数据模型。它使用户能够使用多种编程语言和工具来管理和访问数据。
With the HCatalog, it becomes easier to do the creating, modifying, and deleting the tables in Hadoop as it stores metadata about the tables in one central location.
使用 HCatalog,在 Hadoop 中创建、修改和删除表变得更加容易,因为它将表的元数据存储在一个中心位置。
Some of the important key features of the HCatalog are as follows:
HCatalog 的一些重要关键特性如下:
Table management 2. Schema management 3. Integration with other tools 4. Data access 5. Security 6. Data type mapping
- 表管理 2. 模式管理 3. 与其他工具的集成 4. 数据访问 5. 安全性 6. 数据类型映射
322. Can you specify the name of the table creator in Hive?
你能指定 Hive 中表的创建者名称吗?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0e0 | 官方: 否 | 付费: 否
答案:
Yes, it is possible to specify the name of the table creator in Hive by using the optional "COMMENT" clause when creating the table.
是的,可以通过在创建表时使用可选的 “COMMENT” 子句来指定 Hive 中表的创建者名称。
An example is as follows:
示例如下:
CREATE TABLE my_table (
CREATE TABLE my_table (
col1 string,
col1 string,
col2 int
col2 int
)
COMMENT 'Created by Victor'
COMMENT 'Created by Victor'
ROW FORMAT DELIMITED
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ',';
FIELDS TERMINATED BY ',';
In this example, the table "my_table" is created with two columns, "col1" and "col2". The "COMMENT" clause is used to specify that the table was created by "Victor". The remaining lines of the query specify the format of the data in the table.
在此示例中,创建了名为“my_table”的表,包含两列:“col1”和“col2”。“COMMENT”子句用于指定该表由“Victor”创建。查询的其余行指定了表中数据的格式。
When we run the "DESCRIBE FORMATTED my_table" command, the output will include the table creator name in the "Table Parameters" section:
当我们运行“DESCRIBE FORMATTED my_table”命令时,输出将在“表参数”部分包含表创建者的名称:
Table Parameters:
表参数:
comment Created by Victor
注释 创建者:Victor
…
By specifying the name of the table creator, we can add important metadata to the tables and help to track who created them and when. This can be particularly useful in a collaborative environment where multiple users are working with the same data.
通过指定表创建者的名称,我们可以向表中添加重要的元数据,并有助于追踪谁创建了它们以及何时创建。这在多个用户使用相同数据的协作环境中特别有用。
- Data Science
- All Events
- My Events
323. How is bucketing helpful?
分桶有什么帮助?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0e3 | 官方: 否 | 付费: 否
答案:
Bucketing is a helpful technique in Hive for improving query performance and managing large datasets. Some of the ways in which bucketing can be helpful are:
分桶是Hive中一种有用的技术,用于提高查询性能和管理大型数据集。分桶有助于的一些方式包括:
Reduced I/O: Bucketing can help to reduce the amount of I/O required to read and write data by dividing it into a fixed number of files. This can help in improving query performance by limiting the number of files that need to be scanned. 2. Data Skew: Bucketing can help to distribute data more evenly, which can be particularly useful for tables with a high degree of data skew. By spreading the data more evenly across the buckets, bucketing can help to reduce the impact of hotspots and improve query performance. 3. Join performance: When tables are joined on the bucketing key, Hive can perform a map-side join operation, which can be much faster than a traditional reduce-side join operation. This is because Hive can read data directly from the bucketed files rather than having to shuffle and sort the data across the network. 4. Sampling: Bucketing can also be used to sample data from a table more efficiently. By selecting a subset of the buckets rather than scanning the entire table, Hive can quickly return a representative sample of the data.
- 减少I/O:分桶可以通过将数据分成固定数量的文件来减少读写数据所需的I/O量。这可以通过限制需要扫描的文件数量来帮助提高查询性能。 2. 数据倾斜:分桶可以帮助更均匀地分布数据,这对于数据倾斜程度较高的表特别有用。通过更均匀地分布数据到各桶中,分桶可以帮助减少热点的影响并提高查询性能。 3. 连接性能:当表按分桶键进行连接时,Hive可以执行映射端连接操作,这比传统的归约端连接操作快得多。这是因为Hive可以直接从分桶文件中读取数据,而不必在网络上对数据进行洗牌和排序。 4. 采样:分桶还可以用于更高效地从表中采样数据。通过选择一部分桶而不是扫描整个表,Hive可以快速返回数据的代表性样本。
Overall, bucketing can help to improve query performance, reduce the impact of data skew, and provide more efficient sampling and join operations.
总体而言,分桶有助于提高查询性能、减少数据倾斜的影响,并提供更高效的采样和连接操作。
324. What is Bucketing in Hive?
Hive 中的分桶(Bucketing)是什么?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae0e6 | 官方: 否 | 付费: 否
答案:
Bucketing is a Hive technique for dividing data in a table into more manageable and efficient sets of files. Data is divided into a fixed number of buckets using bucketing based on the value of a hash function applied to a specific column in the table. Each bucket is then stored as a separate file, allowing Hive to read and write data more efficiently based on the partitioning key.
分桶是一种 Hive 技术,用于将表中的数据划分为更易于管理、更高效的文件集合。数据通过基于表中特定列上应用的哈希函数值进行分桶,被划分为固定数量的桶。每个桶随后存储为单独的文件,使 Hive 能够基于分区键更高效地读写数据。
Bucketing, like partitioning, allows Hive to optimize queries by limiting the amount of data that must be scanned. Unlike partitioning, which creates directories based on specific column values, bucketing generates fixed-size files based on a column's hash value.
与分区类似,分桶允许 Hive 通过限制必须扫描的数据量来优化查询。与基于特定列值创建目录的分区不同,分桶根据列的哈希值生成固定大小的文件。
Hive can reduce the amount of I/O required to read and write data and improve query performance by limiting the number of files that must be scanned by bucketing data. Bucketing is especially useful for tables that are very large or have a lot of data skew, as it helps to distribute the data more evenly and reduces the impact of hotspots.
Hive 可以通过分桶数据来限制必须扫描的文件数量,从而减少读写数据所需的 I/O 量并提高查询性能。分桶对于非常大或存在大量数据倾斜的表尤其有用,因为它有助于更均匀地分布数据并减少热点的影响。
Overall, bucketing is an effective tool for managing and optimizing large datasets in Hive, and it can be combined with other Hive features such as partitioning, indexing, and compression to improve performance and efficiency even further.
总体而言,分桶是管理和优化 Hive 中大型数据集的有效工具,它可以与其他 Hive 功能(如分区、索引和压缩)结合使用,以进一步提高性能和效率。
325. What is the Hive ObjectInspector function?
Hive ObjectInspector 函数是什么?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b3958d557c902bae0e9 | 官方: 否 | 付费: 否
答案:
The Hive ObjectInspector function is an important feature of the Apache Hive data warehouse software used to examine and modify the internal data structures of tables. It is a vital element in the process of executing Hive queries, as it transforms the raw data saved in Hive tables into a format that Hive operators can handle. The ObjectInspector function is responsible for creating a standard interface for Hive operators to access table data, and it supports multiple data types, including user-defined, complex, and primitive types. Hive operators extensively use this function in HiveQL queries, and it is a valuable tool for manipulating data within Hive.
Hive ObjectInspector 函数是 Apache Hive 数据仓库软件的一个重要特性,用于检查和修改表的内部数据结构。它是执行 Hive 查询过程中的关键元素,因为它将存储在 Hive 表中的原始数据转换为 Hive 运算符可以处理的格式。ObjectInspector 函数负责为 Hive 运算符创建访问表数据的标准接口,并支持多种数据类型,包括用户自定义类型、复杂类型和原始类型。Hive 运算符在 HiveQL 查询中广泛使用此函数,它是操作 Hive 内数据的有价值工具。
326. How can you view the indexes of a Hive table?
如何查看 Hive 表的索引?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae11e | 官方: 否 | 付费: 否
答案:
To view the indexes of a Hive table, you can use the following command:
要查看 Hive 表的索引,可以使用以下命令:
SHOW INDEXES ON table_name;
SHOW INDEXES ON table_name;
Replace "table_name" with the name of the table whose indexes you want to view. This command will display a list of all the indexes created on the specified table along with their associated metadata, such as the index name, indexed column(s), and index table. If no indexes exist on the table, the command will return an empty result set.
将 "table_name" 替换为您想查看索引的表的名称。此命令将显示在指定表上创建的所有索引列表及其相关元数据,例如索引名称、索引列和索引表。如果表上没有索引,命令将返回空结果集。
327. Are multi-line comments supported by Hive?
Hive 支持多行注释吗?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae124 | 官方: 否 | 付费: 否
答案:
Yes, Hive supports multi-line comments using the standard SQL comment syntax of "/ ... /". This allows us to add comments that span multiple lines of code and can be used to provide context or explanations for complex queries.
是的,Hive 使用标准 SQL 注释语法 "/ ... /" 支持多行注释。这允许我们添加跨越多行代码的注释,可用于为复杂查询提供上下文或解释。
For example, to add a multi-line comment to a Hive query, we can use the following syntax:
例如,要向 Hive 查询添加多行注释,可以使用以下语法:
/* This is a multi-line comment
/* 这是一个多行注释
that spans multiple lines
跨越多行
and provides context for the query */
并为查询提供上下文 */
SELECT col1, col2 FROM my_table;
SELECT col1, col2 FROM my_table;
This will execute the Hive query and ignore the text within the comment, allowing us to include detailed comments without affecting the functionality of the query.
这将执行 Hive 查询并忽略注释中的文本,从而允许我们包含详细注释而不影响查询的功能。
It's important to note that comments should be used sparingly and should be relevant and helpful to other users who may need to review or modify our code. By using clear and concise comments, we can help to improve the readability and maintainability of our Hive code.
重要的是要注意,注释应适度使用,并且应相关且有助于其他可能需要审查或修改我们代码的用户。通过使用清晰简洁的注释,我们可以帮助提高 Hive 代码的可读性和可维护性。
328. What is the default Apache Hive metastore database?
Apache Hive 默认的元存储数据库是什么?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae128 | 官方: 否 | 付费: 否
答案:
"Derby" is the name of the default Apache Hive Metastore database. It is a Hive-included embedded database that is used by default to store metadata for Hive tables. The Derby database is a lightweight, single-user database that is appropriate for small-scale deployments and testing but not for production use or larger deployments.
“Derby”是默认 Apache Hive Metastore 数据库的名称。它是一个 Hive 自带的嵌入式数据库,默认用于存储 Hive 表的元数据。Derby 数据库是一个轻量级、单用户的数据库,适合小规模部署和测试,但不适合生产环境或更大规模的部署。
It should be noted that the Derby database is not scalable and may experience performance limitations in larger deployments. For larger-scale deployments, it is therefore recommended to use an external Metastore database. MySQL, PostgreSQL, Oracle, and Microsoft SQL Server are among the external Metastore databases supported by Hive.
需要注意的是,Derby 数据库不可扩展,在更大规模的部署中可能会遇到性能限制。因此,对于大规模部署,建议使用外部 Metastore 数据库。MySQL、PostgreSQL、Oracle 和 Microsoft SQL Server 是 Hive 支持的外部 Metastore 数据库中的一部分。
To use an external Metastore database, we need to configure Hive to use the external database and create the necessary tables in the database using the Hive schema tool.
要使用外部 Metastore 数据库,我们需要配置 Hive 以使用外部数据库,并使用 Hive 模式工具在数据库中创建必要的表。
329. What are the different types of tables available in Hive?
Hive 中有哪些不同类型的表?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae12b | 官方: 否 | 付费: 否
答案:
Hive supports several types of tables for storing and managing data:
Hive 支持多种类型的表来存储和管理数据:
Managed Tables: Hive manages these tables, and the data is stored in the Hive warehouse directory. Any data loaded into a managed table is managed by Hive automatically and can be queried directly. 2. External Tables: External tables are created with data from sources other than the Hive warehouse directory. The underlying data is not deleted when an external table is dropped. External tables are useful when data is generated by external systems or when other applications need to access it. 3. Partitioned Tables: These tables are divided into sections by one or more columns. Partitioning aids query performance by reducing the amount of data that must be scanned. 4. Bucketed Tables: Bucketing is a query performance improvement technique that divides large tables into smaller, more manageable pieces. Similar to partitioning, bucketing divides data into smaller, more evenly-sized groups. 5. Virtual Tables: Hive supports the creation of virtual tables with the HiveQL query language. Virtual tables do not store data on disc, but rather provide a virtual representation of one or more existing tables. 6. Temporary tables: they are created and managed within the context of a Hive session. When the session ends, these tables are automatically deleted.
- 管理表:Hive 管理这些表,数据存储在 Hive 仓库目录中。加载到管理表中的任何数据都由 Hive 自动管理,并且可以直接查询。 2. 外部表:外部表是使用来自 Hive 仓库目录以外的数据创建的。删除外部表时,底层数据不会被删除。当数据由外部系统生成或其他应用程序需要访问时,外部表非常有用。 3. 分区表:这些表按一个或多个列划分为多个部分。分区通过减少必须扫描的数据量来提高查询性能。 4. 分桶表:分桶是一种查询性能提升技术,将大表划分为更小、更易于管理的部分。与分区类似,分桶将数据划分为更小、更均匀大小的组。 5. 虚拟表:Hive 支持使用 HiveQL 查询语言创建虚拟表。虚拟表不在磁盘上存储数据,而是提供对一个或多个现有表的虚拟表示。 6. 临时表:它们是在 Hive 会话上下文中创建和管理的。当会话结束时,这些表会自动删除。
Each type of table in Hive has its own advantages and use cases, and selecting the appropriate type of table is dependent on the application's specific requirements.
Hive 中每种类型的表都有其自身的优势和用例,选择适当的表类型取决于应用程序的具体需求。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
330. What is the difference between managed and external tables?
管理表和外部表有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae12e | 官方: 否 | 付费: 否
答案:
The main distinction between external and managed tables in Hive is the location of the table data.
Hive 中外部表和管理表的主要区别在于表数据的位置。
| Sr. No. 序号 | Managed Tables 管理表 | External Tables 外部表 |
|---|---|---|
| 1. | Managed tables are also known as internal tables, and Hive manages the data for these tables within the Hive warehouse directory. Hive creates a directory in the warehouse directory to store the table data when a managed table is created. 管理表也称为内部表,Hive 在 Hive 仓库目录中管理这些表的数据。创建管理表时,Hive 会在仓库目录中创建一个目录来存储表数据。 | External tables do not use the Hive warehouse directory to store data. Instead, they refer to data stored elsewhere, such as HDFS, Amazon S3, or another external system. 外部表不使用 Hive 仓库目录来存储数据。相反,它们引用存储在其他位置的数据,例如 HDFS、Amazon S3 或其他外部系统。 |
| 2. | Hive typically creates and manages the data for a managed table, for example, it does all operations on the table, such as inserting or deleting data. Hive 通常创建并管理管理表的数据,例如,它对表执行所有操作,如插入或删除数据。 | Hive only creates a metadata definition for an external table when it is created, such as the schema and location of the data. Hive does not manage the underlying data, which can be created and managed by any external system or process. Hive 在创建外部表时仅创建元数据定义,例如数据的模式和位置。Hive 不管理底层数据,这些数据可以由任何外部系统或进程创建和管理。 |
| 3. | Managed tables are easier to manage within Hive and offer greater data control. 管理表在 Hive 中更容易管理,并提供更好的数据控制。 | The data can be accessed by multiple systems, allowing for greater flexibility in the data processing. Such tables are also useful when data is generated by external systems or when other applications need to access it. 数据可以被多个系统访问,从而在数据处理中提供更大的灵活性。当数据由外部系统生成或其他应用程序需要访问时,此类表也很有用。 |
To summarize, external tables refer to data stored outside of the Hive warehouse directory, whereas managed tables manage their data within the Hive warehouse directory.
总之,外部表引用存储在 Hive 仓库目录之外的数据,而管理表在 Hive 仓库目录内管理其数据。
331. Where does the data of a Hive table get stored?
Hive 表的数据存储在哪里?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae131 | 官方: 否 | 付费: 否
答案:
The location of the data for a Hive table is determined by whether the table is managed or external.
Hive 表数据的存储位置取决于该表是管理表还是外部表。
The data for managed tables are stored in the Hive warehouse directory, which is usually located in HDFS (Hadoop Distributed File System). Hive creates a subdirectory within the warehouse directory to store data when a managed table is created. 2. The data for external tables are typically stored outside of the Hive warehouse directory, in an external storage system such as HDFS, Amazon S3, or another external system.
- 管理表的数据存储在 Hive 仓库目录中,该目录通常位于 HDFS(Hadoop 分布式文件系统)中。当创建管理表时,Hive 会在仓库目录内创建一个子目录来存储数据。2. 外部表的数据通常存储在 Hive 仓库目录之外,例如 HDFS、Amazon S3 或其他外部存储系统中。
Hive only creates a metadata definition for an external table when it is created, such as the schema and location of the data. Hive does not manage the underlying data, which can be created and managed by any external system or process.
Hive 在创建外部表时仅创建元数据定义,例如模式和数据的存储位置。Hive 不管理底层数据,这些数据可以由任何外部系统或进程创建和管理。
The data for a Hive table is distributed across the nodes of the Hadoop cluster in both cases, allowing for parallel processing and scalability.
在两种情况下,Hive 表的数据都分布在 Hadoop 集群的各个节点上,从而实现并行处理和高可扩展性。
332. Can Hive be used in OLTP systems?
Hive 可以用于 OLTP 系统吗?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae13c | 官方: 否 | 付费: 否
答案:
Hive is primarily intended for use in OLAP (Online Analytical Processing) systems, which process large amounts of data for complex queries and analysis. Hive is designed for batch processing of large datasets and is not suitable for OLTP (Online Transaction Processing) systems that require quick and efficient processing of individual transactions.
Hive 主要用于 OLAP(在线分析处理)系统,该系统处理大量数据以进行复杂查询和分析。Hive 专为大规模数据集的批处理而设计,不适合需要快速高效处理单个事务的 OLTP(在线事务处理)系统。
OLTP systems are typically used for transactional processing, such as online order processing or real-time inventory management. These systems necessitate high concurrency and low latency, neither of which Hive excels at. Hive is intended for batch processing of large datasets, so it may not be appropriate for OLTP systems. Hive can be used in tandem with other systems to support OLTP use cases. Hive, for example, can be used to transform and aggregate data for OLTP systems as part of a data processing pipeline. Hive can also be used to generate reports and provide insights into OLTP data, which can aid in decision-making processes.
OLTP 系统通常用于事务处理,例如在线订单处理或实时库存管理。这些系统需要高并发和低延迟,而 Hive 在这两方面都不够出色。Hive 专为大数据集的批处理而设计,因此可能不适合 OLTP 系统。Hive 可以与其他系统结合使用以支持 OLTP 应用场景。例如,Hive 可以作为数据处理管道的一部分,对 OLTP 系统的数据进行转换和聚合。Hive 还可以用于生成报告并为 OLTP 数据提供洞察,这有助于决策过程。
While Hive is not well-suited for OLTP systems, it can be used in tandem with other systems to support OLTP use cases or provide insights into OLTP data.
虽然 Hive 不太适合 OLTP 系统,但它可以与其他系统结合使用以支持 OLTP 应用场景,或为 OLTP 数据提供洞察。
333. Can a table name be changed in Hive?
在 Hive 中可以更改表名吗?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae13f | 官方: 否 | 付费: 否
答案:
Yes, it is possible to rename a table in Hive using the RENAME command.
是的,可以使用 RENAME 命令在 Hive 中重命名表。
To rename a table, we can use the following syntax:
要重命名表,我们可以使用以下语法:
ALTER TABLE old_table_name RENAME TO new_table_name;
ALTER TABLE old_table_name RENAME TO new_table_name;
For example, if we have a table named "employees" and we want to rename it to "staff", we can run the following command:
例如,如果我们有一个名为“employees”的表,想要将其重命名为“staff”,我们可以运行以下命令:
ALTER TABLE employees RENAME TO staff;
ALTER TABLE employees RENAME TO staff;
Note that when we rename a table in Hive, the table metadata is updated to reflect the new table name, but the underlying data is not moved or changed. The table's location in HDFS remains the same, and any data stored in the table is still accessible using the new table name.
请注意,在 Hive 中重命名表时,表元数据会更新以反映新表名,但底层数据不会被移动或更改。表在 HDFS 中的位置保持不变,表中的任何数据仍可使用新表名进行访问。
It is important to update any references to the table in our code or queries after renaming the table to ensure that our code continues to work correctly.
重命名表后,更新我们代码或查询中对该表的任何引用非常重要,以确保我们的代码继续正常工作。
334. Can the default location of a managed table be changed in Hive?
在Hive中,可以更改托管表的默认位置吗?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae142 | 官方: 否 | 付费: 否
答案:
Yes, it is possible to change the default location of a managed table in Hive by updating the value of the hive.metastore.warehouse.dir property in the Hive configuration file.
是的,可以通过更新Hive配置文件中hive.metastore.warehouse.dir属性的值来更改Hive中托管表的默认位置。
By default, the location of the Hive warehouse directory is set to "/user/hive/warehouse" in HDFS, but we can change this location to a different directory or HDFS path by following these steps:
默认情况下,Hive仓库目录的位置在HDFS中设置为“/user/hive/warehouse”,但我们可以按照以下步骤将此位置更改为不同的目录或HDFS路径:
Open the Hive configuration file, which is typically located at /etc/hive/conf/hive-site.xml on the Hadoop cluster. 2. Find the hive.metastore.warehouse.dir property and update its value to the new directory or HDFS path where we want to store the managed tables. For example, we can set the value to /user/myhivedata/warehouse. 3. Save the changes to the configuration file and restart Hive services to apply the changes.
- 打开Hive配置文件,该文件通常位于Hadoop集群上的/etc/hive/conf/hive-site.xml。 2. 找到hive.metastore.warehouse.dir属性,并将其值更新为我们想要存储托管表的新目录或HDFS路径。例如,我们可以将该值设置为/user/myhivedata/warehouse。 3. 保存对配置文件的更改,并重启Hive服务以应用这些更改。
After we update the value of hive.metastore.warehouse.dir, any new managed tables created in Hive will be stored in the new directory or HDFS path. Existing managed tables will continue to use their original location, so we will need to move the data for these tables to the new location manually if desired.
更新hive.metastore.warehouse.dir的值后,在Hive中创建的任何新托管表将存储在新的目录或HDFS路径中。现有的托管表将继续使用其原始位置,因此如果需要,我们将需要手动将这些表的数据移动到新位置。
335. What is a Hive Metastore?
什么是Hive Metastore?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae145 | 官方: 否 | 付费: 否
答案:
In Apache Hive, the Hive Metastore is a central data repository that contains the metadata of Hive tables, which includes their structure, partitioning, and storage location. The Hive Metastore is used by Hive clients and servers to retrieve and update metadata information about tables. It provides a unified view of data stored in various formats like HDFS, Apache HBase, and Amazon S3.
在Apache Hive中,Hive Metastore是一个中央数据存储库,包含Hive表的元数据,包括其结构、分区和存储位置。Hive客户端和服务器使用Hive Metastore来检索和更新关于表的元数据信息。它为存储在HDFS、Apache HBase和Amazon S3等各种格式中的数据提供了统一视图。
The Hive Metastore is designed to separate metadata management from data processing, making it possible to manage metadata more efficiently and flexibly across multiple Hive instances. It can be configured as a local or remote database, depending on the deployment architecture and scalability requirements of the Hive installation. By default, the Hive Metastore uses an embedded Derby database as its local megastore. However, other databases like MySQL, PostgreSQL, and Oracle can also be used as remote metastores.
Hive Metastore旨在将元数据管理与数据处理分离,从而可以在多个Hive实例之间更高效、更灵活地管理元数据。根据Hive部署的架构和可扩展性要求,它可以配置为本地或远程数据库。默认情况下,Hive Metastore使用嵌入式Derby数据库作为其本地元存储。但是,其他数据库如MySQL、PostgreSQL和Oracle也可以用作远程元存储。
336. What are the types of Metastore?
Metastore有哪些类型?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae14b | 官方: 否 | 付费: 否
答案:
Hive supports two types of Metastore:
Hive支持两种类型的Metastore:
Embedded Metastore: The Embedded Metastore is the default Metastore that is provided with Hive. It is implemented as an embedded Derby database that is included with Hive and is used to store metadata for Hive tables. The Embedded Metastore is suitable for small-scale deployments where performance is not critical, but it is not recommended for larger or more complex metadata deployments. 2. External Metastore: An External Metastore is a standalone Metastore that is implemented as a separate database outside of Hive. It can be used to store metadata for multiple Hive instances, which makes it ideal for larger or more complex deployments. The External Metastore supports a variety of databases, including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.
- 嵌入式Metastore:嵌入式Metastore是Hive附带的默认Metastore。它实现为Hive附带的嵌入式Derby数据库,用于存储Hive表的元数据。嵌入式Metastore适用于性能不关键的小规模部署,但不建议用于更大或更复杂的元数据部署。 2. 外部Metastore:外部Metastore是独立于Hive实现的独立Metastore,作为Hive之外的单独数据库。它可以用于存储多个Hive实例的元数据,这使其成为更大或更复杂部署的理想选择。外部Metastore支持多种数据库,包括MySQL、PostgreSQL、Oracle和Microsoft SQL Server。
Both types of Metastore provide similar functionality, including the ability to store metadata for Hive tables, databases, and columns, as well as support for schema evolution, metadata management, and data portability. The choice of which type of Metastore to use depends on the specific requirements of our deployment, including the size and complexity of data, performance needs, and existing database infrastructure.
两种类型的Metastore都提供类似的功能,包括存储Hive表、数据库和列的元数据的能力,以及支持模式演进、元数据管理和数据可移植性。选择使用哪种类型的Metastore取决于我们部署的具体需求,包括数据的大小和复杂性、性能需求以及现有的数据库基础设施。
337. What is the difference between Local and Remote Metastore?
本地和远程Metastore有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae152 | 官方: 否 | 付费: 否
答案:
The distinction between local and remote metastore in Hive is primarily related to their location and method of access. A local metastore is located on the same machine as the Hive server and contains metadata for tables and partitions. Local metastores are generally used in single-node Hive installations where the Hadoop Distributed File System (HDFS) and Hive server are on the same machine.
Hive中本地和远程元存储的区别主要与其位置和访问方法有关。本地元存储位于与Hive服务器相同的机器上,并包含表和分区的元数据。本地元存储通常用于单节点Hive安装,其中Hadoop分布式文件系统(HDFS)和Hive服务器位于同一台机器上。
On the other hand, a remote metastore is located on a separate machine and is accessed over a network connection, usually via a JDBC or ODBC driver. Remote metastores are used in distributed Hive installations with multiple Hive servers and/or HDFS clusters deployed across different machines. In these scenarios, a single metastore can manage metadata for all the tables and partitions in the various Hive installations.
另一方面,远程元存储位于单独的机器上,通过网络连接访问,通常通过JDBC或ODBC驱动程序。远程元存储用于分布式Hive安装,其中多个Hive服务器和/或HDFS集群部署在不同的机器上。在这些场景中,单个元存储可以管理各种Hive安装中所有表和分区的元数据。
Choosing between a local or remote metastore depends on the deployment architecture and scalability requirements. Local metastores are simpler to set up and adequate for small-scale installations. In contrast, remote metastores provide greater scalability and flexibility for larger, distributed deployments.
选择本地或远程元存储取决于部署架构和可扩展性要求。本地元存储设置更简单,适合小规模安装。相比之下,远程元存储为更大规模、分布式的部署提供了更好的可扩展性和灵活性。
338. What applications are supported by Hive?
Hive 支持哪些应用程序?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae157 | 官方: 否 | 付费: 否
答案:
Apache Hive is an open-source data warehouse framework for querying and analyzing large datasets stored in distributed storage systems such as Hadoop Distributed File System (HDFS), Amazon S3, and others. There are various applications supported by Hive since it is a warehouse and offers various applications in data querying, analysis, and summarization. Some of them are as follows:
Apache Hive 是一个开源数据仓库框架,用于查询和分析存储在分布式存储系统(如 Hadoop 分布式文件系统 (HDFS)、Amazon S3 等)中的大型数据集。由于 Hive 是一个仓库,并在数据查询、分析和汇总方面提供各种应用,因此它支持多种应用。其中一些如下:
Data Warehousing: Hive is frequently used for data warehousing applications and enables users to handle enormous datasets and carry out intricate searches on structured data kept in Hadoop. 2. Business intelligence: Hive gives business intelligence tools an interface and enables the users to see and examine Hadoop data in real time. 3. Data Analysis: Hive supports various forms of data analysis, such as machine learning, statistical analysis, and data mining. 4. Interfacing: Hive interfaces with numerous tools and data sources and enables users to quickly access and analyze data from various sources. 5. Data Processing: Data processing is made possible by Hive, which offers a framework for ETL (Extract, Transform, Load) operations, data standardization, and data cleansing. 6. Data exploration: Users can examine data stored in Hadoop using Hive, which enables them to spot patterns and trends in huge datasets. 7. Data Transformation: Data mapping, aggregation, and filtering are all supported by Hive.
- 数据仓库:Hive 常用于数据仓库应用,使用户能够处理海量数据集,并对存储在 Hadoop 中的结构化数据执行复杂搜索。 2. 商业智能:Hive 为商业智能工具提供接口,使用户能够实时查看和分析 Hadoop 数据。 3. 数据分析:Hive 支持各种形式的数据分析,如机器学习、统计分析和数据挖掘。 4. 接口连接:Hive 与众多工具和数据源进行接口连接,使用户能够快速访问和分析来自不同来源的数据。 5. 数据处理:Hive 使数据处理成为可能,它为 ETL(提取、转换、加载)操作、数据标准化和数据清洗提供了框架。 6. 数据探索:用户可以使用 Hive 检查存储在 Hadoop 中的数据,这使他们能够在大型数据集中发现模式和趋势。 7. 数据转换:Hive 支持数据映射、聚合和过滤。
339. Can multiple users use one metastore?
多个用户能否使用同一个元存储?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae15a | 官方: 否 | 付费: 否
答案:
Yes, multiple users can use a single Metastore in Hive, that is, it allows multiple Hive servers or clients to share the same metadata, which can simplify management and improve consistency across the deployment.
是的,多个用户可以在 Hive 中使用单个 Metastore,也就是说,它允许多个 Hive 服务器或客户端共享相同的元数据,这可以简化管理并提高部署中的一致性。
When multiple users are accessing the same Metastore, it is important to ensure that the Metastore is configured to support concurrency and that appropriate access controls are in place to prevent conflicts and unauthorized access. Hive provides several configuration options for controlling concurrent access to the Metastore, including locking and transaction isolation levels. These settings can be adjusted based on the specific requirements of the deployment.
当多个用户访问同一个 Metastore 时,确保 Metastore 配置为支持并发,并采取适当的访问控制以防止冲突和未授权访问是非常重要的。Hive 提供了多个配置选项来控制对 Metastore 的并发访问,包括锁和事务隔离级别。这些设置可以根据部署的具体要求进行调整。
Additionally, it is recommended to use an external Metastore database for larger-scale deployments with multiple users, as this can improve scalability and provide better performance than the default embedded Metastore database. External Metastore databases can support multiple concurrent connections and can be configured with appropriate security and access controls to ensure data integrity and prevent unauthorized access.
此外,对于有多用户的大规模部署,建议使用外部 Metastore 数据库,因为这可以提高可扩展性,并提供比默认嵌入式 Metastore 数据库更好的性能。外部 Metastore 数据库可以支持多个并发连接,并可以配置适当的安全和访问控制以确保数据完整性并防止未授权访问。
340. What are the three different modes in which Hive can be operated?
Hive 可以操作的三种不同模式是什么?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae15d | 官方: 否 | 付费: 否
答案:
Hive can be used in three different modes: - Local or Standalone Mode: Hive runs as a single process on a single machine in Local Mode. This mode is appropriate for testing and development because it allows experimenting with Hive without the need for a cluster or additional resources.
Hive 可以在三种不同模式下使用: - 本地或独立模式:在本地模式下,Hive 在单台机器上作为单个进程运行。此模式适合测试和开发,因为它允许在不需集群或额外资源的情况下进行 Hive 实验。
- Pseudo-distributed Mode: In pseudo-distributed mode, Hive is run on a single machine, but the machine is configured to simulate a distributed environment by running multiple processes, such as NameNode, DataNode, ResourceManager, and NodeManager, on the same machine. This configuration allows Hive to take advantage of the parallel processing capabilities of Hadoop, making it useful for testing and development.
Fully-distributed Mode: Distributed mode refers to the mode in which Hive is run on a cluster of machines. The data is stored in a distributed file system like HDFS, and the processing is done across multiple nodes in the cluster. Hive queries are translated into jobs that can be executed in parallel across the cluster, allowing for high performance and scalability. The three modes MapReduce, Tez, and Spark all fall under this type of distributed mode.
MapReduce Mode: In MapReduce Mode, Hive runs on a Hadoop cluster and processes queries using the Hadoop MapReduce framework. This mode is appropriate for production deployments and large-scale data processing because it allows Hive to leverage Hadoop's distributed processing capabilities.MapReduce 模式:在 MapReduce 模式下,Hive 在 Hadoop 集群上运行,并使用 Hadoop MapReduce 框架处理查询。此模式适合生产部署和大规模数据处理,因为它允许 Hive 利用 Hadoop 的分布式处理能力。
Tez Mode: In Tez mode, Hive runs on a Hadoop cluster using the Tez execution engine, which is designed to provide high-performance data processing. Hive translates the queries into Tez tasks, which are then executed on the cluster. This mode is suitable for processing large datasets that require high-performance data processing and can benefit from the optimized execution plan provided by Tez.
Tez 模式:在 Tez 模式下,Hive 使用 Tez 执行引擎在 Hadoop 集群上运行,该引擎旨在提供高性能数据处理。Hive 将查询转换为 Tez 任务,然后在集群上执行这些任务。此模式适合处理需要高性能数据处理的大型数据集,并可从 Tez 提供的优化执行计划中受益。
Spark mode: Hive runs on a Spark cluster and processes queries using the Spark execution engine in Spark Mode. This mode is appropriate for deployments that use Spark as their primary processing framework because it enables Hive to benefit from Spark's advanced processing capabilities and performance optimizations.
Spark 模式:在 Spark 模式下,Hive 使用 Spark 执行引擎在 Spark 集群上运行并处理查询。此模式适合使用 Spark 作为主要处理框架的部署,因为它使 Hive 能够受益于 Spark 的高级处理能力和性能优化。
341. Is there a data type in Hive to store date information?
Hive 中是否有用于存储日期信息的数据类型?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae160 | 官方: 否 | 付费: 否
答案:
Yes, Hive has a data type called "DATE" to store date information and also has one for Timestamps. The DATE data type represents a date value in the format of "YYYY-MM-DD". The value of date can range from January 1, 0001 to December 31, 9999.
是的,Hive 有一种名为“DATE”的数据类型来存储日期信息,并且也有一种用于时间戳的类型。DATE 数据类型以“YYYY-MM-DD”格式表示日期值。日期的值范围可以从公元 0001 年 1 月 1 日到 9999 年 12 月 31 日。
In Hive, the DATE data type is supported for both Managed and External tables. It can be used in table schemas, as well as in SQL statements to query or manipulate data.
在 Hive 中,DATE 数据类型同时支持托管表和外部表。它可以在表模式中使用,也可以在 SQL 语句中用于查询或操作数据。
Some of the functions that can be used with the DATE data type in Hive include: - TO_DATE(): converts a string value to a DATE data type.
在 Hive 中,可用于 DATE 数据类型的一些函数包括:- TO_DATE():将字符串值转换为 DATE 数据类型。
- YEAR(): extracts the year value from a DATE data type.
- MONTH(): extracts the month value from a DATE data type.
- DAY(): extracts the day value from a DATE data type.
- ADD_MONTHS(): adds a specified number of months to a DATE data type.
DATEDIFF(): calculates the number of days between two DATE data types.
In Hive, using the DATE data type can be useful for data analysis and reporting as it allows performing date-based queries and aggregations on our data.在 Hive 中,使用 DATE 数据类型对数据分析和报告非常有用,因为它允许对数据进行基于日期查询和聚合。
342. Why is partitioning used in Hive?
为什么在 Hive 中使用分区?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae163 | 官方: 否 | 付费: 否
答案:
In Hive, partitioning is utilized to enhance query performance and manage huge data sets effectively. Partitioning involves dividing data into smaller, more manageable parts based on specified column(s), allowing users to analyze specific subsets of data easily without scanning the entire table. This speeds up query performance and reduces the amount of data processed during queries, thus reducing resource consumption and improving overall system performance. Moreover, partitioning can be utilized to optimize data storage by storing data in a more efficient way based on the partitioning column(s).
在 Hive 中,分区用于提升查询性能并有效管理大型数据集。分区涉及根据指定的列将数据划分为更小、更易管理的部分,使用户能够轻松分析数据的特定子集,而无需扫描整个表。这加快了查询性能并减少了查询期间处理的数据量,从而降低资源消耗并提高整体系统性能。此外,分区可以通过基于分区列以更高效的方式存储数据来优化存储。
343. What is dynamic partitioning and when is it used in Hive?
什么是动态分区,在 Hive 中何时使用?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae166 | 官方: 否 | 付费: 否
答案:
Dynamic partitioning is a Hive feature that allows us to automatically create partitions at runtime based on the values in a column. Hive can use dynamic partitioning to create new partitions as data is loaded into a table. This can help to streamline the data loading process and boost performance.
动态分区是 Hive 的一个功能,允许我们在运行时根据某列的值自动创建分区。Hive 可以使用动态分区在数据加载到表时创建新分区。这有助于简化数据加载过程并提升性能。
When we have a large amount of data that needs to be partitioned based on one or more columns, but we don't want to manually create and manage the partitions, we use dynamic partitioning. This is especially useful when dealing with unstructured data, where determining the appropriate partitioning scheme ahead of time may be difficult or time-consuming.
当我们有大量数据需要根据一个或多个列进行分区,但不想手动创建和管理分区时,我们使用动态分区。这在处理非结构化数据时特别有用,因为预先确定合适的分区方案可能困难或耗时。
To use dynamic partitioning in Hive, we must first enable it by setting the following properties in the Hive configuration:
要在 Hive 中使用动态分区,我们首先必须通过在 Hive 配置中设置以下属性来启用它:
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.exec.dynamic.partition.mode=nonstrict;
Once dynamic partitioning is enabled, we can use the INSERT OVERWRITE statement with the dynamic partitioning option to load data into a partitioned table. For example, to partition a table by date, we might use the following statement:
一旦启用了动态分区,我们可以使用带动态分区选项的 INSERT OVERWRITE 语句将数据加载到分区表中。例如,要按日期对表进行分区,我们可能会使用以下语句:
INSERT OVERWRITE TABLE mytable PARTITION (date)
INSERT OVERWRITE TABLE mytable PARTITION (date)
SELECT col1, col2, date FROM mydata;
SELECT col1, col2, date FROM mydata;
In this example, Hive will automatically create partitions based on the values in the "date" column of the "mydata" table, and load the data into the appropriate partition in the "mytable" table. By using dynamic partitioning in this way, we can simplify the data loading process and improve query performance by partitioning the data more efficiently.
在这个例子中,Hive 将根据 "mydata" 表中 "date" 列的值自动创建分区,并将数据加载到 "mytable" 表中的相应分区。通过这样使用动态分区,我们可以简化数据加载过程,并通过更高效地分区数据来提高查询性能。
344. What are the Hive collection data types?
Hive 的集合数据类型有哪些?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae169 | 官方: 否 | 付费: 否
答案:
Hive offers support for various collection data types including: - Array: an ordered list of same-type elements.
Hive 支持各种集合数据类型,包括:- Array:相同类型元素的有序列表。
- Map: a set of key-value pairs with different data types for keys and values.
- Struct: a group of fields with their own data types
Union: a collection of data types where one data type is used at a time.
Using these collection data types in Hive, users can perform more sophisticated data modelling and analysis, especially with semi-structured or nested data. These types can be used in HiveQL queries and the elements inside them can be modified and accessed using built-in functions.在Hive中使用这些集合数据类型,用户可以执行更复杂的数据建模和分析,尤其是在处理半结构化或嵌套数据时。这些类型可用于HiveQL查询,并且可以通过内置函数修改和访问其中的元素。
345. Is it possible to run UNIX shell commands in Hive?
是否可以在Hive中运行UNIX shell命令?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae16c | 官方: 否 | 付费: 否
答案:
Yes, it is possible to run UNIX shell commands in Hive using the "!sh" or "!bash" commands. These commands allow users to execute any UNIX shell command within the Hive shell.
是的,可以在Hive中使用“!sh”或“!bash”命令运行UNIX shell命令。这些命令允许用户在Hive shell中执行任何UNIX shell命令。
For example, to list the files in a directory using the "ls" command, we can use the following syntax:
例如,要使用“ls”命令列出目录中的文件,我们可以使用以下语法:
!sh ls /path/to/directory
!sh ls /path/to/directory
Similarly, the user can use the "!sh" command to execute any other UNIX shell command, such as "grep", "awk", or "sed". This can be useful for performing operations on data outside of Hive, such as filtering or transforming data using standard UNIX tools.
同样,用户可以使用“!sh”命令执行任何其他UNIX shell命令,如“grep”、“awk”或“sed”。这对于在Hive外部对数据执行操作可能很有用,例如使用标准UNIX工具过滤或转换数据。
It's important to note that running shell commands within Hive can be risky, as it can potentially allow users to execute arbitrary commands on the host system. Therefore, it's generally recommended to only allow trusted users to execute shell commands in Hive and to carefully review and sanitize any commands before executing them.
需要注意的是,在Hive中运行shell命令可能存在风险,因为它可能允许用户在主机系统上执行任意命令。因此,通常建议只允许受信任的用户在Hive中执行shell命令,并在执行前仔细审查和清理任何命令。
346. Is it possible to execute Hive queries from a script file?
是否可以从脚本文件执行Hive查询?
- 知识点: 数据工程与数据科学/AI (主题: hive, data-engineering;标签: interviewbit, hive, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b3958d557c902bae172 | 官方: 否 | 付费: 否
答案:
Yes, it is possible to execute Hive queries from a script file. It supports several execution modes, including an interactive shell mode and a batch mode, which allows us to run Hive queries from a script file.
是的,可以从脚本文件执行Hive查询。它支持多种执行模式,包括交互式shell模式和批处理模式,这允许我们从脚本文件运行Hive查询。
To execute Hive queries from a script file, the user can create a text file containing the Hive queries one wants to execute, and then pass this file to the "hive" command using the "-f" option. For example:
要从脚本文件执行Hive查询,用户可以创建一个包含要执行的Hive查询的文本文件,然后使用“-f”选项将此文件传递给“hive”命令。例如:
hive -f /path/to/script/file.hql
hive -f /path/to/script/file.hql
This will execute all the Hive queries contained in the script file "file.hql". We can also include additional options and parameters with the "hive" command, such as specifying the name of the database or output file to use.
这将执行脚本文件“file.hql”中包含的所有Hive查询。我们还可以在“hive”命令中包含其他选项和参数,例如指定要使用的数据库名称或输出文件。
Using a script file to execute Hive queries can be useful for automating repetitive tasks, as well as for processing large volumes of data in a batch mode. It can also help to improve productivity and reduce errors, as we can write and test the queries in a text editor before running them in Hive.
使用脚本文件执行Hive查询对于自动化重复任务以及以批处理模式处理大量数据非常有用。它还可以帮助提高生产率和减少错误,因为我们可以在Hive中运行查询之前在文本编辑器中编写和测试查询。
347. What do you mean by Enterprise data warehouse?
企业数据仓库是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf26e | 官方: 否 | 付费: 否
答案:
Data warehouses (DW) or Enterprise Data Warehousing (EDW), a form of the corporate repository, generally store and manage enterprise data and information collected from multiple sources. Enterprise data is collected and made available for analysis, business intelligence, to derive valuable business insights, and to improve data-driven decision-making. Data contained here can be accessed and utilized by users (with privileges) across the organization. With EDW, data is accessed through a single point and delivered to the server via a single source.
数据仓库(DW)或企业数据仓库(EDW),是公司存储库的一种形式,通常存储和管理从多个来源收集的企业数据和信息。企业数据被收集并用于分析、商业智能,以获取有价值的业务见解,并改进数据驱动的决策。这里包含的数据可以被整个组织中的用户(具有权限)访问和利用。使用EDW,数据通过单一点访问,并通过单一来源传送到服务器。
348. What is target load order?
什么是目标加载顺序?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf277 | 官方: 否 | 付费: 否
答案:
Target load order also referred to as Target load plan , is generally used to specify the order in which target tables are loaded by an integration service. Based on the source qualifier transformations in a mapping, you can specify a target load order. In Informatica, you can specify the order in which data is loaded into targets when there are multiple source qualifier transformations connected to multiple targets.
目标加载顺序,也称为目标加载计划,通常用于指定集成服务加载目标表的顺序。根据映射中的源限定符转换,您可以指定目标加载顺序。在 Informatica 中,当多个源限定符转换连接到多个目标时,您可以指定数据加载到目标的顺序。
349. What is ETL (Extract, transform, Load) and write some ETL tools.
什么是 ETL(提取、转换、加载)?并写出一些 ETL 工具。
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf27a | 官方: 否 | 付费: 否
答案:
Essentially, ETL means to extract, transform, and load. The ETL process involves extracting, transforming, and loading data from different databases into the target database or file. It forms the basis of a data warehouse. Here are a few ETL tools: - IBM Datastage
本质上,ETL 意味着提取、转换和加载。ETL 过程涉及从不同数据库提取、转换和加载数据到目标数据库或文件中。它构成了数据仓库的基础。以下是一些 ETL 工具:- IBM Datastage
- Informatica PowerCenter
- Abinitio
- Talend Studio, etc.
It performs the following functions: - Obtains data from sources
它执行以下功能:- 从源获取数据
- Analyze, transform, and cleans up data
- Indexes and summarizes data
- Obtains and loads data into the warehouse
- Monitors changes to source data needed for the warehouse
- Restructures keys
- Keeps track of metadata
- Updates data in the warehouse
350. What is Informatica PowerCenter? Write its components
什么是 Informatica PowerCenter?写出其组件
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf27d | 官方: 否 | 付费: 否
答案:
ETL tools such as Informatica PowerCenter enable data integration (combining data from different sources into a single dataset). In order to build enterprise data warehouses, it provides the ability to extract, transform, and load data from heterogeneous OLTP (Online Transaction Processing) sources systems. US Air Force, Allianz, Fannie Mae, ING, and Samsung are among the top clients using Informatica PowerCenter. There is no doubt that it has a wide range of applications. Informatica PowerCenter 9.6.0 is the latest version available. Informatica PowerCenter is available in the following editions: - Standard edition
诸如 Informatica PowerCenter 之类的 ETL 工具支持数据集成(将来自不同来源的数据组合成单个数据集)。为了构建企业数据仓库,它提供了从异构 OLTP(在线事务处理)源系统提取、转换和加载数据的能力。美国空军、安联、房利美、ING 和三星是使用 Informatica PowerCenter 的主要客户。毫无疑问,它具有广泛的应用。Informatica PowerCenter 9.6.0 是最新可用版本。Informatica PowerCenter 有以下版本可用:- 标准版
- Advanced edition
Premium edition
PowerCenter consists of seven important components: - PowerCenter ServicePowerCenter 由七个重要组件组成:- PowerCenter 服务
- PowerCenter Clients
- PowerCenter Repository
- PowerCenter Domain
- Repository Service
- Integration Service
- PowerCenter Administration Console
- Web Service Hub
351. Name different types of transformation that are important?
说出不同类型的重要转换?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf280 | 官方: 否 | 付费: 否
答案:
Transformations in Informatica are the repository objects that transform the source data according to the needs of the target system and ensure that the quality of loaded data is maintained. The following transformations are provided by Informatica to accomplish specific functionalities: - Aggregator Transformation: An active transformation used to compute averages and sums (especially across multiple rows or groups).
Informatica 中的转换是存储库对象,它们根据目标系统的需求转换源数据,并确保加载数据的质量得以维持。Informatica 提供以下转换来实现特定功能:- 聚合器转换:一种主动转换,用于计算平均值和总和(特别是跨多行或组)。
- Expression transformation: A passive transformation suitable for calculating values in one row. In addition, conditional statements can be tested before they are written to target tables or other transformations.
- Filter transformation: An active transformation used for filtering rows in mappings that don't meet the given condition.
- Joiner transformation: An active transformation joins data from different sources or from the same location.
- Lookup transformation: In order to get relevant data, a lookup transformation looks up a source, source qualifier, or target. Results of the lookup are returned to another transformation or the target object. Active Lookup transformation returns more than one row, whereas passive transformation returns only a single row.
- Normalizer transformation: An active transformation used for normalizing records sourced from Cobol sources whose data is usually in de-normalized format. A single row of data can be transformed into multiple rows using it.
- Rank transformation: An active transformation used to select top or bottom rankings.
- Router transformation: An active transformation provides multiple conditions for testing the source data.
- Sorter transformation: An active transformation sorts data according to a field in ascending or descending order. Additionally, to set case-sensitive sorting.
- Sequence Generator transformation: A passive transformation used to generate numeric values. Each record in the table is uniquely identified by creating unique primary keys or surrogate keys.
- Source Qualifier transformation: An active transformation reads rows from a flat-file or relational source while running a session and adds them to mapping. Using this tool, Source Data Types are transformed into Informatica Native Data Types
- Stored Procedure transformation: A passive transformation used to automate time-consuming processes or labor-intensive tasks. Additionally, used to handle errors, determine the database space, drop and recreate indexes, and perform specialized calculations.
- Update strategy transformation: An active transformation used to update data in a target table, either to maintain its history or incorporate recent updates.
352. Write the difference between connected lookup and unconnected lookup.
写出连接查找和非连接查找之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf283 | 官方: 否 | 付费: 否
答案:
Lookup transformations can both be used in connected and unconnected modes. Following is a comparison of the connected and unconnected lookup transformations:
查找转换可以在连接和非连接模式下使用。以下是连接和非连接查找转换的比较:
| Connected Lookup 连接查找 | Unconnected Lookup 非连接查找 |
|---|---|
| Data is directly received as input values from the transformation and also contributes to the data flow. 数据直接作为输入值从转换接收,并有助于数据流。 | It does not directly take the values; it only receives them from the result or function of the LKP expression. 它不直接接收值;它仅从 LKP 表达式的结果或函数中接收值。 |
| For synchronization, it is connected to the database. 为了同步,它连接到数据库。 | No synchronization technique is in place. 没有同步机制。 |
| Expressions and other transformations can't be done with it. 表达式和其他转换不能与其一起使用。 | Though unconnected lookup does not take input directly from other transformations, it is still useful in any transformation. 虽然非连接查找不直接从其他转换接收输入,但它仍可在任何转换中有用。 |
| This method cannot be called more than once in a mapping. 此方法不能在映射中调用多次。 | This method can be called multiple times in a mapping. 此方法可以在映射中调用多次。 |
| User-defined default values are supported. 支持用户定义的默认值。 | User-defined default values are not supported. 不支持用户定义的默认值。 |
| It supports both dynamic and static cache. 它支持动态和静态缓存。 | It supports only static cache. 它仅支持静态缓存。 |
| More than one column value can be returned, i.e., output port. 可以返回多个列值,即输出端口。 | Only one column value can be returned. 只能返回一个列值。 |
353. An unconnected lookup can have how many input parameters?
一个非连接查找可以有多少个输入参数?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf286 | 官方: 否 | 付费: 否
答案:
An unconnected lookup can include numerous parameters. No matter how many parameters are entered, the return value will always be one. You can, for instance, put parameters in an unconnected lookup as column 1, column 2, column 3, and column 4, but there is only one return value.
非连接查找可以包含许多参数。无论输入多少参数,返回值始终为一个。例如,您可以将参数放入非连接查找中,如列 1、列 2、列 3 和列 4,但只有一个返回值。
354. Explain the difference between active and passive transformation.
解释主动和被动转换之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf28a | 官方: 否 | 付费: 否
答案:
Transformation can be classified into two types:
转换可以分为两种类型:
- Active transformation: In this, the number of rows that pass from the source to the target is reduced as it eliminates the rows that do not meet the transformation condition. Additionally, it can change the transaction history or row type.
- Passive transformation: Unlike active transformations, passive transformations do not eliminate the number of rows, so all rows pass from source to target without being modified. Additionally, it can maintain the transaction boundary and row type.
355. Name the output files that are created by the Informatica server at runtime.
列出 Informatica 服务器在运行时创建的输出文件。
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf290 | 官方: 否 | 付费: 否
答案:
During runtime, the Informatica server creates the following output files: - Informatica server log: Generally, this type of file is stored in Informatica's home directory and is used to create a log for all status and error messages (default name: pm.server.log). In addition, an error log can also be generated for all error messages.
在运行时,Informatica 服务器会创建以下输出文件:- Informatica 服务器日志:通常,此类文件存储在 Informatica 的主目录中,并用于为所有状态和错误消息创建日志(默认名称:pm.server.log)。此外,还可以为所有错误消息生成错误日志。
- Session log file: For each session, session log files are created that store information about sessions, such as the initialization process, the creation of SQL commands for readers and writers, errors encountered, and the load summary. Based on the tracing level that you set, the number of details in the session log file will differ.
- Session detail file: Each target in mapping has its own load statistics file, which contains information such as the target name and the number of written or rejected rows. This file can be viewed by double-clicking the session in the monitor window.
- Performance detail file: This file is created by selecting the performance detail option on the session properties sheet and it includes session performance details that can be used to optimize the performance.
- Reject file: This file contains rows of data that aren't written to targets by the writer.
- Control file: This file is created by the Informatica server if you execute a session that uses the external loader and it contains information about the target flat file like loading instructions for the external loader and data format.
- Post-session email: Using a post-session email, you can automatically inform recipients about the session run. In this case, you can create two different messages; one for the session which was successful and one for the session that failed.
- Indicator file: The Informatica server can create an indicator file when the flat file is used as a target. This file contains a number indicating whether the target row has been marked for insert, update, delete or reject.
- Output file: Based on the file properties entered in the session property sheet, the Informatica server creates the target file if a session writes to it.
- Cache files: Informatica server also creates cache files when it creates the memory cache.
356. Can we store previous session logs in Informatica? If yes, how?
我们可以在 Informatica 中存储以前的会话日志吗?如果可以,怎么做?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf293 | 官方: 否 | 付费: 否
答案:
Yes, that is possible. The automatically session logout will not overwrite the current session log if any session is running or active in timestamp mode.
是的,这是可能的。如果任何会话正在运行或在时间戳模式下处于活动状态,自动会话注销将不会覆盖当前会话日志。
Click on Session Properties –> Config Object –> Log Options.
点击会话属性 –> 配置对象 –> 日志选项。
The properties should be chosen as follows: - Save session log by –> SessionRuns
应选择以下属性:- 按会话运行保存会话日志 –> SessionRuns
- Save session log for these runs –> Set the number of log files you wish to keep (default is 0)
When you want to save all log files generated by each run, you should choose the option Save session log for these runs – > Session TimeStamp.
The properties listed above can be found in the session/workflow properties.上述列出的属性可以在会话/工作流属性中找到。
357. Explain data driven sessions.
解释数据驱动会话。
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf297 | 官方: 否 | 付费: 否
答案:
In Informatica Server, data-driven properties determine how the data should be treated when an Update Strategy Transformation is used for mapping. When using an Update Strategy Transformation, it must be specified whether you want DD_UPDATE (constant for updating record) or DD_INSERT (constant for inserting record) or DD_DELETE (constant for deleting record). It is possible for mapping to contain more than one Update Strategy Transformation. Thus, a Data-Driven property must be specified in a session property for that specific mapping in order for the session to execute successfully.
在 Informatica 服务器中,数据驱动属性决定当映射中使用更新策略转换时数据应如何处理。当使用更新策略转换时,必须指定是使用 DD_UPDATE(用于更新记录的常量)还是 DD_INSERT(用于插入记录的常量)或 DD_DELETE(用于删除记录的常量)。映射可能包含多个更新策略转换。因此,必须在会话属性中为该特定映射指定数据驱动属性,以便会话成功执行。
Example: - DD_UPDATE (Any time a record is marked as an update in the mapping, it will be updated in the target.)
示例:- DD_UPDATE(每当记录在映射中被标记为更新时,它将在目标中被更新。)
- DD_INSERT (Any time a record is marked as an insert in the mapping, it will be inserted in the target.)
- DD_DELETE (Any time a record is marked as delete in the mapping, it will be deleted in the target.)
358. What is the role of a repository manager?
仓库管理器的作用是什么?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf29a | 官方: 否 | 付费: 否
答案:
A repository manager is an administrative tool used to administer and manage repository folders, objects, groups, etc. A repository manager provides a way to navigate through multiple folders and repositories, as well as manage groups and user permissions.
仓库管理器是一种管理工具,用于管理和维护仓库文件夹、对象、组等。仓库管理器提供了一种在多个文件夹和仓库之间导航的方式,并管理组和用户权限。
359. What is Domain in Informatica?
Informatica 中的域是什么?
- 知识点: 数据工程与数据科学/AI (主题: informatica, etl;标签: interviewbit, informatica, topic-specific, etl)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b5558d557c902baf29d | 官方: 否 | 付费: 否
答案:
PowerCenter services are administered and managed by the Informatica Domain. It consists of nodes and services. Each relationship and node are categorized according to the administration requirements into special folders and sub-folders.
PowerCenter 服务由 Informatica 域进行管理和维护。它由节点和服务组成。每个关系节点都根据管理要求分类到特殊的文件夹和子文件夹中。
360. What is the difference between a population regression line and a sample regression line?
总体回归线和样本回归线有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1608 | 官方: 否 | 付费: 否
答案:
A population regression line is a mathematical model that describes the relationship between a dependent variable and one or more independent variables in a population. It is based on the entire population and is used to make predictions about the population as a whole.
总体回归线是一种数学模型,描述总体中因变量与一个或多个自变量之间的关系。它基于整个总体,用于对整个总体进行预测。
A sample regression line, on the other hand, is a mathematical model that describes the relationship between a dependent variable and one or more independent variables in a sample. It is based on a subset of the population and is used to make predictions about the sample and to estimate the population regression line.
另一方面,样本回归线是一种数学模型,描述样本中因变量与一个或多个自变量之间的关系。它基于总体中的一部分数据,用于对样本进行预测并估计总体回归线。
| Aspect 方面 | Population Regression Line 总体回归线 | Sample Regression Line 样本回归线 |
|---|---|---|
| Definition 定义 | The regression line describes the relationship between the independent variable and the dependent variable in the entire population. 回归线描述整个总体中自变量与因变量之间的关系。 | The regression line is estimated from a sample of the population. 回归线是从样本总体中估计得出的。 |
| Based on 基于 | Based on the entire population of individuals or observations that the researcher is interested in studying. 基于研究者感兴趣研究的全部个体或观测值。 | Based on a subset of the population that the researcher is able to observe and measure. 基于研究者能够观察和测量的总体子集。 |
| Representation 表示 | A theoretical construct that is not directly observable or measurable. 一种理论构造,不可直接观察或测量。 | An empirical estimate of the population regression line based on the data available. 基于可用数据对总体回归线的经验估计。 |
| Parameter 参数 | The slope and intercept of the population regression line are population parameters that are fixed and unknown. 总体回归线的斜率和截距是固定且未知的总体参数。 | The slope and intercept of the sample regression line are estimates of the population parameters and vary from sample to sample. 样本回归线的斜率和截距是总体参数的估计值,且因样本而异。 |
| Notation 符号 | Usually represented as Y = β0 + β1X + ε, where β0 and β1 are population parameters and ε is the error term. 通常表示为 Y = β0 + β1X + ε,其中 β0 和 β1 是总体参数,ε 是误差项。 | Usually represented as ŷ = b0 + b1X, where b0 and b1 are estimates of the population parameters and ŷ is the predicted value of the dependent variable. 通常表示为 ŷ = b0 + b1X,其中 b0 和 b1 是总体参数的估计值,ŷ 是因变量的预测值。 |
| Objective 目标 | To describe the true underlying relationship between the independent variable and the dependent variable in the population. 描述总体中自变量与因变量之间的真实潜在关系。 | To estimate the population parameters based on the sample data. 基于样本数据估计总体参数。 |
| Importance 重要性 | Provides a theoretical framework for understanding the relationship between the variables and making predictions about the dependent variable based on the independent variable. 提供理解变量之间关系以及基于自变量预测因变量的理论框架。 | Allows researchers to draw conclusions about the population parameters and make inferences about the relationship between the variables in the population. 允许研究者得出关于总体参数的结论,并对总体中变量之间的关系进行推断。 |
| Relationship to sampling error 与抽样误差的关系 | Unaffected by sampling error, since it is based on the entire population. 不受抽样误差影响,因为它基于整个总体。 | Affected by sampling error, since it is estimated from a sample of the population. 受抽样误差影响,因为它从总体样本中估计。 |
| Assumptions 假设 | Assumes that the relationship between the variables is linear and that the error term is normally distributed with constant variance. 假设变量之间的关系是线性的,且误差项呈正态分布并具有恒定方差。 | Same assumptions as the population regression line, with additional assumptions about the representativeness and independence of the sample. 与总体回归线相同的假设,外加关于样本代表性和独立性的假设。 |
| Usefulness 实用性 | Provides a theoretical benchmark against which the sample data can be compared. 提供理论基准,用于比较样本数据。 | Allows researchers to estimate the population parameters and draw conclusions about the relationship between the variables in the population based on the sample data. 允许研究者基于样本数据估计总体参数并得出关于总体中变量关系的结论。 |
361. What are the assumptions of a linear regression model?
线性回归模型的假设是什么?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb160b | 官方: 否 | 付费: 否
答案:
The assumptions of a linear regression model are: - The relationship between the independent and dependent variables is linear.
线性回归模型的假设是:- 自变量和因变量之间的关系是线性的。
- The residuals, or errors, are normally distributed with a mean of zero and a constant variance.
- The independent variables are not correlated with each other (i.e. they are not collinear).
- The residuals are independent of each other (i.e. they are not autocorrelated).
- The model includes all the relevant independent variables needed to accurately predict the dependent variable.
362. What are outliers? How do you detect and treat them? How do you deal with outliers in a linear regression model?
什么是离群值?如何检测和处理它们?在线性回归模型中如何应对离群值?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb160e | 官方: 否 | 付费: 否
答案:
A value that is significantly different from the mean or the median is considered to be an outlier in statistics. There is a possibility of erroneous results due to measurement errors. There is also the possibility of an experimental error being indicated.
在统计学中,显著不同于均值或中位数的值被视为离群值。由于测量误差可能导致错误结果。也可能指示存在实验误差。
In a scenario like this one, it is essential to clear the database of any information that could be considered offensive. In the absence of detection and correction, they are capable of wreaking havoc on statistical analysis.
在这种情况下,清除数据库中可能被视为异常的任何信息至关重要。如果未能检测和纠正,它们可能对统计分析造成严重破坏。
Utilizing mathematical methods alone does not allow for the determination of an outlier with any degree of accuracy. The process of locating an outlier and determining whether or not it is significant is highly dependent on personal interpretation. On the other hand, there are a number of methods that can be used to identify deviations from the norm. Some are based on models, while others are graphically represented as normal probability plots. Boxplots are one example of the hybrid approaches that are currently available.
仅通过数学方法无法高度准确地确定离群值。定位离群值并判断其是否显著的过程高度依赖个人解释。另一方面,有多种方法可用来识别偏差。有些基于模型,有些以图形形式表示为正态概率图。箱线图就是目前可用的混合方法之一。
If you discover an outlier in your data, you should either eliminate it or find a way to fix it so that your analysis can be trusted. The Z-score and the IQR score are two methods that can be utilized in order to identify and eliminate extreme data points.
如果发现数据中存在离群值,应将其剔除或找到修复方法,以使分析可信。Z分数和IQR分数是可用于识别和消除极端数据点的两种方法。
There are several ways to deal with outliers in a linear regression model: - Remove the outlier data points: This is a simple and straightforward approach, but it may not always be possible or advisable if the outlier data points contain important information.
在线性回归模型中处理离群值有几种方式:- 移除离群数据点:这是一种简单直接的方法,但如果离群数据点包含重要信息,则可能并非总是可行或可取。
- Use a robust regression model: Robust regression models are designed to be less sensitive to the presence of outliers and can provide more accurate predictions.
- Transform the data: Applying a transformation, such as a log or square root, to the data can make it more normally distributed and reduce the impact of outliers.
- Use a different regression method: Some regression methods, such as non-parametric methods, are less sensitive to outliers and can provide more accurate predictions.
- Use a combination of methods: Combining multiple methods, such as removing some outliers, using a robust regression model, and transforming the data, can provide the best results.
363. How do you determine the best fit line for a linear regression model?
如何确定线性回归模型的最佳拟合线?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1611 | 官方: 否 | 付费: 否
答案:
To determine the best-fit line for a linear regression model, the following steps can be taken:
要确定线性回归模型的最佳拟合线,可以采取以下步骤:
- Collect a sample of data points that represent the relationship between the dependent and independent variables.
- Plot the data points on a scatter plot to visualize the relationship between the variables.
- Calculate the linear regression equation using the least squares method to find the line that minimizes the distance between the data points and the line.
- Use the linear regression equation to predict the value of the dependent variable for a given value of the independent variable.
- Evaluate the accuracy of the model by calculating the coefficient of determination (R2) and the root mean squared error (RMSE).
- Adjust the model, if necessary, by adding or removing variables or transforming the data to improve the fit of the model.
- Use the adjusted model to make predictions and continue to evaluate its performance.
364. What is the difference between simple and multiple linear regression?
简单线性回归和多元线性回归有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1614 | 官方: 否 | 付费: 否
答案:
Simple linear regression models the relationship between one independent variable and one dependent variable, while multiple linear regression models the relationship between multiple independent variables and one dependent variable. The goal of both methods is to find a linear model that best fits the data and can be used to make predictions about the dependent variable based on the independent variables.
简单线性回归建模一个自变量与一个因变量之间的关系,而多元线性回归建模多个自变量与一个因变量之间的关系。两种方法的目标都是找到最适合数据的线性模型,并基于自变量对因变量进行预测。
| Aspect 方面 | Simple Linear Regression 简单线性回归 | Multiple Linear Regression 多元线性回归 |
|---|---|---|
| Definition 定义 | A statistical method for finding a linear relationship between two variables. 一种统计方法,用于寻找两个变量之间的线性关系。 | A statistical method for finding a linear relationship between more than two variables. 一种统计方法,用于寻找多于两个变量之间的线性关系。 |
| Number of independent variables 自变量数量 | One. 一个。 | More than one. 多于一个。 |
| Number of dependent variables 因变量数量 | One. 一个。 | One. 一个。 |
| Equation 方程 | y = mx + b | y = b + m1x1 + m2x2 + ... + mnxn |
| Purpose 目的 | Predict the value of the dependent variable based on the value of the independent variable. 基于自变量值预测因变量值。 | Predict the value of the dependent variable based on the values of multiple independent variables. 基于多个自变量值预测因变量值。 |
| Assumption 假设 | Assumes a linear relationship between the independent and dependent variables. 假设自变量和因变量之间存在线性关系。 | Assumes a linear relationship between the dependent variable and multiple independent variables. 假设因变量与多个自变量之间存在线性关系。 |
| Method 方法 | Uses a simple linear regression equation to estimate the regression line. 使用简单线性回归方程估计回归线。 | Uses multiple linear regression equations to estimate the regression plane or hyperplane. 使用多元线性回归方程估计回归平面或超平面。 |
| Complexity 复杂度 | Less complex. 较低。 | More complex. 较高。 |
| Interpretation 解释性 | Easy to interpret. 易于解释。 | Complex to interpret. 难以解释。 |
| Data requirement 数据需求 | Requires fewer data. 需要较少数据。 | Requires more data. 需要较多数据。 |
| Examples 示例 | Predicting the price of a house based on its size. 基于房屋面积预测房价。 | Predicting the performance of a student based on their age, gender, IQ, etc. 基于学生的年龄、性别、智商等预测其表现。 |
365. What is linear Regression Analysis?
什么是线性回归分析?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1617 | 官方: 否 | 付费: 否
答案:
Linear regression analysis is a statistical method used to model the relationship between a dependent variable and one or more independent variables. The analysis assumes that there is a linear relationship between the dependent variable and the independent variable(s) and seeks to fit a straight line that best represents that relationship. The resulting model can be used to make predictions about the dependent variable based on the values of the independent variable(s). Linear regression analysis is widely used in various fields, such as finance, economics, and social sciences, to understand the relationships between variables and make predictions about future outcomes.
线性回归分析是一种统计方法,用于建模因变量与一个或多个自变量之间的关系。该分析假设因变量与自变量之间存在线性关系,并寻求拟合一条最能代表该关系的直线。得到的模型可用于基于自变量的值对因变量进行预测。线性回归分析广泛应用于金融、经济学和社会科学等各个领域,以理解变量之间的关系并预测未来结果。
In linear regression analysis, the coefficient of determination is used to evaluate the goodness of fit of the model. It can be used to compare different regression models and to determine whether the addition of new variables to a model significantly improves the fit.
在线性回归分析中,决定系数用于评估模型的拟合优度。它可用于比较不同的回归模型,并确定向模型添加新变量是否显著提高拟合度。
366. What is multicollinearity and how does it affect linear regression analysis?
什么是多重共线性,它如何影响线性回归分析?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb161a | 官方: 否 | 付费: 否
答案:
Multicollinearity refers to a situation in which two or more independent variables in a linear regression model are highly correlated with each other. This can create problems in the regression analysis, as it can be difficult to determine the individual effects of each independent variable on the dependent variable.
多重共线性指的是线性回归模型中两个或多个自变量彼此高度相关的情况。这会在回归分析中引发问题,因为难以确定每个自变量对因变量的个体影响。
When two or more independent variables are highly correlated, it becomes difficult to isolate the effect of each variable on the dependent variable. The regression model may indicate that both variables are significant predictors of the dependent variable, but it can be difficult to determine which variable is actually responsible for the observed effect.
当两个或多个自变量高度相关时,很难分离每个变量对因变量的影响。回归模型可能显示两个变量都是因变量的显著预测因子,但难以确定哪个变量实际负责观察到的效应。
Multicollinearity in linear regression: - Multicollinearity occurs when two or more independent variables in a linear regression model are highly correlated with each other.
线性回归中的多重共线性:- 当线性回归模型中两个或多个自变量高度相关时,就会出现多重共线性。
- It makes it difficult to determine the individual effects of each independent variable on the dependent variable.
- It can lead to unstable and unreliable estimates of the regression coefficients and inflated standard errors of the coefficients, affecting the accuracy of the regression results.
- It can also lead to a model that performs poorly in predicting the dependent variable by overemphasizing the importance of the correlated variables and failing to identify other important predictors.
- Multicollinearity can be identified by looking at the correlation matrix of the independent variables and calculating the variance inflation factor (VIF).
- A VIF value greater than 5 or 10 is often considered an indication of high multicollinearity.
- To address multicollinearity, researchers can remove one of the highly correlated independent variables from the model, combine correlated variables into a single composite variable, or use techniques such as ridge regression or principal component analysis to account for multicollinearity in the model.
367. What is the difference between linear regression and logistic regression?
线性回归和逻辑回归有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb161d | 官方: 否 | 付费: 否
答案:
Linear regression is a statistical method used for predicting a numerical outcome, such as the price of a house or the likelihood of a person developing a disease. Logistic regression, on the other hand, is used for predicting a binary outcome, such as whether a person will pass or fail a test, or whether a customer will churn or not.
线性回归是一种用于预测数值结果的统计方法,例如房价或某人患病的可能性。另一方面,逻辑回归用于预测二元结果,例如某人是否会通过或失败测试,或客户是否会流失。
The main difference between these two types of regression lies in the nature of the output they predict. Linear regression is used to predict a continuous output, while logistic regression is used to predict a binary output. This means that the equations and the processes used to train and evaluate the models are different for each type of regression.
这两种回归之间的主要区别在于它们预测的输出性质。线性回归用于预测连续输出,而逻辑回归用于预测二元输出。这意味着每种回归的训练和评估模型所使用的方程和过程是不同的。
| Linear Regression | Logistic Regression |
|---|---|
| Type of Analysis | Regression analysis to establish a linear relationship between a dependent variable and one or more independent variables. |
| Classification analysis to predict the probability of a binary or categorical outcome based on one or more independent variables. | |
| Dependent Variable | Continuous variable. |
| Binary or categorical variable. | |
| Independent Variable | Continuous or categorical variable. |
| Continuous or categorical variable. | |
| Equation | y = b0 + b1x1 + b2x2 + ... + bnxn |
| Logit(p) = b0 + b1x1 + b2x2 + ... + bnxn, where p is the probability of success | |
| Output | Predicts the value of the dependent variable based on the values of independent variables. |
| Predicts the probability of a binary or categorical outcome based on the values of independent variables. | |
| Assumptions | Assumes a linear relationship between the independent and dependent variables. |
| Assumes a non-linear relationship between the independent and dependent variables and the presence of a threshold. | |
| Model Type | Simple Linear Regression, Multiple Linear Regression. |
| Logistic Regression. | |
| Error Measure | Residual Sum of Squares (RSS). |
| Deviance or Log-Likelihood. | |
| Interpretation | Predicts the value of the dependent variable. |
| Predicts the probability of a binary or categorical outcome. | |
| Application | Predicting a continuous variable, such as housing prices or stock prices. |
| Classifying data, such as whether an email is spam or not. | |
| Data Normality | Data does not need to be normally distributed. |
| Data does not need to be normally distributed. | |
| Outliers | Sensitive to outliers. |
| Robust to outliers. |
368. What are the common types of errors in linear regression analysis?
线性回归分析中常见的错误类型有哪些?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1620 | 官方: 否 | 付费: 否
答案:
There are several types of errors that can occur in linear regression analysis. Some of the most common include: - Overestimating or underestimating the relationship between the variables: This can happen if the model is too complex or if important variables are left out of the model.
在线性回归分析中可能发生多种错误。一些最常见的错误包括:- 高估或低估变量之间的关系:如果模型过于复杂或模型中遗漏了重要变量,就可能发生这种情况。
- Incorrect functional form: The chosen functional form (e.g. linear, log-linear, etc.) may not accurately represent the relationship between the variables.
- Non-linearity of the residuals: The residuals (the difference between the observed values and the predicted values) should be randomly distributed around zero if the model is correct. If the residuals exhibit non-linear patterns, it may indicate that the chosen model is not the best fit for the data.
- Multicollinearity: This occurs when two or more predictor variables in a model are highly correlated, which can cause unstable coefficient estimates and make it difficult to interpret the results.
Outliers: Outliers, or extreme values in the data, can have a significant impact on the fitted values and coefficients in a linear regression model. It is important to identify and address any potential outliers in the data before fitting a model.
Overall, the key to avoiding errors in linear regression analysis is to carefully examine the data and ensure that the chosen model is the best fit for the relationship between the variables.总的来说,避免线性回归分析中错误的关键是仔细检查数据,并确保所选模型是变量之间关系的最佳拟合。
369. What is the difference between a dependent and independent variable in linear regression?
在线性回归中,因变量和自变量有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1623 | 官方: 否 | 付费: 否
答案:
In linear regression, the dependent variable is the variable that is being predicted or explained by the model. This is the variable that is dependent on the independent variables. The independent variable, on the other hand, is the variable that is used to predict or explain the dependent variable. It is independent of the dependent variable and is not affected by its value.
在线性回归中,因变量是模型正在预测或解释的变量。该变量依赖于自变量。另一方面,自变量是用于预测或解释因变量的变量。它独立于因变量,不受其值的影响。
| Aspect 方面 | Dependent Variable 因变量 | Independent Variable 自变量 |
|---|---|---|
| Definition 定义 | The variable that is being predicted or explained 被预测或解释的变量 | The variable used to make the prediction or explanation 用于进行预测或解释的变量 |
| Also known as 又称 | Response variable, outcome variable, predicted variable 响应变量、结果变量、预测变量 | Predictor variable, explanatory variable, input variable 预测因子变量、解释变量、输入变量 |
| Role in regression equation 在回归方程中的角色 | Y-axis variable Y轴变量 | X-axis variable X轴变量 |
| Notation 符号 | Usually represented as "Y" 通常表示为“Y” | Usually represented as "X" 通常表示为“X” |
| Assumption 假设 | The dependent variable is assumed to be affected by the independent variable(s) 假设因变量受到自变量影响 | The independent variable(s) are assumed to have a linear relationship with the dependent variable 假设自变量与因变量具有线性关系 |
| Goal 目标 | To understand how changes in the independent variable(s) affect the dependent variable 理解自变量的变化如何影响因变量 | To use the independent variable(s) to predict or explain the values of the dependent variable 使用自变量来预测或解释因变量的值 |
| Example 示例 | In a study on the effect of hours of study on exam scores, exam score would be the dependent variable 在研究学习时间对考试成绩影响的研究中,考试成绩是因变量 | In the same study, hours of study would be the independent variable 在同一研究中,学习时间是自变量 |
| Direction of causality 因果关系方向 | The dependent variable is affected by the independent variable(s) 因变量受自变量影响 | The independent variable(s) do not depend on the dependent variable 自变量不依赖于因变量 |
| Data analysis 数据分析 | Typically plotted on the Y-axis in graphs 在图中通常绘制在Y轴上 | Typically plotted on the X-axis in graphs 在图中通常绘制在X轴上 |
370. What is an interaction term in linear regression and how is it used?
线性回归中的交互项是什么,如何使用?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb162b | 官方: 否 | 付费: 否
答案:
An interaction term in linear regression is a term in the regression model that represents the effect of the interaction between two or more variables on the dependent variable. It is used to evaluate the combined effect of multiple variables on the dependent variable, and to identify non-linear relationships between the variables. In a regression model with an interaction term, the effect of one variable on the dependent variable may be different at different levels of the other variable. This allows for a more nuanced understanding of the relationships between the variables in the model.
线性回归中的交互项是回归模型中表示两个或多个变量之间交互作用对因变量影响的一项。它用于评估多个变量对因变量的综合效应,并识别变量之间的非线性关系。在包含交互项的回归模型中,一个变量对因变量的效应可能因另一个变量的不同水平而有所不同。这使得对模型中变量之间关系的理解更加细致入微。
371. What is the difference between biased and unbiased estimates in linear regression?
在线性回归中,有偏估计和无偏估计有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb162e | 官方: 否 | 付费: 否
答案:
Biased estimates in linear regression refer to estimates that consistently over- or underestimate the true population parameter. This can occur due to various factors, such as missing information or incorrect assumptions about the data. Unbiased estimates, on the other hand, accurately reflect the true population parameter, without any systematic over- or underestimation.
线性回归中的有偏估计是指持续高估或低估真实总体参数的估计值。这可能由多种因素导致,例如缺失信息或对数据的错误假设。另一方面,无偏估计能准确反映真实总体参数,不存在系统性的高估或低估。
| Aspect 方面 | Biased Estimate 有偏估计 | Unbiased Estimate 无偏估计 |
|---|---|---|
| Definition 定义 | An estimate that is systematically off-target from the true value 系统性偏离真实值的估计 | An estimate that is, on average, equal to the true value 平均而言等于真实值的估计 |
| Cause 原因 | Results from a flawed modeling or sampling procedure that consistently skews the estimate in one direction 由建模或抽样过程存在缺陷导致,持续将估计值偏向一个方向 | Results from a modeling or sampling procedure that does not systematically favor any particular direction 由建模或抽样过程不系统性偏向任何特定方向导致 |
| Impact on inference 对推断的影响 | Can lead to incorrect conclusions or overconfidence in results 可能导致错误结论或对结果的过度自信 | More likely to lead to accurate conclusions and better decision-making 更可能得出准确结论并做出更好的决策 |
| Example 示例 | In a study on the effect of hours of study on exam scores, a biased estimate may underestimate the true relationship between hours of study and exam scores due to an inadequate sample size or the omission of important variables 在关于学习时长对考试成绩影响的研究中,由于样本量不足或遗漏重要变量,有偏估计可能低估学习时长与考试成绩之间的真实关系 | An unbiased estimate would accurately reflect the true relationship between hours of study and exam scores 无偏估计会准确反映学习时长与考试成绩之间的真实关系 |
| Correction 修正 | Bias can sometimes be corrected by adjusting the modeling or sampling procedure, but this is not always possible 通过调整建模或抽样过程有时可以修正偏差,但这并非总是可行 | Unbiased estimates do not require correction 无偏估计无需修正 |
| Relationship to sample size 与样本量的关系 | Bias can become more pronounced with smaller sample sizes 偏差在样本量较小时可能更明显 | Unbiased estimates can be obtained with any sample size, but may become more precise with larger sample sizes 无偏估计可在任何样本量下获得,但样本量越大可能越精确 |
| Impact on model fit 对模型拟合的影响 | Biased estimates can artificially improve the fit of a model, leading to overfitting 有偏估计可能人为改善模型拟合,导致过拟合 | Unbiased estimates are more likely to reflect the true underlying relationship between the variables 无偏估计更可能反映变量之间的真实潜在关系 |
| Significance testing 显著性检验 | Biased estimates can lead to incorrect conclusions about statistical significance 有偏估计可能导致关于统计显著性的错误结论 | Unbiased estimates are more likely to produce accurate p-values and confidence intervals 无偏估计更可能产生准确的p值和置信区间 |
| Usefulness 实用性 | Biased estimates can still provide useful information, but their limitations should be understood and accounted for 有偏估计仍可提供有用信息,但应理解并考虑其局限性 | Unbiased estimates are generally preferred for making accurate predictions and decisions 无偏估计通常更受青睐,用于做出准确预测和决策 |
372. How do you measure the strength of a linear relationship between two variables?
如何衡量两个变量之间线性关系的强度?
- 知识点: 数据工程与数据科学/AI / 行为与软技能 (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: behavioral | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1631 | 官方: 否 | 付费: 否
答案:
One way to measure the strength of a linear relationship between two variables is by calculating the correlation coefficient, which is a measure of the strength and direction of the linear relationship between the two variables. The correlation coefficient ranges from -1 to 1, with -1 indicating a perfect negative linear relationship, 0 indicating no linear relationship, and 1 indicating a perfect positive linear relationship. A higher absolute value of the correlation coefficient indicates a stronger linear relationship between the two variables.
衡量两个变量之间线性关系强度的一种方法是计算相关系数,它衡量了两个变量之间线性关系的强度和方向。相关系数的取值范围为-1到1,其中-1表示完全负线性关系,0表示无线性关系,1表示完全正线性关系。相关系数的绝对值越高,表示两个变量之间的线性关系越强。
373. What is linear regression, and how does it work?
什么是线性回归,它如何工作?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1634 | 官方: 否 | 付费: 否
答案:
Linear regression is a statistical method used to model the relationship between a dependent variable and one or more independent variables. It is called "linear" because the model assumes a linear relationship between the dependent and independent variables.
线性回归是一种统计方法,用于建模因变量与一个或多个自变量之间的关系。它被称为“线性”,是因为该模型假设因变量和自变量之间存在线性关系。
Linear regression can be classified into two types: Simple Linear Regression and Multiple Linear Regression. Simple Linear Regression involves using one independent variable to model the relationship between that variable and a dependent variable. On the other hand, Multiple Linear Regression involves using more than one independent variable to model the relationship with the dependent variable.
线性回归可分为两种类型:简单线性回归和多元线性回归。简单线性回归使用一个自变量来建模该变量与因变量之间的关系。另一方面,多元线性回归使用多个自变量来建模与因变量的关系。
In linear regression, a line of best fit is plotted on a scatter plot of the data points, and the equation of this line is used to make predictions about the dependent variable based on the values of the independent variable(s). The line is determined by finding the values of the slope and intercept that minimize the sum of the squared differences between the observed values and the values predicted by the line.
在线性回归中,最佳拟合线绘制在数据点的散点图上,该线的方程用于根据自变量的值对因变量进行预测。通过找到使观测值与预测值之间平方差总和最小化的斜率和截距值来确定这条线。
Linear regression can be used for both continuous and categorical dependent variables and can handle multiple independent variables. It is commonly used in fields such as economics and finance to model the relationship between variables and make predictions or forecasts.
线性回归既可用于连续型因变量,也可用于类别型因变量,并能处理多个自变量。它常用于经济学和金融学等领域,用于建模变量之间的关系并做出预测或预报。
374. What is the difference between linear regression and non-linear regression?
线性回归和非线性回归有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1638 | 官方: 否 | 付费: 否
答案:
Linear regression is a statistical method that uses a linear equation to model the relationship between a dependent variable and one or more independent variables. The linear equation is of the form y = mx + b , where y is the dependent variable, x is the independent variable, m is the slope of the line, and b is the y-intercept. In linear regression, the relationship between the variables is assumed to be linear, meaning that the dependent variable changes at a constant rate with respect to the independent variable.
线性回归是一种使用线性方程来建模因变量与一个或多个自变量之间关系的统计方法。线性方程的形式为 y = mx + b,其中y是因变量,x是自变量,m是直线的斜率,b是y截距。在线性回归中,变量之间的关系被假设为线性的,这意味着因变量相对于自变量以恒定速率变化。
Non-linear regression, on the other hand, is a statistical method that uses a non-linear equation to model the relationship between a dependent variable and one or more independent variables. The non-linear equation can be of many different forms, including polynomial equations, exponential equations, and logarithmic equations. In non-linear regression, the relationship between the variables is not assumed to be linear, meaning that the dependent variable can change at different rates with respect to the independent variable.
另一方面,非线性回归是一种使用非线性方程来建模因变量与一个或多个自变量之间关系的统计方法。非线性方程可以有多种形式,包括多项式方程、指数方程和对数方程。在非线性回归中,变量之间的关系不被假设为线性的,这意味着因变量相对于自变量可以以不同速率变化。
| Aspect 方面 | Linear Regression 线性回归 | Non-Linear Regression 非线性回归 |
|---|---|---|
| Definition 定义 | A statistical method that models the relationship between a dependent variable and one or more independent variables as a linear function. 一种将因变量与一个或多个自变量之间的关系建模为线性函数的统计方法。 | A statistical method that models the relationship between a dependent variable and one or more independent variables as a non-linear function. 一种将因变量与一个或多个自变量之间的关系建模为非线性函数的统计方法。 |
| Function form 函数形式 | The relationship between the variables is assumed to be linear, with the dependent variable being a linear combination of the independent variables. 变量之间的关系被假设为线性的,因变量是自变量的线性组合。 | The relationship between the variables can take any non-linear form, such as polynomial, exponential, logarithmic, or sigmoid. 变量之间的关系可以采取任何非线性形式,如多项式、指数、对数或S形。 |
| Equation 方程 | y = β0 + β1x1 + β2x2 + ... + βnxn + ε | y = f(x1, x2, ..., xn, β1, β2, ..., βk) + ε, where f is a non-linear function and β1, β2, ..., βk are the parameters of the function. y = f(x1, x2, ..., xn, β1, β2, ..., βk) + ε,其中f是非线性函数,β1, β2, ..., βk是函数的参数。 |
| Parameter estimation 参数估计 | Uses the least squares method to estimate the coefficients (β) of the linear equation that best fits the data. 使用最小二乘法来估计最拟合数据的线性方程的系数(β)。 | Uses nonlinear least squares or maximum likelihood method to estimate the parameters (β) of the non-linear equation that best fits the data. 使用非线性最小二乘法或最大似然法来估计最拟合数据的非线性方程的参数(β)。 |
| Linearity assumption 线性假设 | Assumes that the relationship between the variables is linear, with constant slope and intercept. 假设变量之间的关系是线性的,具有恒定斜率和截距。 | Does not assume a linear relationship between the variables, but requires that the function be differentiable and continuous. 不假设变量之间存在线性关系,但要求函数可微且连续。 |
| Interpretation of coefficients 系数的解释 | The coefficients (β) represent the change in the dependent variable for a unit change in the independent variable while holding all other independent variables constant. 系数(β)表示在其他所有自变量保持不变的情况下,因变量每单位变化所对应的自变量变化量。 | The coefficients (β) represent the change in the dependent variable for a unit change in the independent variable, but the interpretation may depend on the specific non-linear function used. 系数(β)表示因变量每单位变化所对应的自变量变化量,但解释可能取决于所使用的具体非线性函数。 |
| Goodness of fit 拟合优度 | R-squared is a common measure of goodness of fit, which represents the proportion of variation in the dependent variable explained by the independent variables. R平方是拟合优度的常用度量,表示自变量解释的因变量变异比例。 | The goodness of fit can be measured using various criteria, such as Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), or likelihood ratio test. 拟合优度可用多种标准来度量,如赤池信息准则(AIC)、贝叶斯信息准则(BIC)或似然比检验。 |
| Overfitting 过拟合 | Can be prone to overfitting if the model is too complex or if the number of independent variables is large compared to the sample size. 如果模型过于复杂或自变量数量相对于样本量较大,则容易出现过拟合。 | Can be prone to overfitting if the model is too flexible or if the sample size is small compared to the number of parameters. 如果模型过于灵活或样本量相对于参数数量较小,则容易出现过拟合。 |
| Predictive power 预测能力 | Generally provides good predictive power for linear relationships, but may not capture complex non-linear relationships. 对于线性关系通常提供良好的预测能力,但可能无法捕捉复杂的非线性关系。 | Can capture complex non-linear relationships, but the predictive power may depend on the specific non-linear function used and the quality of the data. 可以捕捉复杂的非线性关系,但预测能力可能取决于所使用的具体非线性函数和数据质量。 |
| Usefulness 实用性 | Useful for modelling linear relationships between variables and making predictions based on those relationships. 适用于建模变量之间的线性关系并基于这些关系进行预测。 | Useful for modeling non-linear relationships between variables and making predictions based on those relationships, but may require more complex modelling techniques and data preprocessing. 适用于建模变量之间的非线性关系并基于这些关系进行预测,但可能需要更复杂的建模技术和数据预处理。 |
375. What are the common techniques used to improve the accuracy of a linear regression model?
有哪些常用技术可以提高线性回归模型的准确性?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb163f | 官方: 否 | 付费: 否
答案:
- Feature selection: selecting the most relevant features for the model to improve its predictive power.
- Feature scaling: scaling the features to a similar range to prevent bias towards certain features.
- Regularization: adding a penalty term to the model to prevent overfitting and improve generalization.
- Cross-validation: dividing the data into multiple partitions and using a different partition for validation in each iteration to avoid overfitting.
- Ensemble methods: combining multiple models to improve the overall accuracy and reduce variance.
376. What is a residual in linear regression and how is it used in model evaluation?
在线性回归中,残差是什么,它如何在模型评估中使用?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1645 | 官方: 否 | 付费: 否
答案:
In linear regression, a residual is the difference between the predicted value of the dependent variable (based on the model) and the actual observed value. It is used to evaluate the performance of the model by measuring how well the model fits the data. If the residuals are small and evenly distributed around the mean, it indicates that the model is a good fit for the data. However, if the residuals are large and not evenly distributed, it indicates that the model may not be a good fit for the data and may need to be improved or refined.
在线性回归中,残差是因变量的预测值(基于模型)与实际观测值之间的差异。它通过衡量模型对数据的拟合程度来评估模型的性能。如果残差较小且围绕均值均匀分布,则表明模型对数据拟合良好。然而,如果残差较大且分布不均匀,则表明模型可能对数据拟合不佳,可能需要改进或完善。
377. What is the difference between a parametric and non-parametric regression model?
参数回归模型和非参数回归模型有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb1648 | 官方: 否 | 付费: 否
答案:
A parametric regression model is a model that assumes a specific functional form for the relationship between the dependent and independent variables, and estimates the model parameters based on the data. This means that the model has a fixed number of parameters, and the model structure is predetermined.
参数回归模型是一种假设因变量和自变量之间关系具有特定函数形式,并根据数据估计模型参数的模型。这意味着模型具有固定数量的参数,且模型结构是预先确定的。
On the other hand, a non-parametric regression model does not assume any specific functional form for the relationship between the dependent and independent variables, and instead estimates the relationship using a flexible, data-driven approach. This means that the model does not have a fixed number of parameters, and the model structure is not predetermined. Instead, the model is determined based on the data itself.
另一方面,非参数回归模型不假设因变量和自变量之间关系的任何特定函数形式,而是使用灵活的、数据驱动的方法来估计这种关系。这意味着模型没有固定数量的参数,且模型结构不是预先确定的。相反,模型是基于数据本身确定的。
| Aspect 方面 | Parametric Regression 参数回归 | Nonparametric Regression 非参数回归 |
|---|---|---|
| Definition 定义 | A statistical method that models the relationship between a dependent variable and one or more independent variables as a specific functional form with fixed parameters. 一种统计方法,将因变量和一个或多个自变量之间的关系建模为具有固定参数的特定函数形式。 | A statistical method that models the relationship between a dependent variable and one or more independent variables without making any assumptions about the functional form or fixed parameters. 一种统计方法,对因变量和一个或多个自变量之间的关系进行建模,而不对函数形式或固定参数做任何假设。 |
| Assumptions 假设 | Assumes a specific functional form of the relationship between the dependent and independent variables, such as linear or polynomial, and assumes that the residuals are normally distributed with constant variance. 假设因变量和自变量之间的关系具有特定函数形式,如线性或多项式,并假设残差服从正态分布且方差恒定。 | Does not assume any specific functional form of the relationship between the dependent and independent variables, and makes fewer assumptions about the distribution of the residuals. 不假设因变量和自变量之间关系的任何特定函数形式,并对残差的分布做出更少的假设。 |
| Flexibility 灵活性 | Less flexible, as it is limited to the specific functional form assumed. 灵活性较低,因为它受限于所假设的特定函数形式。 | More flexible, as it does not assume any specific functional form. 灵活性更高,因为它不假设任何特定函数形式。 |
| Parameter estimation 参数估计 | Estimates the parameters of the specific functional form using maximum likelihood or least squares method. 使用最大似然或最小二乘法估计特定函数形式的参数。 | Estimates the relationship between the variables using a kernel function or other non-parametric methods, which do not involve estimating specific parameters. 使用核函数或其他非参数方法估计变量之间的关系,这些方法不涉及估计特定参数。 |
| Bias-variance tradeoff 偏差-方差权衡 | Prone to overfitting if the functional form is too complex, but can provide more accurate predictions if the functional form is correct. 如果函数形式过于复杂,容易过拟合,但如果函数形式正确,可以提供更准确的预测。 | Less prone to overfitting, but may have higher bias and lower predictive power compared to parametric models. 过拟合风险较低,但与参数模型相比,可能有更高的偏差和较低的预测能力。 |
| Goodness of fit 拟合优度 | Can be measured using metrics such as R-squared or AIC, which evaluate the fit of the specific functional form to the data. 可以使用R平方或AIC等指标来衡量,这些指标评估特定函数形式对数据的拟合程度。 | Can be measured using metrics such as mean squared error or cross-validation, which evaluate the overall predictive performance of the model. 可以使用均方误差或交叉验证等指标来衡量,这些指标评估模型的整体预测性能。 |
| Interpretation of coefficients 系数解释 | The coefficients represent the change in the dependent variable for a unit change in the independent variable, but the interpretation may depend on the specific functional form used. 系数表示自变量单位变化引起的因变量变化,但解释可能取决于所使用的特定函数形式。 | Does not involve estimating coefficients, but may provide insights into the relationship between the variables based on the shape of the non-parametric function. 不涉及估计系数,但可能根据非参数函数的形状提供关于变量之间关系的见解。 |
| Sample size 样本量 | Requires a large sample size to estimate the parameters of the specific functional form with sufficient precision. 需要较大的样本量才能以足够的精度估计特定函数形式的参数。 | Can be applied to smaller sample sizes and can handle missing data more effectively than parametric models. 可以应用于较小的样本量,并且比参数模型更有效地处理缺失数据。 |
| Types 类型 | Examples include linear regression, logistic regression, and polynomial regression. 示例包括线性回归、逻辑回归和多项式回归。 | Examples include kernel regression, spline regression, and local regression. 示例包括核回归、样条回归和局部回归。 |
| Assumption testing 假设检验 | Assumptions of normality, homoscedasticity and linearity must be tested before using the model. 使用模型前必须检验正态性、同方差性和线性假设。 | Fewer assumptions to be tested, model can be built directly on raw data. 需要检验的假设较少,可以直接基于原始数据构建模型。 |
| Outlier handling 异常值处理 | Sensitive to outliers, that can affect the estimates of the parameters of the specific functional form. 对异常值敏感,这些值可能影响特定函数形式参数的估计。 | Less sensitive to outliers and can perform well even with a few outliers in the data. 对异常值不太敏感,即使数据中有一些异常值也能表现良好。 |
378. What are the assumptions of the ordinary least squares method for linear regression?
线性回归中普通最小二乘法有哪些假设?
- 知识点: 数据工程与数据科学/AI (主题: regression, machine-learning;标签: interviewbit, linear-regression, topic-specific, regression, machine-learning)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8458d557c902bb164b | 官方: 否 | 付费: 否
答案:
The ordinary least squares method for linear regression makes several assumptions about the data and the relationship between the variables. These assumptions include:
线性回归的普通最小二乘法对数据和变量之间的关系做了几个假设。这些假设包括:
- The dependent variable is continuous and normally distributed.
- The independent variables are linearly related to the dependent variable.
- There is no multicollinearity among the independent variables.
- The errors are independent and identically distributed.
- The errors have a mean of zero.
These assumptions help to ensure that the resulting model is reliable and accurately describes the relationship between the variables. It's important to test these assumptions and ensure that they are met before using the model for prediction.
这些假设有助于确保所得模型可靠且准确描述变量之间的关系。在将模型用于预测之前,测试这些假设并确保它们被满足是很重要的。
379. What are Different Kernels in SVM?
SVM中有哪些不同的核?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1da6 | 官方: 否 | 付费: 否
答案:
There are six types of kernels in SVM: - Linear kernel - used when data is linearly separable.
SVM中有六种核类型:- 线性核 - 用于数据线性可分的情况。
- Polynomial kernel - When you have discrete data that has no natural notion of smoothness.
- Radial basis kernel - Create a decision boundary able to do a much better job of separating two classes than the linear kernel.
- Sigmoid kernel - used as an activation function for neural networks.
380. Why was Machine Learning Introduced?
为什么引入机器学习?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1da9 | 官方: 否 | 付费: 否
答案:
The simplest answer is to make our lives easier. In the early days of “intelligent” applications, many systems used hardcoded rules of “if” and “else” decisions to process data or adjust the user input. Think of a spam filter whose job is to move the appropriate incoming email messages to a spam folder.
最简单的答案是让我们的生活更轻松。在早期“智能”应用时代,许多系统使用硬编码的“if”和“else”决策规则来处理数据或调整用户输入。想想一个垃圾邮件过滤器,它的工作是将适当的传入电子邮件消息移动到垃圾邮件文件夹。
But with the machine learning algorithms, we are given ample information for the data to learn and identify the patterns from the data.
但是使用机器学习算法,我们有充足的信息让数据学习并从数据中识别模式。
Unlike the normal problems we don’t need to write the new rules for each problem in machine learning, we just need to use the same workflow but with a different dataset.
与普通问题不同,在机器学习中我们不需要为每个问题编写新规则,我们只需要使用相同的工作流程但使用不同的数据集。
Let’s talk about Alan Turing, in his 1950 paper, “Computing Machinery and Intelligence”, Alan asked, “Can machines think?”
让我们谈谈艾伦·图灵,在他1950年的论文《计算机器与智能》中,艾伦问道:“机器能思考吗?”
Full paper here
完整论文请见此处
The paper describes the “Imitation Game”, which includes three participants - - Human acting as a judge,
论文描述了“模仿游戏”,其中包括三名参与者——一名人类扮演法官,
- Another human, and
A computer is an attempt to convince the judge that it is human.
The judge asks the other two participants to talk. While they respond the judge needs to decide which response came from the computer. If the judge could not tell the difference the computer won the game.法官要求另外两名参与者进行对话。当它们回应时,法官需要决定哪个回应来自计算机。如果法官无法分辨差异,计算机就赢得了游戏。
The test continues today as an annual competition in artificial intelligence. The aim is simple enough: convince the judge that they are chatting to a human instead of a computer chatbot program.
这一测试至今仍作为人工智能领域的年度竞赛延续。目标很简单:说服法官,让他们相信自己正在与人类而非计算机聊天机器人程序交流。
381. Explain the Difference Between Classification and Regression?
解释分类和回归之间的区别?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dac | 官方: 否 | 付费: 否
答案:
Classification is used to produce discrete results, classification is used to classify data into some specific categories. For example, classifying emails into spam and non-spam categories.
分类用于产生离散结果,用于将数据分类到特定类别中。例如,将电子邮件分类为垃圾邮件和非垃圾邮件类别。
Whereas, regression deals with continuous data. For example, predicting stock prices at a certain point in time.
而回归则处理连续数据。例如,预测某一时间点的股票价格。
Classification is used to predict the output into a group of classes. For example, Is it Hot or Cold tomorrow?
分类用于将输出预测为一组类别之一。例如,明天是热还是冷?
Whereas, regression is used to predict the relationship that data represents. For example, What is the temperature tomorrow?
而回归则用于预测数据所代表的关系。例如,明天的温度是多少?
382. What is Bias in Machine Learning?
机器学习中的偏差是什么?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1daf | 官方: 否 | 付费: 否
答案:
Bias in data tells us there is inconsistency in data. The inconsistency may occur for several reasons which are not mutually exclusive.
数据中的偏差告诉我们数据存在不一致性。这种不一致性可能由多种原因引起,这些原因并非互斥。
For example, a tech giant like Amazon to speed the hiring process they build one engine where they are going to give 100 resumes, it will spit out the top five, and hire those.
例如,像亚马逊这样的科技巨头为了加快招聘流程,构建了一个引擎,输入100份简历,它会选出前五名,然后聘用这些候选人。
When the company realized the software was not producing gender-neutral results it was tweaked to remove this bias.
当公司意识到该软件未产生性别中立的结果时,它被调整以消除这一偏差。
383. What are Support Vectors in SVM?
SVM中的支持向量是什么?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1db7 | 官方: 否 | 付费: 否
答案:
A Support Vector Machine (SVM) is an algorithm that tries to fit a line (or plane or hyperplane) between the different classes that maximizes the distance from the line to the points of the classes.
支持向量机(SVM)是一种算法,它试图在不同类别之间拟合一条线(或平面或超平面),使该线到类别数据点的距离最大化。
In this way, it tries to find a robust separation between the classes. The Support Vectors are the points of the edge of the dividing hyperplane as in the below figure.
通过这种方式,它试图找到类别之间的稳健分离。支持向量是分割超平面边缘上的点,如下图所示。
Support Vector Machine (SVM)
支持向量机(SVM)
384. Explain SVM Algorithm in Detail
详细解释SVM算法
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dba | 官方: 否 | 付费: 否
答案:
A Support Vector Machine (SVM) is a very powerful and versatile supervised machine learning model, capable of performing linear or non-linear classification, regression, and even outlier detection.
支持向量机(SVM)是一种非常强大且多功能的有监督机器学习模型,能够执行线性或非线性分类、回归,甚至异常检测。
Suppose we have given some data points that each belong to one of two classes, and the goal is to separate two classes based on a set of examples.
假设我们有一些数据点,每个数据点属于两个类别之一,目标是根据一组示例将两个类别分开。
In SVM, a data point is viewed as a p-dimensional vector (a list of p numbers), and we wanted to know whether we can separate such points with a (p-1)-dimensional hyperplane. This is called a linear classifier.
在SVM中,一个数据点被视为一个p维向量(p个数字的列表),我们想知道是否可以用一个(p-1)维超平面来分离这些点。这被称为线性分类器。
There are many hyperplanes that classify the data. To choose the best hyperplane that represents the largest separation or margin between the two classes. If such a hyperplane exists, it is known as a maximum-margin hyperplane and the linear classifier it defines is known as a maximum margin classifier. The best hyperplane that divides the data in H3
有许多超平面可以对数据进行分类。为了选择最佳超平面,它应代表两个类别之间最大的分离或间隔。如果这样的超平面存在,它被称为最大间隔超平面,其定义的线性分类器被称为最大间隔分类器。将数据H3分开的最佳超平面
We have data (x1, y1), ..., (xn, yn), and different features (xii, ..., xip), and yiis either 1 or -1.
我们有数据(x1, y1),...,(xn, yn),以及不同的特征(xi1, ..., xip),其中yi要么是1要么是-1。
The equation of the hyperplane H3 is the set of points satisfying:
超平面H3的方程是满足以下条件的点的集合:
w. x-b = 0
w·x - b = 0
Where w is the normal vector of the hyperplane. The parameter b||w||determines the offset of the hyperplane from the original along the normal vector w
其中w是超平面的法向量。参数b/||w||决定了超平面沿法向量w从原点偏移的距离
So for each i, either xiis in the hyperplane of 1 or -1. Basically, xisatisfies:
因此,对于每个i,要么xi在1的超平面上,要么在-1的超平面上。基本上,xi满足:
w . xi - b = 1 or w. xi - b = -1
w·xi - b = 1 或 w·xi - b = -1
Support Vector Machine (SVM)
支持向量机(SVM)
385. What is PCA? When do you use it?
什么是PCA?你什么时候使用它?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dbd | 官方: 否 | 付费: 否
答案:
Principal component analysis (PCA) is most commonly used for dimension reduction.
主成分分析(PCA)最常用于降维。
In this case, PCA measures the variation in each variable (or column in the table). If there is little variation, it throws the variable out, as illustrated in the figure below:
在这种情况下,PCA测量每个变量(或表中的列)的变异程度。如果变异很小,它会丢弃该变量,如下图所示:
Principal component analysis (PCA)
主成分分析(PCA)
Thus making the dataset easier to visualize. PCA is used in finance, neuroscience, and pharmacology.
从而使数据集更易于可视化。PCA 在金融、神经科学和药理学中都有应用。
It is very useful as a preprocessing step, especially when there are linear correlations between features.
它作为一个预处理步骤非常有用,尤其是在特征之间存在线性相关性时。
386. What is ‘Naive’ in a Naive Bayes?
朴素贝叶斯中的“朴素”是什么?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dc0 | 官方: 否 | 付费: 否
答案:
The Naive Bayes method is a supervised learning algorithm, it is naive since it makes assumptions by applying Bayes’ theorem that all attributes are independent of each other.
朴素贝叶斯方法是一种监督学习算法,它之所以被称为“朴素”,是因为它通过应用贝叶斯定理做出假设,即所有属性相互独立。
Bayes’ theorem states the following relationship, given class variable y and dependent vector x1 through xn:
贝叶斯定理陈述了以下关系,给定类变量 y 和依赖向量 x1 到 xn:
P(yi | x1,..., xn) =P(yi)P(x1,..., xn | yi)(P(x1,..., xn)
P(yi | x1,..., xn) =P(yi)P(x1,..., xn | yi)(P(x1,..., xn)
Using the naive conditional independence assumption that each xiis independent: for all I this relationship is simplified to:
使用每个 xi 独立的朴素条件独立性假设:对于所有 i,此关系简化为:
P(xi | yi, x1, ..., xi-1, xi+1, ...., xn) = P(xi | yi)
P(xi | yi, x1, ..., xi-1, xi+1, ...., xn) = P(xi | yi)
Since, P(x1,..., xn) is a constant given the input, we can use the following classification rule:
由于给定输入时,P(x1,..., xn) 是一个常量,我们可以使用以下分类规则:
P(yi | x1, ..., xn) = P(y) ni=1P(xi | yi)P(x1,...,xn) and we can also use Maximum A Posteriori (MAP) estimation to estimate P(yi)and P(yi | xi) the former is then the relative frequency of class yin the training set.
P(yi | x1, ..., xn) = P(y) ni=1P(xi | yi)P(x1,...,xn),并且我们还可以使用最大后验概率(MAP)估计来估计 P(yi) 和 P(yi | xi),前者即为训练集中类 y 的相对频率。
P(yi | x1,..., xn) P(yi) ni=1P(xi | yi)
P(yi | x1,..., xn) P(yi) ni=1P(xi | yi)
y = arg max P(yi)ni=1P(xi | yi)
y = arg max P(yi)ni=1P(xi | yi)
The different naive Bayes classifiers mainly differ by the assumptions they make regarding the distribution of P(yi | xi): can be Bernoulli, binomial, Gaussian, and so on.
不同的朴素贝叶斯分类器主要区别在于它们对 P(yi | xi) 分布所做的假设:可以是伯努利分布、二项分布、高斯分布等。
387. What is Unsupervised Learning?
什么是无监督学习?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dc4 | 官方: 否 | 付费: 否
答案:
Unsupervised learning is also a type of machine learning algorithm used to find patterns on the set of data given. In this, we don’t have any dependent variable or label to predict. Unsupervised Learning Algorithms: - Clustering,
无监督学习也是一种机器学习算法类型,用于在给定数据集中发现模式。在这种情况下,我们没有需要预测的因变量或标签。无监督学习算法:- 聚类,
- Anomaly Detection,
Neural Networks and Latent Variable Models.
Example:示例:
In the same example, a T-shirt clustering will categorize as “collar style and V neck style”, “crew neck style” and “sleeve types”.
在同一个示例中,T恤聚类将分类为“领口风格和V领风格”、“圆领风格”和“袖子类型”。
388. What is Supervised Learning?
什么是监督学习?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dc8 | 官方: 否 | 付费: 否
答案:
Supervised learning is a machine learning algorithm of inferring a function from labeled training data. The training data consists of a set of training examples.
监督学习是一种从带标签的训练数据中推断函数的机器学习算法。训练数据由一组训练样本组成。
Example: 01
示例:01
Knowing the height and weight identifying the gender of the person. Below are the popular supervised learning algorithms. - Support Vector Machines
知道身高和体重来识别人的性别。以下是流行的监督学习算法。- 支持向量机
- Regression
- Naive Bayes
- Decision Trees
K-nearest Neighbour Algorithm and Neural Networks.
Example: 02示例:02
If you build a T-shirt classifier, the labels will be “this is an S, this is an M and this is L”, based on showing the classifier examples of S, M, and L.
如果你构建一个T恤分类器,标签将是“这是S号,这是M号,这是L号”,基于向分类器展示S、M和L号的样本。
389. What are Different Types of Machine Learning algorithms?
机器学习算法有哪些不同类型?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dcb | 官方: 否 | 付费: 否
答案:
There are various types of machine learning algorithms. Here is the list of them in a broad category based on: - Whether they are trained with human supervision (Supervised, unsupervised, reinforcement learning)
机器学习算法有多种类型。以下是它们基于广泛类别的列表:- 是否经过人工监督训练(监督学习、无监督学习、强化学习)
- The criteria in the below diagram are not exclusive, we can combine them any way we like.
Types of Machine Learning algorithms
机器学习算法的类型
Advanced Machine Learning Questions
390. What is F1 score? How would you use it?
什么是F1分数?你会如何使用它?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dce | 官方: 否 | 付费: 否
答案:
Let’s have a look at this table before directly jumping into the F1 score.
在直接跳到F1分数之前,让我们先看下这个表格。
| Prediction 预测 | Predicted Yes 预测为是 | Predicted No 预测为否 |
|---|---|---|
| Actual Yes 实际为是 | True Positive (TP) 真正例(TP) | False Negative (FN) 假负例(FN) |
| Actual No 实际为否 | False Positive (FP) 假正例(FP) | True Negative (TN) 真负例(TN) |
In binary classification we consider the F1 score to be a measure of the model’s accuracy. The F1 score is a weighted average of precision and recall scores.
在二分类中,我们认为F1分数是衡量模型准确性的指标。F1分数是精确率和召回率分数的加权平均值。
F1 = 2TP/2TP + FP + FN
F1 = 2TP/2TP + FP + FN
We see scores for F1 between 0 and 1, where 0 is the worst score and 1 is the best score. The F1 score is typically used in information retrieval to see how well a model retrieves relevant results and our model is performing.
我们看到F1分数在0到1之间,其中0是最差分数,1是最佳分数。F1分数通常用于信息检索中,以评估模型检索相关结果的效果以及我们模型的执行情况。
391. Define Precision and Recall?
定义精确率和召回率?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dd1 | 官方: 否 | 付费: 否
答案:
Precision and recall are ways of monitoring the power of machine learning implementation. But they often used at the same time.
精确率和召回率是监控机器学习实现性能的方式,但通常它们会同时使用。
Precision answers the question, “Out of the items that the classifier predicted to be relevant, how many are truly relevant?”
精确率回答的问题是:“在分类器预测为相关的项目中,有多少是真正相关的?”
Whereas, recall answers the question, “Out of all the items that are truly relevant, how many are found by the classifier?
而召回率回答的问题是:“在所有真正相关的项目中,分类器找到了多少?”
In general, the meaning of precision is the fact of being exact and accurate. So the same will go in our machine learning model as well. If you have a set of items that your model needs to predict to be relevant. How many items are truly relevant?
通常,精确率的含义是准确和精确的事实。所以在我们的机器学习模型中也是如此。如果你有一组模型需要预测为相关的项目,那么有多少项目是真正相关的?
The below figure shows the Venn diagram that precision and recall.
下图展示了精确率和召回率的维恩图。
Precision and recall
精确率和召回率
Mathematically, precision and recall can be defined as the following:
从数学上讲,精确率和召回率可以定义如下:
precision = # happy correct answers/# total items returned by ranker
精确率 = # 正确满意答案 / # 排序器返回的总项目数
recall = # happy correct answers/# total relevant answers
召回率 = # 正确满意答案 / # 总相关答案数
392. How to Tackle Overfitting and Underfitting?
如何解决过拟合和欠拟合?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dd4 | 官方: 否 | 付费: 否
答案:
Overfitting means the model fitted to training data too well , in this case, we need to resample the data and estimate the model accuracy using techniques like k-fold cross-validation.
过拟合意味着模型对训练数据拟合得过于完美,在这种情况下,我们需要重新采样数据,并使用像k折交叉验证这样的技术来估计模型准确率。
Whereas for the Underfitting case we are not able to understand or capture the patterns from the data, in this case, we need to change the algorithms, or we need to feed more data points to the model.
而对于欠拟合的情况,我们无法理解或捕获数据中的模式,在这种情况下,我们需要改变算法,或者需要向模型提供更多数据点。
393. What is a Neural Network?
什么是神经网络?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dd7 | 官方: 否 | 付费: 否
答案:
It is a simplified model of the human brain. Much like the brain, it has neurons that activate when encountering something similar.
它是人脑的简化模型。类似于大脑,它有神经元,当遇到相似事物时会激活。
The different neurons are connected via connections that help information flow from one neuron to another.
不同的神经元通过连接相连,帮助信息从一个神经元流向另一个神经元。
394. What are Loss Function and Cost Functions? Explain the key Difference Between them?
什么是损失函数和代价函数?解释它们之间的主要区别?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dda | 官方: 否 | 付费: 否
答案:
When calculating loss we consider only a single data point, then we use the term loss function.
当计算损失时,我们只考虑单个数据点,这时我们使用术语“损失函数”。
Whereas, when calculating the sum of error for multiple data then we use the cost function. There is no major difference.
而当我们计算多个数据的误差总和时,则使用“代价函数”。两者没有重大区别。
In other words, the loss function is to capture the difference between the actual and predicted values for a single record whereas cost functions aggregate the difference for the entire training dataset.
换句话说,损失函数用于捕获单条记录的实际值与预测值之间的差异,而代价函数则聚合整个训练数据集的差异。
The Most commonly used loss functions are Mean-squared error and Hinge loss.
最常用的损失函数是均方误差和合页损失。
Mean-Squared Error(MSE): In simple words, we can say how our model predicted values against the actual values.
均方误差(MSE):简单来说,它表示我们的模型预测值相对于实际值的情况。
MSE = √(predicted value - actual value)2
MSE = √(预测值 - 实际值)2
Hinge loss: It is used to train the machine learning classifier, which is
合页损失:它用于训练机器学习分类器,该分类器是
L(y) = max(0,1- yy)
L(y) = max(0,1- yy)
Where y = -1 or 1 indicating two classes and y represents the output form of the classifier. The most common cost function represents the total cost as the sum of the fixed costs and the variable costs in the equation y = mx + b
其中 y = -1 或 1 表示两个类别,y 表示分类器的输出形式。最常见的代价函数在方程 y = mx + b 中表示总成本为固定成本与可变成本之和。
395. What is Ensemble learning?
什么是集成学习?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dde | 官方: 否 | 付费: 否
答案:
Ensemble learning is a method that combines multiple machine learning models to create more powerful models.
集成学习是一种将多个机器学习模型组合起来以创建更强大模型的方法。
There are many reasons for a model to be different. Few reasons are: - Different Population
模型之间存在差异的原因有很多。几个原因是:- 不同的总体
- Different Hypothesis
Different modeling techniques
When working with the model’s training and testing data, we will experience an error. This error might be bias, variance, and irreducible error.在处理模型的训练和测试数据时,我们会遇到一种误差。这种误差可能是偏差、方差和不可约误差。
Now the model should always have a balance between bias and variance, which we call a bias-variance trade-off.
现在模型应该在偏差和方差之间始终保持平衡,我们称之为偏差-方差权衡。
This ensemble learning is a way to perform this trade-off.
这种集成学习就是实现这种权衡的一种方式。
There are many ensemble techniques available but when aggregating multiple models there are two general methods: - Bagging, a native method: take the training set and generate new training sets off of it.
有许多可用的集成技术,但在聚合多个模型时,有两种通用方法:- Bagging(自助聚合),一种原生方法:取训练集并从中生成新的训练集。
- Boosting, a more elegant method: similar to bagging, boosting is used to optimize the best weighting scheme for a training set.
396. How do you make sure which Machine Learning Algorithm to use?
如何确定使用哪种机器学习算法?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b8d58d557c902bb1de1 | 官方: 否 | 付费: 否
答案:
It completely depends on the dataset we have. If the data is discrete we use SVM. If the dataset is continuous we use linear regression.
这完全取决于我们拥有的数据集。如果数据是离散的,我们使用SVM。如果数据集是连续的,我们使用线性回归。
So there is no specific way that lets us know which ML algorithm to use, it all depends on the exploratory data analysis (EDA).
因此,没有特定方法能让我们知道使用哪种ML算法,这完全取决于探索性数据分析(EDA)。
EDA is like “interviewing” the dataset; As part of our interview we do the following: - Classify our variables as continuous, categorical, and so forth.
EDA就像“面试”数据集;作为面试的一部分,我们执行以下操作:- 将我们的变量分类为连续、分类等。
- Summarize our variables using descriptive statistics.
Visualize our variables using charts.
Based on the above observations select one best-fit algorithm for a particular dataset.基于上述观察,为特定数据集选择一个最佳拟合算法。
397. How to Handle Outlier Values?
如何处理异常值?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1de4 | 官方: 否 | 付费: 否
答案:
An Outlier is an observation in the dataset that is far away from other observations in the dataset. Tools used to discover outliers are - Box plot
异常值是数据集中远离其他观测值的观测值。用于发现异常值的工具包括-箱线图。
- Z-score
Scatter plot, etc.
Typically, we need to follow three simple strategies to handle outliers: - We can drop them.通常,我们需要遵循三种简单策略来处理异常值:- 我们可以删除它们。
- We can mark them as outliers and include them as a feature.
- Likewise, we can transform the feature to reduce the effect of the outlier.
398. What is a Random Forest? How does it work?
什么是随机森林?它是如何工作的?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1deb | 官方: 否 | 付费: 否
答案:
Random forest is a versatile machine learning method capable of performing both regression and classification tasks.
随机森林是一种多功能的机器学习方法,能够执行回归和分类任务。
Like bagging and boosting, random forest works by combining a set of other tree models. Random forest builds a tree from a random sample of the columns in the test data.
像bagging和boosting一样,随机森林通过组合一组其他树模型来工作。随机森林从测试数据中随机采样列来构建一棵树。
Here’s are the steps how a random forest creates the trees: - Take a sample size from the training data.
以下是随机森林创建树的步骤:- 从训练数据中取一个样本量。
- Begin with a single node.
Run the following algorithm, from the start node:
If the number of observations is less than node size then stop. Select random variables. Find the variable that does the “best” job of splitting the observations. Split the observations into two nodes. Call step a on each of these nodes.如果观测数小于节点大小,则停止。选择随机变量。找到能“最佳”分割观测的变量。将观测分成两个节点。在每个节点上调用步骤a。
399. What is Collaborative Filtering? And Content-Based Filtering?
什么是协同过滤?以及基于内容的过滤?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dee | 官方: 否 | 付费: 否
答案:
Collaborative filtering is a proven technique for personalized content recommendations. Collaborative filtering is a type of recommendation system that predicts new content by matching the interests of the individual user with the preferences of many users.
协同过滤是一种经过验证的个性化内容推荐技术。协同过滤是一种推荐系统类型,通过将个体用户的兴趣与许多用户的偏好相匹配来预测新内容。
Content-based recommender systems are focused only on the preferences of the user. New recommendations are made to the user from similar content according to the user’s previous choices.
基于内容的推荐系统只关注用户的偏好。新推荐是根据用户之前的选择从相似内容中生成的。
Collaborative Filtering and Content-Based Filtering
协同过滤和基于内容的过滤
400. What is Clustering?
什么是聚类?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1df1 | 官方: 否 | 付费: 否
答案:
Clustering is the process of grouping a set of objects into a number of groups. Objects should be similar to one another within the same cluster and dissimilar to those in other clusters.
聚类是将一组对象分成若干组的过程。同一聚类中的对象应彼此相似,而与其他聚类中的对象不相似。
A few types of clustering are: - Hierarchical clustering
几种聚类类型包括:- 层次聚类
- K means clustering
- Density-based clustering
- Fuzzy clustering, etc.
401. How can you select K for K-means Clustering?
如何为K-means聚类选择K值?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1df4 | 官方: 否 | 付费: 否
答案:
There are two kinds of methods that include direct methods and statistical testing methods: - Direct methods: It contains elbow and silhouette
有两种方法,包括直接方法和统计检验方法:- 直接方法:包括肘部法和轮廓系数法
Statistical testing methods: It has gap statistics.
The silhouette is the most frequently used while determining the optimal value of k.轮廓系数在确定k的最优值时最常用。
402. What are Recommender Systems?
什么是推荐系统?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1df7 | 官方: 否 | 付费: 否
答案:
A recommendation engine is a system used to predict users’ interests and recommend products that are quite likely interesting for them.
推荐引擎是一种用于预测用户兴趣并推荐他们可能感兴趣产品的系统。
Data required for recommender systems stems from explicit user ratings after watching a film or listening to a song, from implicit search engine queries and purchase histories, or from other knowledge about the users/items themselves.
推荐系统所需的数据来源于用户在观看电影或听歌曲后的显式评分、隐式搜索引擎查询和购买历史,或有关用户/物品本身的其他知识。
403. How do check the Normality of a dataset?
如何检查数据集的正态性?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dfa | 官方: 否 | 付费: 否
答案:
Visually, we can use plots. A few of the normality checks are as follows: - Shapiro-Wilk Test
从视觉上,我们可以使用图表。一些正态性检查如下:- Shapiro-Wilk检验
- Anderson-Darling Test
- Martinez-Iglewicz Test
- Kolmogorov-Smirnov Test
- D’Agostino Skewness Test
404. Can logistic regression use for more than 2 classes?
逻辑回归能用于超过2个类别吗?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1dfd | 官方: 否 | 付费: 否
答案:
No, by default logistic regression is a binary classifier, so it cannot be applied to more than 2 classes. However, it can be extended for solving multi-class classification problems (multinomial logistic regression)
不能,默认情况下逻辑回归是二分类器,因此不能应用于超过2个类别。然而,它可以扩展用于解决多类分类问题(多项逻辑回归)
405. Explain Correlation and Covariance?
解释相关性和协方差?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1e00 | 官方: 否 | 付费: 否
答案:
Correlation is used for measuring and also for estimating the quantitative relationship between two variables. Correlation measures how strongly two variables are related. Examples like, income and expenditure, demand and supply, etc.
相关分析用于测量并估计两个变量之间的定量关系。相关性衡量两个变量之间关系的强度。例如,收入与支出、需求与供给等。
Covariance is a simple way to measure the correlation between two variables. The problem with covariance is that they are hard to compare without normalization.
协方差是衡量两个变量之间相关性的一种简单方法。协方差的问题在于,没有归一化的情况下,它们难以进行比较。
406. What is P-value?
什么是P值?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1e03 | 官方: 否 | 付费: 否
答案:
P-values are used to make a decision about a hypothesis test. P-value is the minimum significant level at which you can reject the null hypothesis. The lower the p-value, the more likely you reject the null hypothesis.
P值用于对假设检验做出决策。P值是在该显著性水平下可以拒绝零假设的最小显著水平。P值越低,拒绝零假设的可能性越大。
407. What are Parametric and Non-Parametric Models?
什么是参数模型和非参数模型?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1e08 | 官方: 否 | 付费: 否
答案:
Parametric models will have limited parameters and to predict new data, you only need to know the parameter of the model.
参数模型具有有限的参数,要预测新数据,只需要知道模型的参数即可。
Non-Parametric models have no limits in taking a number of parameters, allowing for more flexibility and to predict new data. You need to know the state of the data and model parameters.
非参数模型在参数数量上没有限制,提供了更大的灵活性,并能预测新数据。您需要了解数据的状态和模型参数。
408. What is Reinforcement Learning?
什么是强化学习?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37b8d58d557c902bb1e0c | 官方: 否 | 付费: 否
答案:
Reinforcement learning is different from the other types of learning like supervised and unsupervised. In reinforcement learning, we are given neither data nor labels. Our learning is based on the rewards given to the agent by the environment.
强化学习不同于其他类型的学习,如监督学习和无监督学习。在强化学习中,既没有给数据也没有给标签。我们的学习基于环境给予智能体的奖励。
409. Difference Between Sigmoid and Softmax functions?
Sigmoid和Softmax函数有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: machine-learning, ai;标签: interviewbit, machine-learning, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37b8d58d557c902bb1e0f | 官方: 否 | 付费: 否
答案:
The sigmoid function is used for binary classification. The probabilities sum needs to be 1. Whereas, Softmax function is used for multi-classification. The probabilities sum will be 1.
Sigmoid函数用于二分类,概率之和必须等于1。而Softmax函数用于多分类,概率之和将为1。
Conclusion
结论
The above-listed questions are the basics of machine learning. Machine learning is advancing so fast hence new concepts will emerge. So to get up to date with that join communities, attend conferences, read research papers. By doing so you can crack any ML interview.
上述列出的问题是机器学习的基础。机器学习发展迅速,因此新概念会不断涌现。为了保持更新,请加入社区、参加会议、阅读研究论文。通过这样做,您可以应对任何机器学习面试。
Additional Resources
其他资源
- Practice Coding
- Best Machine Learning Courses
- Best Data Science Courses
- Free Deep Learning Course with Certification
- Python Interview Questions
- AI MCQs
- Machine Learning Engineer: Career Guide
- Deep Learning Interview
- Machine Learning Engineer Salary
- Machine Learning Vs Data Science
- Machine Learning Vs Deep Learning
- Difference Between Artificial Intelligence and Machine Learning
- Additional 100+ Machine Learning Interview Questions and Answers
410. What are Artificial intelligence and Machine Learning? What is the difference between them?
什么是人工智能和机器学习?它们之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, nagarro, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: Nagarro
- id: 69b37bf958d557c902bb6176 | 官方: 否 | 付费: 否
答案:
Artificial intelligence (AI) is the ability of a machine to behave like a human. AI is a field in computer science that deals with the creation of machines that can perform tasks normally requiring human intelligence. AI has many potential uses, including automated planning, speech recognition, and translation. AI has been used in both government and industry for many years.
人工智能(AI)是机器表现得像人类的能力。AI 是计算机科学中的一个领域,涉及创建能够执行通常需要人类智能的任务的机器。AI 有许多潜在用途,包括自动化规划、语音识别和翻译。AI 多年来已应用于政府和工业领域。
As AI becomes more sophisticated, more applications are emerging. AI can be broken into two main categories: Supervised learning and Unsupervised learning. - In supervised learning, an algorithm trains on large amounts of data and learns from this data.
随着 AI 变得更加复杂,越来越多的应用正在涌现。AI 可以分为两大类:监督学习和无监督学习。- 在监督学习中,算法在大量数据上进行训练并从这些数据中学习。
Unsupervised learning does not require a training set; instead, it learns from unlabeled data and then labels the data using its own parameters.
Machine learning is different from AI because it focuses on algorithms that learn how to detect patterns in data without being explicitly programmed to do so. It is also different from AI in that it does not involve creating a machine that behaves as a human would. Rather, it involves creating algorithms that can extract useful information from data sets.机器学习与人工智能不同,因为它专注于那些无需明确编程就能学会检测数据中模式的算法。它也与人工智能不同,因为不涉及创建行为像人类的机器,而是涉及创建能从数据集中提取有用信息的算法。
411. What are the stages in the lifecycle of a natural language processing (NLP) project?
自然语言处理(NLP)项目生命周期中有哪些阶段?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6360 | 官方: 否 | 付费: 否
答案:
Following are the stages in the lifecycle of a natural language processing (NLP) project:
以下是自然语言处理(NLP)项目生命周期的各个阶段:
- Data Collection: The procedure of collecting, measuring, and evaluating correct insights for research using established approved procedures is referred to as data collection.
- Data Cleaning: The practice of correcting or deleting incorrect, corrupted, improperly formatted, duplicate, or incomplete data from a dataset is known as data cleaning.
- Data Pre-Processing: The process of converting raw data into a comprehensible format is known as data preparation.
- Feature Engineering: Feature engineering is the process of extracting features (characteristics, qualities, and attributes) from raw data using domain expertise.
- Data Modeling: The practice of examining data objects and their relationships with other things is known as data modelling. It's utilised to look into the data requirements for various business activities.
- Model Evaluation: Model evaluation is an important step in the creation of a model. It aids in the selection of the best model to represent our data and the prediction of how well the chosen model will perform in the future.
- Model Deployment: The technical task of exposing an ML model to real-world use is known as model deployment.
- Monitoring and Updating: The activity of measuring and analysing production model performance to ensure acceptable quality as defined by the use case is known as machine learning monitoring. It delivers alerts about performance difficulties and assists in diagnosing and resolving the core cause.
412. What do you mean by Lemmatization in NLP?
在NLP中,词形还原是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6363 | 官方: 否 | 付费: 否
答案:
The method of mapping all the various forms of a word to its base word (also called “lemma”) is known as Lemmatization. Although this may appear close to the definition of stemming, these are actually different. For instance, the word “better,” after stemming, remains the same. However, upon lemmatization, this should become “good,”. Lemmatization needs greater linguistic knowledge. Modelling and developing efficient lemmatizers still remains an open problem in NLP research.
将单词的各种形式映射到其基本词(也称为“词元”)的方法称为词形还原。尽管这看起来与词干提取的定义相似,但实际上它们是不同的。例如,单词“better”,经过词干提取后保持不变。然而,经过词形还原后,它应变为“good”。词形还原需要更多的语言学知识。建模和开发高效词形还原器仍然是NLP研究中的一个开放问题。
The application of a lemmatizer based on WordNet from NLTK is shown in the code snippet below:
以下代码片段展示了基于NLTK中WordNet的词形还原器(lemmatizer)的应用:
from nltk.stem import WordNetLemmatizer
from nltk.stem import WordNetLemmatizer
lemmatizer = WordnetLemmatizer()
lemmatizer = WordnetLemmatizer()
print(lemmatizer.lemmatize("better", pos="a")) #a is for adjective
print(lemmatizer.lemmatize("better", pos="a")) #a表示形容词
413. What do you mean by Stemming in NLP?
在自然语言处理中,词干提取(Stemming)是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6366 | 官方: 否 | 付费: 否
答案:
When we remove the suffixes from a word so that the word is reduced to its base form, this process is called stemming. When the word is reduced to its base form, all the different variants of that word can be represented by the same form (e.g., “bird” and “birds” are both reduced to “bird”).
当我们从一个单词中移除后缀,使其缩减到基本形式时,这个过程称为词干提取。当单词被缩减到基本形式时,该单词的所有不同变体都可以用相同的形式表示(例如,“bird”和“birds”都被缩减为“bird”)。
We can do this by using a fixed set of rules. For instance: if a word ends in “-es,” we can remove the “-es”).
我们可以通过使用一组固定的规则来实现这一点。例如:如果一个单词以“-es”结尾,我们可以移除“-es”)。
Even though these rules might not really make sense as a linguistically correct base form, stemming is usually carried out to match user queries in search engines to relevant documents. And in text classification, is done to reduce the feature space to train our machine learning (ML) models.
尽管这些规则在语言学上可能并不真正构成正确的基本形式,但词干提取通常用于将搜索引擎中的用户查询与相关文档匹配。在文本分类中,它用于减少特征空间以训练我们的机器学习(ML)模型。
The code snippet given below depicts the way to use a well known NLP algorithm for stemming called Porter Stemmer using NLTK:
下面给出的代码片段展示了如何使用一个著名的自然语言处理算法——Porter词干提取器(Porter Stemmer),并通过NLTK实现:
from nltk.stem.porter import PorterStemmer
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
stemmer = PorterStemmer()
word1, word2 = "bikes", "revolution"
word1, word2 = "bikes", "revolution"
print(stemmer.stem(word1), stemmer.stem(word2))
print(stemmer.stem(word1), stemmer.stem(word2))
This gives “bike” as the stemmed version for “bikes,” but “revolut” as the stemmed form of “revolution,” even though the latter is not linguistically correct. Even if this might not affect the performance of the search engine, a derivation of the correct linguistic form becomes useful in some other cases. This can be done by another process that is closer to stemming, known as lemmatization.
这将“bikes”的词干版本输出为“bike”,但“revolution”的词干形式输出为“revolut”,尽管后者在语言学上并不正确。即使这可能不会影响搜索引擎的性能,但在某些其他情况下,推导出正确的语言学形式会变得有用。这可以通过另一个与词干提取更接近的过程来完成,即词形还原(lemmatization)。
414. What are the steps involved in preprocessing data for NLP?
为自然语言处理预处理数据涉及哪些步骤?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6369 | 官方: 否 | 付费: 否
答案:
Here are some common pre-processing steps used in NLP software: - Preliminaries: This includes word tokenization and sentence segmentation.
以下是自然语言处理软件中常用的一些预处理步骤:- 初步处理:包括单词分词和句子分割。
- Common Steps: Stop word removal, stemming and lemmatization, removing digits/punctuation, lowercasing, etc.
- Processing Steps: Code mixing, normalization, language detection, transliteration, etc.
- Advanced Processing: Parts of Speech (POS) tagging, coreference resolution, parsing, etc.
415. What do you mean by Text Extraction and Cleanup?
文本提取与清理是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb636c | 官方: 否 | 付费: 否
答案:
The process of extracting raw text from the input data by getting rid of all the other non-textual information, such as markup, metadata, etc., and converting the text to the required encoding format is called text extraction and cleanup . Usually, this depends on the format of available data for the required project.
从输入数据中提取原始文本,去除所有其他非文本信息(如标记、元数据等),并将文本转换为所需编码格式的过程称为文本提取与清理。通常,这取决于所需项目可用数据的格式。
Following are the common ways used for Text Extraction in NLP: - Named Entity Recognition
以下是NLP中用于文本提取的常见方法:- 命名实体识别
- Sentiment Analysis
- Text Summarization
- Aspect Mining
- Topic Modeling
- Data Science
- All Events
- My Events
416. How can data be obtained for NLP projects?
如何为NLP项目获取数据?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb636f | 官方: 否 | 付费: 否
答案:
There are multiple ways in which data can be obtained for NLP projects. Some of them are as follows: - Using publicly available datasets: Datasets for NLP purposes are available on websites like Kaggle as well as Google Datasets.
有多种方式可以为NLP项目获取数据。其中一些如下:- 使用公开可用的数据集:用于NLP目的的数据集可在Kaggle和Google数据集等网站上获取。
- By using data augmentation: These are used to create additional datasets from existing datasets.
- Scraping data from the web: Using coding in Python or other languages once can scrape data from websites that are usually not readily available in a structured form.
417. What is meant by data augmentation? What are some of the ways in which data augmentation can be done in NLP projects?
数据增强是什么意思?在NLP项目中,有哪些方式可以进行数据增强?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6372 | 官方: 否 | 付费: 否
答案:
NLP has some methods through which we can take a small dataset and use that in order to create more data. This is called data augmentation. In this, we use language properties to create text that is syntactically similar to the source text data.
NLP有一些方法,我们可以通过这些小数据集来创建更多数据。这称为数据增强。在此过程中,我们利用语言属性来生成与源文本数据在句法上相似的文本。
Some of the ways in which data augmentation can be done in NLP projects are as follows: - Replacing entities
在NLP项目中,可以进行数据增强的一些方式如下:- 替换实体
- TF-IDF–based word replacement
- Adding noise to data
- Back translation
- Synonym replacement
- Bigram flipping
418. How do Conversational Agents work?
对话代理是如何工作的?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6375 | 官方: 否 | 付费: 否
答案:
The following NLP components are used in Conversational Agents: - Speech Recognition and Synthesis: In the first stage, speech recognition helps convert speech signals to their phonemes, and are then transcribed as words.
对话代理中使用了以下NLP组件:- 语音识别与合成:在第一阶段,语音识别帮助将语音信号转换为音素,然后转写为单词。
- Natural Language Understanding (NLU): Here, the transcribed text from stage one is further analysed through AI techniques within the natural language understanding system. Certain NLP tasks such as Named Entity Recognition, Text Classification, Language modelling, etc. come into play here.
- Dialog Management: Once the needed information from text is extracted, we move on to the stage of understanding the user’s intent. The user’s response can then be classified by using a text classification system as a pre-defined intent. This helps the conversational agent in figuring out what is actually being asked.
- Generating Response: Based on the above stages, the agent generates an appropriate response that is based on a semantic interpretation of the user’s intent.
419. What are the different approaches used to solve NLP problems?
解决NLP问题有哪些不同的方法?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb6378 | 官方: 否 | 付费: 否
答案:
There are multiple approaches to solving NLP problems. These usually come in 3 categories: - Heuristics
解决NLP问题有多种方法。这些通常分为3类:- 启发式方法
- Machine learning
- Deep Learning
420. What are some of the common NLP tasks?
常见的NLP任务有哪些?
- 知识点: 数据工程与数据科学/AI (主题: nlp, ai;标签: interviewbit, nlp, topic-specific, ai)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37bfc58d557c902bb637b | 官方: 否 | 付费: 否
答案:
Some of the common tasks of NLP include: - Machine Translation: This helps in translating a given piece of text from one language to another.
NLP的一些常见任务包括:- 机器翻译:这有助于将给定的文本从一种语言翻译成另一种语言。
- Text Summarization: Based on a large corpus, this is used to give a short summary that gives an idea of the entire text in the document.
- Language Modeling: Based on the history of previous words, this helps uncover what the further sentence will look like. A good example of this is the auto-complete sentences feature in Gmail.
- Topic Modelling: This helps uncover the topical structure of a large collection of documents. This indicates what topic a piece of text is actually about.
- Question Answering: This helps prepare answers automatically based on a corpus of text, and on a question that is posed.
- Conversational Agent: These are basically voice assistants that we commonly see such as Alexa, Siri, Google Assistant, Cortana, etc.
- Information Retrieval: This helps in fetching relevant documents based on a user’s search query.
- Information Extraction: This is the task of extracting relevant pieces of information from a given text, such as calendar events from emails.
- Text Classification: This is used to create a bucket of categories of a given text, based on its content. This is used in a wide variety of AI-based applications such as sentiment analysis and spam detection.
Common NLP Tasks in order of Difficulty
常见NLP任务按难度排序
421. What are the various Artificial Intelligence (AI) development platforms?
有哪些不同的人工智能(AI)开发平台?
- 知识点: 数据工程与数据科学/AI (标签: interviewbit, ntt-data, company-specific)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: general
- 公司: NTT DATA
- id: 69b37bff58d557c902bb6629 | 官方: 否 | 付费: 否
答案:
There are several platforms that can be used for developing artificial intelligence (AI) applications. Some of the most popular AI development platforms include:
有多种平台可用于开发人工智能(AI)应用。一些最受欢迎的AI开发平台包括:
TensorFlow: TensorFlow is an open-source platform developed by Google for building and training machine learning models. It is widely used in the industry and has a large community of developers and users. 2. Keras: Keras is a high-level neural network API that is built on top of TensorFlow. It is designed to be easy to use and allows developers to build and train machine learning models quickly and easily. 3. Scikit-learn: Scikit-learn is a popular open-source library for machine learning in Python. It provides a range of tools and algorithms for tasks such as classification, regression, clustering, and dimensionality reduction. 4. PyTorch: PyTorch is an open-source machine-learning library developed by Facebook. It is designed to be flexible and easy to use, and it is often used for research and development in the field of AI. 5. Microsoft Azure Machine Learning: Microsoft Azure Machine Learning is a cloud-based platform for developing and deploying machine learning models. It provides a range of tools and services for building, training, and deploying machine learning models at scale.
- TensorFlow:TensorFlow 是由谷歌开发的开源平台,用于构建和训练机器学习模型。它在业界广泛使用,并拥有庞大的开发者社区和用户群。 2. Keras:Keras 是一个基于 TensorFlow 构建的高级神经网络 API。它设计为易于使用,允许开发者快速轻松地构建和训练机器学习模型。 3. Scikit-learn:Scikit-learn 是一个流行的 Python 机器学习开源库。它提供了一系列工具和算法,用于分类、回归、聚类和降维等任务。 4. PyTorch:PyTorch 是由 Facebook 开发的开源机器学习库。它设计为灵活易用,常用于AI领域的研究和开发。 5. Microsoft Azure Machine Learning:Microsoft Azure Machine Learning 是一个基于云的平台,用于开发和部署机器学习模型。它提供了一系列工具和服务,用于大规模构建、训练和部署机器学习模型。
These are just a few examples of the many AI development platforms that are available. The best platform for a particular project will depend on the specific requirements and goals of the project.
这些只是众多可用AI开发平台中的几个例子。特定项目的最佳平台将取决于项目的具体要求和目标。
422. What is NumPy? Why should we use it?
什么是NumPy?我们为什么要使用它?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0058d557c902bb66de | 官方: 否 | 付费: 否
答案:
NumPy (also called Numerical Python) is a highly flexible, optimized, open-source package meant for array processing. It provides tools for delivering high-end performance while dealing with N-dimensional powerful array objects. It is also beneficial for performing scientific computations, mathematical, and logical operations, sorting operations, I/O functions, basic statistical and linear algebra-based operations along with random simulation and broadcasting functionalities. Due to the vast range of capabilities, NumPy has become very popular and is the most preferred package. The following image represents the uses of NumPy.
NumPy(也称为 Numerical Python)是一个高度灵活、优化且开源的数据包,专为数组处理而设计。它提供了在高性能下处理 N 维强大数组对象的工具。它同样适用于科学计算、数学和逻辑运算、排序操作、I/O 函数、基本统计和基于线性代数的运算,以及随机模拟和广播功能。由于功能广泛,NumPy 变得非常流行,成为最受欢迎的数据包。下图展示了 NumPy 的用途。
423. How do you convert Pandas DataFrame to a NumPy array?
如何将 Pandas DataFrame 转换为 NumPy 数组?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66e1 | 官方: 否 | 付费: 否
答案:
The to_numpy() method of the NumPy package can be used to convert Pandas DataFrame, Index and Series objects.
可以使用 NumPy 包的 to_numpy() 方法将 Pandas DataFrame、Index 和 Series 对象转换为数组。
Consider we have a DataFrame df, we can either convert the whole Pandas DataFrame df to NumPy array or even select a subset of Pandas DataFrame to NumPy array by using the to_numpy() method as shown in the example below:
假设我们有一个 DataFrame df,我们可以将整个 Pandas DataFrame df 转换为 NumPy 数组,甚至可以通过使用 to_numpy() 方法选择 Pandas DataFrame 的子集转换为 NumPy 数组,如下例所示:
import pandas as pd
import pandas as pd
import numpy as np
import numpy as np
Pandas DataFrame
df = pd.DataFrame(data={'A': [3, 2, 1], 'B': [6,5,4], 'C': [9, 8, 7]},
df = pd.DataFrame(data={'A': [3, 2, 1], 'B': [6,5,4], 'C': [9, 8, 7]},
index=['i', 'j', 'k'])
index=['i', 'j', 'k'])
print("Pandas DataFrame: ")
print("Pandas DataFrame: ")
print(df)
print(df)
Convert Pandas DataFrame to NumPy Array
np_arr = df.to_numpy()
np_arr = df.to_numpy()
print("Pandas DataFrame to NumPy array: ")
print("Pandas DataFrame to NumPy array: ")
print(np_arr)
print(np_arr)
Convert specific columns of Pandas DataFrame to NumPy array
arr = df[['B', 'C']].to_numpy()
arr = df[['B', 'C']].to_numpy()
print("Convert B and C columns of Pandas DataFrame to NumPy Array: ")
print("Convert B and C columns of Pandas DataFrame to NumPy Array: ")
print (arr)
print (arr)
The output of the above code is
上述代码的输出是
Pandas DataFrame:
Pandas DataFrame:
A B C
A B C
i 3 6 9
i 3 6 9
j 2 5 8
j 2 5 8
k 1 4 7
k 1 4 7
Pandas DataFrame to NumPy array:
Pandas DataFrame 转换为 NumPy 数组:
[[3 6 9]
[2 5 8]
[1 4 7]]
Convert B and C columns of Pandas DataFrame to NumPy Array:
将 Pandas DataFrame 的 B 和 C 列转换为 NumPy 数组:
[[6 9]
[5 8]
[4 7]]
424. How do you concatenate 2 NumPy arrays?
如何连接 2 个 NumPy 数组?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66e4 | 官方: 否 | 付费: 否
答案:
Concatenating 2 arrays by adding elements to the end can be achieved by making use of the concatenate() method of the NumPy package. Syntax:
通过使用 NumPy 包中的 concatenate() 方法,可以通过在末尾添加元素来连接 2 个数组。语法:
np.concatenate((a1, a2, ...), axis=0, out=None)
np.concatenate((a1, a2, ...), axis=0, out=None)
where, - a1,a2: arrays of the same shape
其中,- a1,a2:形状相同的数组
- axis: Represents the axis along which the arrays are joined. The default value is 0.
out: If mentioned, it specifies the destination for placing the result.
For example:例如:
import numpy as np
import numpy as np
a = np.array([[1, 2], [3, 4]])
a = np.array([[1, 2], [3, 4]])
b = np.array([[5, 6]])
b = np.array([[5, 6]])
Concatenate with axis 0
c = np.concatenate((a,b), axis=0)
c = np.concatenate((a,b), axis=0)
print("With axis 0: \n",c )
print("使用轴0:\n",c)
Concatenate with axis 1 (b.T represents transpose matrix)
d = np.concatenate((a,b.T), axis=1)
d = np.concatenate((a,b.T), axis=1)
print("With axis 1: \n",d )
print("使用轴1:\n",d)
The output would be:
输出将是:
With axis 0:
使用轴0:
[[1 2]
[3 4]
[5 6]]
With axis 1:
使用轴1:
[[1 2 5]
[3 4 6]]
Notice how the arrays are concatenated with different values of the axis.
请注意,数组是如何根据轴的不同值进行拼接的。
425. How do you multiply 2 NumPy array matrices?
如何将两个NumPy数组矩阵相乘?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66e7 | 官方: 否 | 付费: 否
答案:
We can make use of the dot() for multiplying matrices represented as NumPy arrays. This is represented in the code snippet below:
我们可以使用dot()函数来相乘表示为NumPy数组的矩阵。这显示在下面的代码片段中:
import numpy as np
import numpy as np
NumPy matrices
A = np.arange(15,24).reshape(3,3)
A = np.arange(15,24).reshape(3,3)
B = np.arange(20,29).reshape(3,3)
B = np.arange(20,29).reshape(3,3)
print("A: ",A)
print("A: ",A)
print("B: ",B)
print("B: ",B)
Multiply A and B
result = A.dot(B)
result = A.dot(B)
print("Result: ", result)
print("结果: ", result)
Output
输出
A: [[15 16 17]
A: [[15 16 17]
[18 19 20]
[21 22 23]]
B: [[20 21 22]
B: [[20 21 22]
[23 24 25]
[26 27 28]]
Result: [[1110 1158 1206]
结果: [[1110 1158 1206]
[1317 1374 1431]
[1524 1590 1656]]
426. How is arr[:,0] different from arr[:,[0]]
arr[:,0] 与 arr[:,[0]] 有何不同?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66ea | 官方: 否 | 付费: 否
答案:
arr[:,0] - Returns 0th index elements of all rows. In other words, return the first column elements.
arr[:,0] - 返回所有行的第0个索引元素。换言之,返回第一列的元素。
import numpy as np
import numpy as np
arr = np.array([[1,2,3,4],[5,6,7,8]])
arr = np.array([[1,2,3,4],[5,6,7,8]])
new_arr =arr[:,0]
new_arr = arr[:,0]
print(new_arr)
print(new_arr)
Output:
输出:
[1 5]
arr[:,[0]] - This returns the elements of the first column by adding extra dimension to it.
arr[:,[0]] - 通过新增额外维度来返回第一列的元素。
import numpy as np
import numpy as np
arr = np.array([[1,2,3,4],[5,6,7,8]])
arr = np.array([[1,2,3,4],[5,6,7,8]])
new_arr =arr[:,[0]]
new_arr = arr[:,[0]]
print(new_arr)
print(new_arr)
Output:
输出:
[[1]
[5]]
- Data Science
- All Events
- My Events
427. How do we check for an empty array (or zero elements array)?
如何检查一个空数组(或零元素数组)?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66ed | 官方: 否 | 付费: 否
答案:
We can check for the emptiness of a NumPy array by making use of the size attribute. Let us consider the below example. We have NumPy array arr filled with zeros. If the size element returns zero, that means the array is empty or it only consists of zeros.
我们可以通过使用size属性来检查NumPy数组是否为空。让我们考虑下面的例子。我们有一个填充了零的NumPy数组arr。如果size元素返回零,则表示该数组为空或仅包含零。
import numpy as np
import numpy as np
arr = np.zeros((1,0)) #returns empty array
arr = np.zeros((1,0)) # 返回空数组
print(arr.size) #returns 0
print(arr.size) # 返回0
This return 0
此操作返回0
428. How do you count the frequency of a given positive value appearing in the NumPy array?
如何计算NumPy数组中给定正数值出现的频率?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66f1 | 官方: 否 | 付费: 否
答案:
We can make use of the bincount() function to compute the number of times a given value is there in the array. This function accepts only positive integers and boolean expressions as the arguments.
我们可以使用 bincount() 函数来计算数组中某个值出现的次数。该函数只接受正整数和布尔表达式作为参数。
import numpy as np
import numpy as np
arr = np.array([1, 2, 1, 3, 5, 0, 0, 0, 2, 3])
arr = np.array([1, 2, 1, 3, 5, 0, 0, 0, 2, 3])
result = np.bincount(arr)
result = np.bincount(arr)
print(result)
print(result)
The result is:
结果为:
[3 2 2 2 0 1]
It has to be noted here that each element represents the count of the corresponding index value present in the original array. This is demonstrated in the below image:
需要注意的是,这里每个元素表示原始数组中对应索引值出现的次数。这在下面的图片中展示:
429. How is np.mean() different from np.average() in NumPy?
np.mean() 与 np.average() 在NumPy中有什么不同?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66f4 | 官方: 否 | 付费: 否
答案:
- np.mean() method calculates the arithmetic mean and provides additional options for input and results. For example, it has the option to specify what data types have to be taken, where the result has to be placed etc.
- np.average() computes the weighted average if the weights parameter is specified. In the case of weighted average, instead of considering that each data point is contributing equally to the final average, it considers that some data points have more weightage than the others (unequal contribution).
430. How can you reverse a NumPy array?
如何反转一个NumPy数组?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66f7 | 官方: 否 | 付费: 否
答案:
There are two ways of reversing a NumPy array. - Method 1: Using the slicing method: We can make use of [::-1] for reversing the array. The following example demonstrates this:
反转NumPy数组有两种方法。- 方法1:使用切片方法:我们可以使用 [::-1] 来反转数组。下面的示例演示了这一点:
import numpy as np
import numpy as np
create numpy array
arr = np.array([1, 2, 4, 6])
arr = np.array([1, 2, 4, 6])
To reverse array
reverse_arr = arr[::-1]
reverse_arr = arr[::-1]
print(reverse_arr)
print(reverse_arr)
Output:
输出:
[6 4 2 1]
- Method 2: flipud function: This function is provided by NumPy to reverse the NumPy array. Let us see the below example about its usage.
import numpy as np
import numpy as np
create numpy array
arr = np.array([1, 2, 4, 5, 6])
arr = np.array([1, 2, 4, 5, 6])
flipud method for reversing
reverse_arr = np.flipud(arr)
reverse_arr = np.flipud(arr)
print(reverse_arr)
print(reverse_arr)
Output:
输出:
[6 5 4 2 1]
431. How do you find the data type of the elements stored in the NumPy arrays?
如何找出 NumPy 数组中存储元素的数据类型?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66fa | 官方: 否 | 付费: 否
答案:
NumPy supports the following datatypes: - i - integer
NumPy 支持以下数据类型:- i - 整数
- S - string
- b - boolean
- f - float
- u - unsigned integer
- c - complex float
- m - timedelta
- M - datetime
- O - object
- U - unicode string
V - fixed memory chunk for types such as voidWe can make use of the dtype property that returns the type of the elements stored in the NumPy array. Let us consider the below code snippet. We create some sample arrays and we see what the data types of these arrays are.
import numpy as npimport numpy as np
arr1 = np.array([1, 2, 3, 4])
arr1 = np.array([1, 2, 3, 4])
arr2 = np.array(['I', 'love', 'Interviewbit']) # Stored as Unicode characters with length of characters ranging from 1 to 12
arr2 = np.array(['I', 'love', 'Interviewbit']) # 存储为 Unicode 字符,字符长度范围为 1 到 12
arr3 = np.array([1, 2, 3, 4], dtype='S') # Creating numpy array of defined type string
arr3 = np.array([1, 2, 3, 4], dtype='S') # 创建定义为字符串类型的 numpy 数组
print(arr1.dtype)
print(arr1.dtype)
print(arr2.dtype)
print(arr2.dtype)
print(arr3.dtype)
print(arr3.dtype)
The output will be:
输出将是:
int64
int64
<U12
<U12
| S1 |
432. What are ways of creating 1D, 2D and 3D arrays in NumPy?
在 NumPy 中创建 1D、2D 和 3D 数组的方法有哪些?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb66fd | 官方: 否 | 付费: 否
答案:
Consider you have a normal python list. From this, we can create NumPy arrays by making use of the array function as follows: - One-Dimensional array
假设你有一个普通的 Python 列表。通过使用 array 函数,我们可以从该列表创建 NumPy 数组,如下所示:- 一维数组
import numpy as np
import numpy as np
arr = [1,2,3,4] #python list
arr = [1,2,3,4] #Python 列表
numpy_arr = np.array(arr) #numpy array - Two-Dimensional array
numpy_arr = np.array(arr) #NumPy 数组 - 二维数组
import numpy as np
import numpy as np
arr = [[1,2,3,4],[4,5,6,7]]
arr = [[1,2,3,4],[4,5,6,7]]
numpy_arr = np.array(arr) - Three-Dimensional array
numpy_arr = np.array(arr) - 三维数组
import numpy as np
import numpy as np
arr = [[[1,2,3,4],[4,5,6,7],[7,8,9,10]]]
arr = [[[1,2,3,4],[4,5,6,7],[7,8,9,10]]]
numpy_arr = np.array(arr)
numpy_arr = np.array(arr)
Using the np.array() function, we can create NumPy arrays of any dimensions.
使用 np.array() 函数,我们可以创建任意维度的 NumPy 数组。
433. What are ndarrays in NumPy?
NumPy中的ndarrays是什么?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb6700 | 官方: 否 | 付费: 否
答案:
ndarray object is the core of the NumPy package. It consists of n-dimensional arrays storing elements of the same data types and also has many operations that are done in compiled code for optimised performance. These arrays have fixed sizes defined at the time of creation. Following are some of the properties of ndarrays: - When the size of ndarrays is changed, it results in a new array and the original array is deleted.
ndarray对象是NumPy包的核心。它由存储相同数据类型元素的n维数组组成,并且有许多在编译代码中完成的操作以优化性能。这些数组在创建时具有固定大小。以下是ndarrays的一些属性: - 当ndarrays的大小改变时,会生成一个新数组,而原始数组会被删除。
- The ndarrays are bound to store homogeneous data.
- They provide functions to perform advanced mathematical operations in an efficient manner.
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
434. How are NumPy arrays better than Python’s lists?
NumPy数组如何比Python的列表更好?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb6703 | 官方: 否 | 付费: 否
答案:
- Python lists support storing heterogeneous data types whereas NumPy arrays can store datatypes of one nature itself. NumPy provides extra functional capabilities that make operating on its arrays easier which makes NumPy array advantageous in comparison to Python lists as those functions cannot be operated on heterogeneous data.
- NumPy arrays are treated as objects which results in minimal memory usage. Since Python keeps track of objects by creating or deleting them based on the requirements, NumPy objects are also treated the same way. This results in lesser memory wastage.
- NumPy arrays support multi-dimensional arrays.
- NumPy provides various powerful and efficient functions for complex computations on the arrays.
- NumPy also provides various range of functions for BitWise Operations, String Operations, Linear Algebraic operations, Arithmetic operations etc. These are not provided on Python’s default lists.
435. Why is NumPy preferred over Matlab, Octave, Idl or Yorick?
为什么NumPy比Matlab、Octave、Idl或Yorick更受青睐?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: numpy, python, data-science;标签: interviewbit, numpy, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0158d557c902bb6706 | 官方: 否 | 付费: 否
答案:
NumPy is an open-source, high-performing library that allows complex mathematical and scientific computational capabilities. It makes use of Python language which is a high-level, easy-to-learn, general-purpose programming language. It supports the following: - Powerful functions for performing complex mathematical operations on multi-dimensional matrices and arrays. The operations on ndarrays of NumPy are approximately up to 50% faster when compared to operations on native lists using loops. This efficiency is very much useful when the arrays have millions of elements.
NumPy是一个开源、高性能的库,允许复杂的数学和科学计算能力。它使用Python语言,这是一种高级、易学、通用目的的编程语言。它支持以下内容: - 用于对多维矩阵和数组执行复杂数学运算的强大函数。与使用循环对原生列表执行的操作相比,NumPy的ndarrays操作大约快50%。当数组包含数百万个元素时,这种效率非常有用。
- Provides indexing syntax to access portions of data easily in a large array.
- Provides built-in functions which help to easily perform operations related to linear algebra and statistics.
- It takes only a few lines of code to achieve complex computations using NumPy.
436. What is Pandas in Python?
Python 中的 Pandas 是什么?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6dfc | 官方: 否 | 付费: 否
答案:
Pandas is an open-source Python package that is most commonly used for data science, data analysis, and machine learning tasks. It is built on top of another library named Numpy . It provides various data structures and operations for manipulating numerical data and time series and is very efficient in performing various functions like data visualization, data manipulation, data analysis, etc.
Pandas是一个开源Python包,最常用于数据科学、数据分析和机器学习任务。它构建在另一个名为Numpy的库之上。它提供了各种数据结构和操作来处理数值数据和时间序列,并且在执行数据可视化、数据操作、数据分析等各种功能时非常高效。
437. Mention the different types of Data Structures in Pandas?
提到Pandas中不同类型的数据结构?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6dff | 官方: 否 | 付费: 否
答案:
Pandas have three different types of data structures. It is due to these simple and flexible data structures that it is fast and efficient. - Series - It is a one-dimensional array-like structure with homogeneous data which means data of different data types cannot be a part of the same series. It can hold any data type such as integers, floats, and strings and its values are mutable i.e. it can be changed but the size of the series is immutable i.e. it cannot be changed.
Pandas有三种不同类型的数据结构。正是由于这些简单灵活的数据结构,它才快速高效。 - Series - 它是一种一维数组样结构,具有同质数据,这意味着不同数据类型的数据不能成为同一系列的一部分。它可以保存任何数据类型,如整数、浮点数和字符串,其值是可变的,即可以更改,但系列的大小是不可变的,即不能更改。
- DataFrame - It is a two-dimensional array-like structure with heterogeneous data. It can contain data of different data types and the data is aligned in a tabular manner. Both size and values of DataFrame are mutable.
- Panel - The Pandas have a third type of data structure known as Panel, which is a 3D data structure capable of storing heterogeneous data but it isn’t that widely used.
438. What are the significant features of the pandas Library?
pandas库有哪些重要特性?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e02 | 官方: 否 | 付费: 否
答案:
Pandas library is known for its efficient data analysis and state-of-the-art data visualization. The key features of the panda’s library are as follows: - Fast and efficient DataFrame object with default and customized indexing.
Pandas库以其高效的数据分析和最先进的数据可视化而闻名。pandas库的关键特性如下: - 具有默认和自定义索引的快速高效的DataFrame对象。
- High-performance merging and joining of data.
- Data alignment and integrated handling of missing data.
- Label-based slicing, indexing, and subsetting of large data sets.
- Reshaping and pivoting of data sets.
- Tools for loading data into in-memory data objects from different file formats.
- Columns from a data structure can be deleted or inserted.
- Group by data for aggregation and transformations.
- Time Series functionality.
439. Define Series in Pandas?
在Pandas中定义Series?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e05 | 官方: 否 | 付费: 否
答案:
It is a one-dimensional array-like structure with homogeneous data which means data of different data types cannot be a part of the same series. It can hold any data type such as integers , floats , and strings and its values are mutable i.e. it can be changed but the size of the series is immutable i.e. it cannot be changed. By using a ‘series’ method, we can easily convert the list, tuple, and dictionary into a series. A Series cannot contain multiple columns.
它是一种一维数组样结构,具有同质数据,这意味着不同数据类型的数据不能成为同一系列的一部分。它可以保存任何数据类型,如整数、浮点数和字符串,其值是可变的,即可以更改,但系列的大小是不可变的,即不能更改。通过使用'series'方法,我们可以轻松地将列表、元组和字典转换为系列。一个Series不能包含多个列。
440. Define DataFrame in Pandas?
在Pandas中定义DataFrame?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e08 | 官方: 否 | 付费: 否
答案:
It is a two-dimensional array-like structure with heterogeneous data. It can contain data of different data types and the data is aligned in a tabular manner i.e. in rows and columns and the indexes with respect to these are called row index and column index respectively. Both size and values of DataFrame are mutable. The columns can be heterogeneous types like int and bool. It can also be defined as a dictionary of Series.
它是一种二维数组样结构,具有异质数据。它可以包含不同数据类型的数据,并且数据以表格方式对齐,即按行和列排列,与此相关的索引分别称为行索引和列索引。DataFrame的大小和值都是可变的。列可以是异质类型,如int和bool。它也可以定义为Series的字典。
The syntax for creating a dataframe:
创建数据框的语法:
import pandas as pd
import pandas as pd
dataframe = pd.DataFrame( data, index, columns, dtype)
dataframe = pd.DataFrame( data, index, columns, dtype)
Here: - data - It represents various forms like series, map, ndarray, lists, dict, etc.
这里:- data - 它表示各种形式,如序列、映射、ndarray、列表、字典等。
- index - It is an optional argument that represents an index to row labels.
- columns - Optional argument for column labels.
- Dtype - It represents the data type of each column. It is an optional parameter.
- Data Science
- All Events
- My Events
441. What are the different ways in which a series can be created?
创建系列有哪些不同的方式?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e0b | 官方: 否 | 付费: 否
答案:
There are different ways of creating a series in Pandas. - Creating an empty Series: The simplest series that can be created is an empty series. The Series() function of Pandas is used to create a series of any kind.
在 Pandas 中创建系列有多种方式。- 创建空系列:可以创建的最简单的系列是空系列。Pandas 的 Series() 函数用于创建任何类型的系列。
Code Example 1:
代码示例 1:
import pandas as pd
import pandas as pd
import pandas as pd
Creating empty Series
ser = pd.Series()
ser = pd.Series()
print(ser)
print(ser)
Output:
输出:
Series([], dtype: float64)
Series([], dtype: float64)
- Creating a series from an array: Pandas is built on top of the Numpy library. In order to create a series from the NumPy array, we have to import the NumPy module and have to use numpy.array() the function.
Code Example 2:
代码示例 2:
import pandas as pd
import pandas as pd
import pandas as pd
import numpy as np
import numpy as np
import numpy as np
simple array
data = np.array(['s', 'c', 'a', 'l', 'a','r'])
data = np.array(['s', 'c', 'a', 'l', 'a','r'])
ser = pd.Series(data)
ser = pd.Series(data)
print(ser)
print(ser)
Output:
输出:
0 s
0 s
1 c
1 c
2 a
2 a
3 l
3 l
4 a
4 a
5 r
5 r
dtype: object
dtype: object
- Creating a series from the array with an index: In order to create a series by exclusively providing an index instead of the default value we need to provide a list of elements to the index parameter with the same number of elements as given in the array.
Code Example 3:
代码示例3:
import pandas as pd
import pandas as pd
import pandas as pd
import numpy as np
import numpy as np
import numpy as np
simple array
data = np.array(['s', 'c', 'a', 'l', 'a','r'])
data = np.array(['s', 'c', 'a', 'l', 'a','r'])
providing an index
ser = pd.Series(data, index=[10, 11, 12, 13, 14,15])
ser = pd.Series(data, index=[10, 11, 12, 13, 14,15])
print(ser)
print(ser)
Output:
输出:
10 s
10 s
11 c
11 c
12 a
12 a
13 l
13 l
14 a
14 a
15 r
15 r
dtype: object
dtype: object
- Creating a series from Lists: In order to create a series from a list, the first step is to create a list, and then we need to create a series from the given list.
Code Example 4:
代码示例 4:
import pandas as pd
import pandas as pd
a simple list
list = ['s', 'c', 'a', 'l', 'a','r']
list = ['s', 'c', 'a', 'l', 'a','r']
create series form a list
ser = pd.Series(list)
ser = pd.Series(list)
print(ser)
print(ser)
Output:
输出:
0 s
0 s
1 c
1 c
2 a
2 a
3 l
3 l
4 a
4 a
5 r
5 r
dtype: object
dtype: object
- Creating a series from Dictionary: In order to create a series from the dictionary, the first step is to create a dictionary, and only then we can create a series using. The dictionary keys serve as indexes for the Series.
Code Example 5:
代码示例 5:
import pandas as pd
import pandas as pd
a simple dictionary
dict = {'A': 101,
dict = {'A': 101,
'B': 202,
'B': 202,
'C': 303}
'C': 303}
create series from dictionary
ser = pd.Series(dict)
ser = pd.Series(dict)
print(ser)
print(ser)
Output:
输出:
A 101
A 101
B 202
B 202
C 303
C 303
dtype: int64
dtype: int64
- Creating a series from Scalar value: In order to create a series from scalar value, an index must be provided. The value repeats itself to fit the length of the series or index given in general.
Code Example 6:
代码示例 6:
import pandas as pd
import pandas as pd
import numpy as np
import numpy as np
giving a scalar value with index
ser = pd.Series(10, index=[0, 1, 2, 3, 4, 5])
ser = pd.Series(10, index=[0, 1, 2, 3, 4, 5])
print(ser)
print(ser)
Output:
输出:
0 10
1 10
2 10
3 10
4 10
5 10
dtype: int64
dtype: int64
442. What are the different ways in which a dataframe can be created?
创建数据框有哪些不同的方式?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e0e | 官方: 否 | 付费: 否
答案:
- Creating an empty dataframe: A basic DataFrame, which can be created is an Empty Dataframe. An Empty Dataframe is created just by calling a pandas.DataFrame() constructor.
Code Example :
代码示例:
Importing Pandas to create DataFrame
import pandas as pd
import pandas as pd
Creating Empty DataFrame and Storing it in variable df
df = pd.DataFrame()
df = pd.DataFrame()
Printing Empty DataFrame
print(df)
print(df)
Output:
输出:
Empty DataFrame
空数据框
Columns: []
列:[]
Index: []
索引:[]
- Creating a dataframe using List: DataFrame can be created using a single list or by using a list of lists.
Code Example :
代码示例:
Import pandas library
import pandas as pd
import pandas as pd
initialize list elements
data = [110,202,303,404,550,650]
data = [110,202,303,404,550,650]
Create the pandas DataFrame with the column name provided explicitly
df = pd.DataFrame(data, columns=['Amounts'])
df = pd.DataFrame(data, columns=['Amounts'])
print dataframe.
print(df)
print(df)
Output:
输出:
Amounts
金额
0 110
1 202
2 303
3 404
4 550
5 650
Code Example :
代码示例:
Import pandas library
import pandas as pd
import pandas as pd
initialize list of lists
data = [['mark', 20], ['zack', 16], ['ron', 24]]
data = [['mark', 20], ['zack', 16], ['ron', 24]]
Create the pandas DataFrame
df = pd.DataFrame(data, columns=['Name', 'Age'])
df = pd.DataFrame(data, columns=['Name', 'Age'])
print dataframe.
print(df)
print(df)
Output:
输出:
Name Age
Name Age
0 mark 20
0 mark 20
1 zack 16
1 zack 16
2 ron 24
2 ron 24
- Creating DataFrame from dict of ndarray/lists: To create a DataFrame from dict of narray/list there are a few conditions to be met.
- First, all the arrays must be of the same length.
- Second, if the index is passed then the length index should be equal to the length of arrays.
- Third, if no index is passed, then by default, the index will be in the range(n) where n is the length of the array.
Code Example :
代码示例:
Python code demonstrates creating
DataFrame from dict narray / lists
By default addresses.
import pandas as pd
import pandas as pd
initialize data of lists.
data = {'Name': ['Max', 'Lara', 'Koke', 'muller'],
data = {'Name': ['Max', 'Lara', 'Koke', 'muller'],
'Age': [10, 31, 91, 48]}
'Age': [10, 31, 91, 48]}
Create DataFrame
df = pd.DataFrame(data)
df = pd.DataFrame(data)
Print the output.
print(df)
print(df)
Output:
输出:
Name Age
Name Age
0 Max 10
0 Max 10
1 Lara 31
1 Lara 31
2 Koke 91
2 Koke 91
3 muller 48
3 muller 48
- Create pandas dataframe from lists using a dictionary: Creating pandas DataFrame from lists using a dictionary can be achieved in multiple ways. We can create pandas DataFrame from lists using a dictionary by using pandas.DataFrame().
Code Example :
代码示例:
Python code demonstrates how to create
Pandas DataFrame by lists of dicts.
import pandas as pd
import pandas as pd
Initialize data to lists.
data = [{'aa': 1, 'bs': 2, 'cd': 3},
data = [{'aa': 1, 'bs': 2, 'cd': 3},
{'aa': 10, 'bs': 20, 'cd': 30}]
{'aa': 10, 'bs': 20, 'cd': 30}]
Creates DataFrame.
df = pd.DataFrame(data)
df = pd.DataFrame(data)
Print the data
print(df)
print(df)
Output:
输出:
aa bs cd
aa bs cd
0 1 2 3
1 10 20 30
- Creating dataframe from series: In order to create a dataframe using series the argument to be passed in a DataFrame() function has to be a Series.
Code Example:
代码示例:
Python code demonstrates creating
Pandas Dataframe from series.
import pandas as pd
import pandas as pd
Initialize data to series.
d = pd.Series([10, 20, 30, 40])
d = pd.Series([10, 20, 30, 40])
creates Dataframe.
df = pd.DataFrame(d)
df = pd.DataFrame(d)
print the data.
print(df)
print(df)
Output:
输出:
0
0 10
1 20
2 30
3 40
- Creating DataFrame from Dictionary of series: To create a DataFrame from Dict of series, a dictionary needs to be passed as an argument to form a DataFrame. The resultant index is the union of all the series of passed indexed.
Code Example :
代码示例:
Python code demonstrate creating
Pandas Dataframe from Dicts of series.
import pandas as pd
import pandas as pd
Initialize data to Dicts of series.
d = {'one': pd.Series([10, 20, 30, 40],
d = {'one': pd.Series([10, 20, 30, 40],
index=['a', 'b', 'c', 'd']),
index=['a', 'b', 'c', 'd']),
'two': pd.Series([10, 20, 30, 40],
'two': pd.Series([10, 20, 30, 40],
index=['a', 'b', 'c', 'd'])}
index=['a', 'b', 'c', 'd'])}
creates Dataframe.
df = pd.DataFrame(d)
df = pd.DataFrame(d)
print the data.
print(df)
print(df)
Output:
输出:
one two
one two
a 10 10
a 10 10
b 20 20
b 20 20
c 30 30
c 30 30
d 40 40
d 40 40
443. How can we create a copy of the series in Pandas?
我们如何在 Pandas 中创建 Series 的副本?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e11 | 官方: 否 | 付费: 否
答案:
We can create a copy of the series by using the following syntax: Series.copy(deep=True)
我们可以通过使用以下语法来创建 Series 的副本:Series.copy(deep=True)
The default value for the deep parameter is set to True .
deep 参数的默认值设置为 True。
When the value of deep=True , the creation of a new object with a copy of the calling object’s data and indices takes place. Modifications to the data or indices of the copy will not be reflected in the original object whereas when the value of deep=False , the creation of a new object will take place without copying the calling object’s data or index i.e. only the references to the data and index will be copied. Any changes made to the data of the original object will be reflected in the shallow copy and vice versa.
当 deep=True 时,会创建一个新对象,其中包含调用对象的数据和索引的副本。对副本的数据或索引的修改不会反映在原始对象中;而当 deep=False 时,会创建一个新对象,但不复制调用对象的数据或索引,即仅复制数据和索引的引用。对原始对象数据所做的任何更改都会反映在浅拷贝中,反之亦然。
444. Explain Categorical data in Pandas?
请解释 Pandas 中的分类数据?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e14 | 官方: 否 | 付费: 否
答案:
Categorical data is a discrete set of values for a particular outcome and has a fixed range. Also, the data in the category need not be numerical, it can be textual in nature. Examples are gender, social class, blood type, country affiliation, observation time, etc. There is no hard and fast rule for how many values a categorical value should have. One should apply one’s domain knowledge to make that determination on the data sets.
分类数据是针对特定结果的离散值集合,具有固定范围。此外,分类中的数据不必是数值型的,本质可以是文本型。例如性别、社会阶层、血型、国家归属、观察时间等。分类值应有多少个值没有硬性规定。应运用领域知识来确定数据集中的数据。
445. Explain Reindexing in pandas along with its parameters?
解释pandas中的重新索引及其参数?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e17 | 官方: 否 | 付费: 否
答案:
Reindexing as the name suggests is used to alter the rows and columns in a DataFrame. It is also defined as the process of conforming a dataframe to a new index with optional filling logic. For missing values in a dataframe, the reindex() method assigns NA/NaN as the value. A new object is returned unless a new index is produced that is equivalent to the current one. The copy value is set to False . This is also used for changing the index of rows and columns in the dataframe.
重新索引顾名思义用于更改DataFrame中的行和列。它也被定义为将数据框与带有可选填充逻辑的新索引对齐的过程。对于数据框中的缺失值,reindex()方法将NA/NaN作为值分配。除非生成的新索引与当前索引等效,否则将返回新对象。copy值设为False。这也用于更改数据框中行和列的索引。
446. What is NumPy?
什么是NumPy?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e1a | 官方: 否 | 付费: 否
答案:
NumPy is one of the most widely used, versatile, simple, open-source, python-based, general-purpose packages that is used for processing arrays. NumPy is an abbreviation for NUM erical PY thon. Due to its highly optimized tools, it provides high-performance and powerful N -dimensional array processing capabilities that are explicitly designed to handle complex arrays. It is most commonly used in performing scientific computations and various broadcasting functions because of its popularity, powerful performance, and flexibility to perform various operations.
NumPy是最广泛使用、多功能、简单、开源、基于Python的通用包之一,用于处理数组。NumPy是NUM erical PY thon的缩写。由于其高度优化的工具,它提供了高性能和强大的N维数组处理能力,专门设计用于处理复杂数组。它最常用于执行科学计算和各种广播功能,因其流行性、强大性能和灵活性而广受欢迎。
447. Give a brief description of time series in Panda?
简要描述pandas中的时间序列?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e1d | 官方: 否 | 付费: 否
答案:
A time series is an organized collection of data that depicts the evolution of a quantity through time. Pandas have a wide range of capabilities and tools for working with time-series data in all fields.
时间序列是有组织的数据集合,描绘了数量随时间的变化。Pandas具有广泛的功能和工具,用于处理各领域的时间序列数据。
Supported by pandas: - Analyzing time-series data from a variety of sources and formats.
pandas支持:- 从各种来源和格式分析时间序列数据。
- Create time and date sequences with preset frequencies.
- Date and time manipulation and conversion with timezone information.
- A time series is resampled or converted to a specific frequency.
- Calculating dates and times using absolute or relative time increments is one way to.
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
448. Explain MultiIndexing in Pandas.
解释Pandas中的多重索引。
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e20 | 官方: 否 | 付费: 否
答案:
Multiple indexing is defined as essential indexing because it deals with data analysis and manipulation, especially for working with higher dimensional data. It also enables us to store and manipulate data with an arbitrary number of dimensions in lower-dimensional data structures like Series and DataFrame.
多重索引被定义为基本索引,因为它处理数据分析和操作,尤其适用于高维数据。它还使我们能够在低维数据结构(如Series和DataFrame)中存储和操作任意数量维度的数据。
449. How can we convert Series to DataFrame?
我们如何将Series转换为DataFrame?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e23 | 官方: 否 | 付费: 否
答案:
The conversion of Series to DataFrame is quite a simple process. All we need to do is to use the to_frame() function.
将Series转换为DataFrame是一个非常简单的过程。我们只需使用to_frame()函数即可。
Syntax:
语法:
Series.to_frame(name=None)
Series.to_frame(name=None)
Parameters: - name: It accepts data objects as input. It is an optional parameter. The value of the name parameter will be equal to the name of the Series if it has any.
参数:- name:接受数据对象作为输入。这是可选参数。如果Series有名称,则name参数的值将等于Series的名称。
- Return Type: It returns the DataFrame after converting it from Series.
450. How can we convert DataFrame to Numpy Array?
我们如何将DataFrame转换为NumPy数组?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e26 | 官方: 否 | 付费: 否
答案:
In order to convert DataFrame to a Numpy array we need to use DataFrame.to_numpy() method.
为了将DataFrame转换为NumPy数组,我们需要使用DataFrame.to_numpy()方法。
Syntax:
语法:
DataFrame.to_numpy(dtype=None, copy=False, na_value=_NoDefault.no_default)
DataFrame.to_numpy(dtype=None, copy=False, na_value=_NoDefault.no_default)
Parameters: - dtype: It accepts string or numpy.dtype. It is an optional parameter.
参数:- dtype:接受字符串或 numpy.dtype。这是一个可选参数。
- copy: It accepts a boolean value whose default is set to False.
- na_value: It is an optional parameter. It specifies the value to use for missing values. The data type will depend on the data type of the column in the dataframe.
451. How can we convert DataFrame to an excel file?
我们如何将DataFrame转换为Excel文件?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e31 | 官方: 否 | 付费: 否
答案:
In order to convert DataFrame to an excel file we need to use the to_excel() function. There are various parameters to be considered. But initially, all you need is to mention the DataFrame name and the name of the excel sheet.
为了将DataFrame转换为Excel文件,我们需要使用to_excel()函数。需要考虑各种参数。但最初,你只需要提及DataFrame的名称和Excel工作表的名称。
Note: To write a single object to an Excel file, you need to provide the target file name. However, if you want to write to multiple sheets, you must create an ExcelWriter object that specifies the target file name and the sheet that needs to be written. Alternatively, you can specify a unique sheet name to write multiple sheets to the same Excel file.
注意:要将单个对象写入Excel文件,你需要提供目标文件名。然而,如果你想要写入多个工作表,你必须创建一个ExcelWriter对象,该对象指定目标文件名和需要写入的工作表。或者,你可以指定一个唯一的工作表名称来将多个工作表写入同一个Excel文件。
Syntax:
语法:
data.to_excel( excel_writer, sheet_name='Sheet1', \kwargs )
data.to_excel( excel_writer, sheet_name='Sheet1', \kwargs )
Parameters: - excel_writer: It accepts a string or ExcelWriter object. It specifies the path of the file to be written or an existing ExcelWriter object.
参数:- excel_writer:接受字符串或ExcelWriter对象。它指定要写入的文件路径或现有的ExcelWriter对象。
- sheet_name: It accepts a string value. The default value is set to ‘Sheet1’. It specifies the name of the sheet that will contain the DataFrame.
- columns: It accepts a sequence or list of strings as input. It is an optional parameter that specifies the columns that need to be written.
- index: It accepts a boolean value whose default is set to True. It specifies the rows/index to be written.
- index_label: It accepts string or sequence of string values. It is an optional parameter. It specifies the column label for index column(s) if required. If nothing is specified, and the header and index are set to True, then the index names are used. A sequence value should be given only if the DataFrame uses MultiIndexing.
452. What is TimeDelta?
什么是TimeDelta?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e34 | 官方: 否 | 付费: 否
答案:
Timedeltas are differences in times, expressed in different units, e.g. days, hours, minutes, and seconds. They can be both positive and negative.
Timedelta是时间之间的差异,以不同单位表示,例如天、小时、分钟和秒。它们可以是正数也可以是负数。
453. Explain Pandas Timedelta.seconds Property
解释Pandas Timedelta.seconds属性
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: pandas, python, data-science;标签: interviewbit, pandas, topic-specific, python, data-science)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c0c58d557c902bb6e37 | 官方: 否 | 付费: 否
答案:
Timedelta.seconds in pandas is used to return the number of seconds. Its implementation is simpler than it sounds. We do not need any special parameters and the return type is in the form of seconds.
Timedelta.seconds在pandas中用于返回秒数。它的实现比听起来更简单。我们不需要任何特殊参数,返回类型以秒的形式呈现。
Code Example :
代码示例:
importing necessary libraries
import pandas as pd
import pandas as pd
import numpy as np
import numpy as np
Create the Timedelta object
td = pd.Timedelta('5 days 09:08:03.000000312')
td = pd.Timedelta('5 days 09:08:03.000000312')
Print the Timedelta object
print(td)
print(td)
Print the Timedelta object in seconds format
print(td.seconds)
打印(td.seconds)
Output:-
输出:-
5 days 09:08:03.000000312
5天09:08:03.000000312
32883
454. What are the major components of Power BI?
Power BI 的主要组件有哪些?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76b6 | 官方: 否 | 付费: 否
答案:
Power BI is an amalgamation of these major components:
Power BI 是这些主要组件的融合体:
Components of Power BI - Power Query (for data mash-up and transformation): You can use this to extract data from various databases (like SQL Server, MySql, and many others ) and to delete a chunk of data from various sources.
Power BI 的组件 - Power Query(用于数据混搭和转换):您可以使用它从各种数据库(如 SQL Server、MySql 等)中提取数据,并从多个源中删除部分数据。
- Power Pivot (for tabular data modeling): It is a data modeling engine that uses a functional language called Data Analysis Expression (DAX) to perform the calculations. Also, creates a relationship between various tables to be viewed as pivot tables.
- Power View (for viewing data visualizations): The view provides an interactive display of various data sources to extract metadata for proper data analysis.
- Power BI Desktop (a companion development tool): Power Desktop is an aggregated tool of Power Query, Power View, and Power Pivot. Create advanced queries, models, and reports using the desktop tool.
- Power BI Mobile (for Android, iOS, Windows phones): It gives an interactive display of the dashboards from the site onto these OS, effortlessly.
- Power Map (3D geo-spatial data visualization).
- Power Q&A (for natural language Q&A).
455. What are the various refresh options available?
有哪些可用的刷新选项?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76b9 | 官方: 否 | 付费: 否
答案:
Four main refresh options are available in Power BI: - Package/OneDrive refresh: This synchronizes Power BI desktop or Excel file between the Power BI service and OneDrive
Power BI 中有四个主要的刷新选项: - 包/OneDrive 刷新:此选项同步 Power BI 桌面版或 Excel 文件,在 Power BI 服务和 OneDrive 之间进行。
- Data/Model refresh: This means scheduling the data import from all the sources based on either refresh schedule or on-demand.
- Tile refresh: Refresh the tiles’ cache on the dashboard every time the data changes.
- Visual container refresh: Update the reports’ visuals and visual container once the data changes.
456. What are the different connectivity modes in Power BI?
Power BI 中有哪些不同的连接模式?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76bc | 官方: 否 | 付费: 否
答案:
The three major connectivity modes in Power BI are:
Power BI 中的三种主要连接模式是:
Direct Query: The method allows direct connection to the Power BI model. The data doesn’t get stored in Power BI. Interestingly, Power BI will only store the metadata of the data tables involved and not the actual data. The supported sources of data query are: - Amazon Redshift
直接查询:此方法允许直接连接到 Power BI 模型。数据不会存储在 Power BI 中。有趣的是,Power BI 只会存储所涉及数据表的元数据,而非实际数据。支持的数据查询源包括: - Amazon Redshift
- Azure HDInsight Spark (Beta)
- Azure SQL Database
- Azure SQL Data Warehouse
- IBM Netezza (Beta)
- Impala (version 2.x)
- Oracle Database (version 12 and above)
- SAP Business Warehouse (Beta)
- SAP HANA
- Snowflake
- Spark (Beta) (version 0.9 and above)
- SQL Server
Teradata Database
Live Connection: Live connection is analogous to the direct query method as it doesn’t store any data in Power BI either. But opposed to the direct query method, it is a direct connection to the analysis services model. Also, the supported data sources with live connection method are limited: - SQL Server Analysis Services (SSAS) Tabular实时连接:实时连接与直接查询方法类似,因为它也不会在 Power BI 中存储任何数据。但与直接查询方法相反,它是直接连接到分析服务模型。此外,实时连接方法支持的数据源有限: - SQL Server 分析服务(SSAS)表格模型
- SQL Server Analysis Services (SSAS) Multi-Dimensional
Power BI Service
Import Data (Scheduled Refresh): By choosing this method, you upload the data into Power BI. Uploading data on Power BI means consuming the memory space of your Power BI desktop. If it is on the website, it consumes the space of the Power BI cloud machine. Even though it is the fastest method, the maximum size of the file to be uploaded cannot exceed 1 GB until and unless you have Power BI premium (then you have 50 GB at the expense).导入数据(计划刷新):通过选择此方法,您将数据上传到 Power BI。上传数据到 Power BI 意味着消耗 Power BI 桌面端的内存空间。如果是在网站上,则消耗 Power BI 云机器的空间。尽管这是最快的方法,但文件上传的最大大小不能超过 1 GB,除非您拥有 Power BI 高级版(然后您有 50 GB 可供使用)。
But which model to choose when depends on your use and purpose.
但何时选择哪种模型取决于您的使用场景和目的。
457. What is a Power BI desktop?
什么是 Power BI 桌面版?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76bf | 官方: 否 | 付费: 否
答案:
To access the Power BI features, visualize data, or model them to create reports, you can simply download a desktop version of Power BI. With the desktop version, you can extract data from various data sources, transform them, create visuals or reports, and share them using Power BI services.
要访问 Power BI 功能、可视化数据或建模以创建报告,您可以直接下载 Power BI 的桌面版本。使用桌面版本,您可以从各种数据源提取数据、转换数据、创建可视化或报告,并使用 Power BI 服务共享它们。
458. Where is the data stored in Power BI?
Power BI 中的数据存储在哪里?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76c2 | 官方: 否 | 付费: 否
答案:
Primarily, Power BI has two sources to store data:
主要来说,Power BI 有两个数据存储来源:
Azure Blob Storage: When users upload the data, it gets stored here. Azure SQL Database: All the metadata and system artifacts are stored here.
Azure Blob 存储:当用户上传数据时,数据会存储在这里。Azure SQL 数据库:所有元数据和系统工件都存储在这里。
They are stored as either fact tables or dimensional tables.
它们被存储为事实表或维度表。
- Data Science
- All Events
- My Events
459. What are the available views?
有哪些可用的视图?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76c5 | 官方: 否 | 付费: 否
答案:
In power BI, you have various kinds of views viz: - Data View: Curating, exploring, and viewing data tables in the data set. Unlike, Power Query editor, with data view, you are looking at the data after it has been fed to the model.
在 Power BI 中,您有多种视图类型,即:- 数据视图:用于整理、探索和查看数据集中的数据表。与 Power Query 编辑器不同,通过数据视图,您查看的是已输入模型后的数据。
- Model View: This view shows you all the tables along with their complex relationships. With this, you can break these complex models into simplified diagrams or set properties for them at once.
- Report View: The report view displays the tables in an interactive format to simplify data analysis. You can create n number of reports, provide visualizations, merge them, or apply any such functionality.
460. What are the available formats?
有哪些可用的格式?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76c8 | 官方: 否 | 付费: 否
答案:
Power BI is available in various formats: - Power BI desktop: For the desktop version
Power BI 有多种格式可用:- Power BI 桌面版:适用于桌面版本
- Power BI mobile app: For using the visualizations on mobile OS and share it
- Power BI services: For online SaaS
461. Power BI can connect to which data sources?
Power BI 可以连接哪些数据源?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76cb | 官方: 否 | 付费: 否
答案:
The data source is the point from which the data has been retrieved. It can be anything like files in various formats (.xlsx, .csv, .pbix, .xml, .txt etc), databases (SQL database, SQL Data Warehouse, Spark on Azure HDInsight), or form content packets like Google Analytics or Twilio.
数据源是数据被检索的起点。它可以是任何东西,比如各种格式的文件(.xlsx、.csv、.pbix、.xml、.txt 等)、数据库(SQL 数据库、SQL 数据仓库、Azure HDInsight 上的 Spark),或者表单内容包,如 Google Analytics 或 Twilio。
462. How would you define Power BI as an effective solution?
您如何将 Power BI 定义为有效的解决方案?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76ce | 官方: 否 | 付费: 否
答案:
Power BI is a strong business analytical tool that creates useful insights and reports by collating data from unrelated sources. This data can be extracted from any source like Microsoft Excel or hybrid data warehouses. Power BI drives an extreme level of utility and purpose using interactive graphical interface and visualizations. You can create reports using the Excel BI toolkit and share them on-cloud with your colleagues.
Power BI 是一个强大的商业分析工具,通过收集来自无关来源的数据来创建有用的见解和报告。这些数据可以从任何来源提取,如 Microsoft Excel 或混合数据仓库。Power BI 利用交互式图形界面和可视化提供了极高水平的实用性和目的性。您可以使用 Excel BI 工具包创建报告,并与同事在云端共享。
Power BI Intermediate Questions
463. What is a dashboard?
什么是仪表板?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76d1 | 官方: 否 | 付费: 否
答案:
The dashboard is like a single-page canvas on which you have various elements to create and visualize reports created by analyzing data. It comprises only the most important data from the reports to create a story.
仪表板就像一个单页画布,上面有各种元素,用于创建和可视化通过分析数据生成的报告。它仅包含报告中最重要的数据,以创建一个故事。
The visual elements present on the dashboard are called Tiles. You can pin these tiles from the reports to the dashboard. Clicking any element on the dashboard takes you to the report of a particular data set.
仪表板上的视觉元素称为磁贴。您可以将这些磁贴从报告固定到仪表板。点击仪表板上的任何元素都会带您到特定数据集的报告。
Power BI Dashboard
Power BI 仪表板
464. What are the building blocks of Power BI?
Power BI 的构建块有哪些?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76d4 | 官方: 否 | 付费: 否
答案:
The major building blocks of Power BI are: - Datasets: Dataset is a collection of data gathered from various sources like SQL Server, Azure, Text, Oracle, XML, JSON, and many more. With the GetData feature in Power BI, we can easily fetch data from any data source.
Power BI 的主要构建块包括:- 数据集:数据集是从各种来源(如 SQL Server、Azure、文本、Oracle、XML、JSON 等)收集的数据集合。借助 Power BI 中的获取数据功能,我们可以轻松地从任何数据源获取数据。
- Visualizations: Visualization is the visual aesthetic representation of data in the form of maps, charts, or tables.
- Reports: Reports are a structured representation of datasets that consists of multiple pages. Reports help to extract important information and insights from datasets to take major business decisions.
- Dashboards: A dashboard is a single-page representation of reports made of various datasets. Each element is termed a tile. Tiles: Tiles are single-block containing visualizations of a report. Tiles help to differentiate each report.
465. What are content packs in Power BI?
什么是 Power BI 中的内容包?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76d7 | 官方: 否 | 付费: 否
答案:
Content packs are packages comprising different Power BI objects such as reports, dashboards, datasets, etc. The two types of content packs are:
内容包是包含不同 Power BI 对象(如报表、仪表板、数据集等)的包。内容包的两种类型是:
Service provider content packs: Service providers such as Google Analytics, Salesforce, etc. provide pre-built content packages
服务提供商内容包:Google Analytics、Salesforce 等服务提供商提供预构建的内容包
User-created content packs: Users can create their content packages and share them within the organization.
用户创建的内容包:用户可以创建自己的内容包,并在组织内共享。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
466. What are the various Power BI versions?
Power BI 有哪些不同的版本?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76da | 官方: 否 | 付费: 否
答案:
The three major versions of Power BI are as follows: - Power BI Desktop: The free interactive tool that connects multiple data sources, transforms data, and creates visualized reports.
Power BI 的三个主要版本如下:- Power BI Desktop:免费交互式工具,可连接多个数据源、转换数据并创建可视化报表。
- Power BI Premium: The premium version is used for larger organizations with a dedicated storage capacity for each user. With premium, data sets up to 50GB storage capacity can be hosted along with 100TB storage on the cloud as a whole. It costs $4995 per month.
- Power BI Pro: With the pro version, you get full access to the Power BI dashboard, creation of reports, along with unlimited sharing and viewing of reports. You also have a storage limit of 10GB per user.
467. What is DAX?
什么是 DAX?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76dd | 官方: 否 | 付费: 否
答案:
Data Analysis Expression (DAX) is a library of formulas used for calculations and data analysis. This library comprises functions, constants, and operators to perform calculations and give results. DAX lets you use the data sets to their full potential and provide insightful reports.
数据分析表达式(DAX)是一个用于计算和数据分析的公式库。该库包含函数、常数和运算符,用于执行计算并给出结果。DAX 让你能充分利用数据集,并提供富有洞察力的报表。
DAX is a functional language containing conditional statements, nested functions, value references, and much more. The formulas are either numeric (integers, decimals, etc.) or non-numeric (string, binary). A DAX formula always starts with an equal sign.
DAX 是一种函数式语言,包含条件语句、嵌套函数、值引用等。公式要么是数值(整数、小数等),要么是非数值(字符串、二进制)。DAX 公式始终以等号开头。
DAX
DAX
A: Name of the project B: Start of the DAX formula C: DAX function (to add) D: Parentheses defining arguments E: Name of the table F: Name of the field G: Operator
A:项目名称 B:DAX 公式的开始 C:DAX 函数(用于添加) D:定义参数的括号 E:表名称 F:字段名称 G:运算符
468. What are the purpose and benefits of using the DAX function?
使用 DAX 函数的目的和好处是什么?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c1c58d557c902bb76e0 | 官方: 否 | 付费: 否
答案:
DAX is much more than Power BI. If you learn DAX as a functional language, you become better as a data professional. DAX is based on different nested filters which magnificently improves the performance of data merging, modeling, and filtering tables.
DAX 远不止于 Power BI。如果你将 DAX 作为函数式语言来学习,你会成为更优秀的数据专业人士。DAX 基于不同的嵌套筛选器,能显著提升数据合并、建模和表筛选的性能。
469. What is Power Pivot?
什么是 Power Pivot?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76e7 | 官方: 否 | 付费: 否
答案:
Power Pivot enables you to import millions of rows from heterogeneous sources of data into a single excel sheet. It lets us create relationships between the various tables, create columns, calculate using formulas, and create PivotCharts and PivotTables.
Power Pivot 使您能够将来自异构数据源的数百万行数据导入到单个 Excel 工作表中。它让我们能够在各个表之间创建关系、创建列、使用公式进行计算,以及创建数据透视图表和数据透视表。
At a time there can be only one active relationship between the tables which is represented by a continuous line.
在任意时刻,表之间只能有一个活动关系,该关系由一条连续的线表示。
470. What is Power Query?
什么是 Power Query?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76ea | 官方: 否 | 付费: 否
答案:
Power query is a function that filters transforms, and combines the data extracted from various sources. It helps to import data from databases, files, etc and append data
Power Query 是一种用于筛选、转换和合并从各种来源提取的数据的函数。它有助于从数据库、文件等导入数据,并追加数据。
471. Difference between Power BI and Tableau?
Power BI 和 Tableau 之间的区别是什么?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76ed | 官方: 否 | 付费: 否
答案:
The major differences between Power BI and Tableau are: - While Power BI uses DAX for calculating columns of a table, Tableau uses MDX (Multidimensional Expressions).
Power BI 和 Tableau 之间的主要区别在于:- 虽然 Power BI 使用 DAX 来计算表的列,但 Tableau 使用 MDX(多维表达式)。
- Tableau is more efficient as it can handle a large chunk of data while Power BI can handle only a limited amount.
- Tableau is more challenging to use than Power BI.
472. What is GetData in Power BI?
Power BI 中的 GetData 是什么?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76f0 | 官方: 否 | 付费: 否
答案:
GetData offers data connectivity to various data sources. Connect data files on your local system. The supported data sources are: - File: Excel, Text/CSV, XML, PDF, JSON, Folder, SharePoint.
GetData 提供对各种数据源的数据连接。连接您本地系统上的数据文件。支持的数据源包括:- 文件:Excel、文本/CSV、XML、PDF、JSON、文件夹、SharePoint。
- Database: SQL Server database, Access database, Oracle database, SAP HANA database, IBM, MySQL, Teradata, Impala, Amazon Redshift, Google BigQuery, etc.
- Power BI: Power BI datasets, Power BI dataflows.
- Azure: Azure SQL, Azure SQL Data Warehouse, Azure Analysis Services, Azure Data Lake, Azure Cosmos DB, etc.
- Online Services: Salesforce, Azure DevOps, Google Analytics, Adobe Analytics, Dynamics 365, Facebook, GitHub, etc.
- Others: Python script, R script, Web, Spark, Hadoop File (HDFS), ODBC, OLE DB, Active Directory, etc.
473. What are filters in Power BI?
Power BI 中的筛选器是什么?
- 知识点: 数据工程与数据科学/AI (主题: power-bi, visualization;标签: interviewbit, power-bi, topic-specific, visualization)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1c58d557c902bb76f3 | 官方: 否 | 付费: 否
答案:
Filters sort data based on the condition applied to it. Filters enable us to select particular fields and extract information in a page/visualization/report level. For example, filters can provide sales reports from the year 2019 for the Indian region. Power BI can make changes based on the filters and create graphs or visuals accordingly. Types of filters are: - Page-level filters: These are applied on a particular page from various pages available within a report.
筛选器根据应用的条件对数据进行排序。筛选器使我们能够选择特定字段并提取页面/可视化/报告级别的信息。例如,筛选器可以提供 2019 年印度地区的销售报告。Power BI 可以根据筛选器进行更改,并相应地创建图表或视觉对象。筛选器的类型包括:- 页面级筛选器:这些应用于报告中多个页面中的特定页面。
- Visualization-level filters: These are applied to both data and calculation conditions for particular visualizations.
- Report-level filters: These are applied to the entire report.
474. What is the chance of rolling at least one five with two dice?
掷两个骰子时至少掷出一个五点的概率是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77e9 | 官方: 否 | 付费: 否
答案:
Let’s assume that event A is that we get 5 on 1st dice and B is that we get 5 on 2nd dice - Since the outcome of throwing the second die wouldn’t be affected by the outcome of throwing the first dice, we can calculate the probability of independent events A and B both occurring as: P(A∩B)=P(A)∗P(B)
假设事件 A 是我们掷出第一个骰子得到 5,事件 B 是我们掷出第二个骰子得到 5 - 由于掷第二个骰子的结果不会受到掷第一个骰子结果的影响,我们可以将独立事件 A 和 B 都发生的概率计算为:P(A∩B)=P(A)∗P(B)
The probability of getting at least one 5 can be computed using the probability of the union of two events:
P(A∪B)=P(A)+P(B)−P(A∩B)The probability of getting any specific outcome from a die is ⅙. Thus, P(A∪B)=1/6+1/6−1/(6*6)=1/3-1/36=11/36P(A∪B)=P(A)+P(B)−P(A∩B)从骰子中获得任何特定结果的概率是 ⅙。因此,P(A∪B)=1/6+1/6−1/(6*6)=1/3-1/36=11/36
Thus the probability of rolling at least one five with two dice is 11/36.
因此,掷两个骰子时至少掷出一个五点的概率是 11/36。
475. How would you use Bayes' Rule to test hypotheses?
您如何使用贝叶斯法则来检验假设?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77ec | 官方: 否 | 付费: 否
答案:
We can calculate a conditional probability using new information we already have using the Bayes' Rule equation. In the case of two distinct events A and B, we can consider the following two events in terms of Baye's theorem: - Hypothesis A, which may be true or untrue
我们可以使用已有的新信息,通过贝叶斯法则方程来计算条件概率。在涉及两个不同事件 A 和 B 的情况下,我们可以根据贝叶斯定理考虑以下两个事件:- 假设 A,它可能是真的也可能是假的。
Evidence A supporting B, which may be present or not.
As a result, A is the occurrence whose likelihood we are interested in. The issue can be stated as follows using Bayes' theorem:因此,A 是我们对其发生可能性感兴趣的事件。使用贝叶斯定理,该问题可以表述如下:
Where: - The probability that event A will occur if event B is true is expressed as P(A|B). We are attempting to estimate what is also known as the posterior.
其中:- 事件 B 为真时事件 A 发生的概率表示为 P(A|B)。我们试图估计的正是所谓的后验概率。
- P(B|A) is the likelihood that event B will occur assuming that event A is true. It can alternatively be understood as the probability of witnessing the new data given our prior hypothesis, and it can also be understood as the likelihood.
The probabilities of seeing A and B, P(A), and P(B), respectively, in the absence of any specific conditions, are also known as the prior and marginal probabilities.
Now, in order to compare the two hypotheses, we compute their respective probabilities using the previous technique. Acceptance is given to the hypothesis with the highest posterior probability.现在,为了比较两个假设,我们使用上述技术计算它们各自的概率。后验概率最高的假设被接受。
476. What is a Probability Distribution?
什么是概率分布?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77ef | 官方: 否 | 付费: 否
答案:
A probability distribution is a statistical function that outlines every conceivable value and likelihood that a random variable could have within a specified range.
概率分布是一种统计函数,用于描述随机变量在指定范围内可能具有的每一个值和可能性。
Two main categories of probability distribution exist: - Discrete probability distributions: used random variables having discrete outcomes, such as the frequency of heads in five consecutive coin tosses, the number of rainy days in a particular week, the number of goals a player scores, etc.,
概率分布有两种主要类别:- 离散概率分布:用于具有离散结果的随机变量,例如连续五次抛硬币中出现正面的次数、某一周内的降雨天数、球员进球数等,
- Continuous probability distributions: used for random variables with continuous outcomes, such as the average height of male students, the median price of a home in San Francisco, the number of claims a given insurance provider receives, and so forth.
477. What distinguishes probability density functions from probability mass functions?
概率密度函数与概率质量函数有何区别?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c1e58d557c902bb77f2 | 官方: 否 | 付费: 否
答案:
- Probability mass function:- The probability distribution for discrete variables is provided by the Probability Mass Function (PMF). For instance, throwing dice. The complete sample space is defined by 6 unique outcomes: 1, 2, 3, 4, 5, and 6. We only have whole numbers; there are no fractions like 1.2 or 3.75. Each discrete variable's probability is mapped to the PMF. Each of the six factors has a 1/6 chance of being rolled in an ideal environment when rolling a die.
- Probability density function:-The probability distribution of the continuous random variables is provided by the Probability Density Function. we use a probability distribution function where outcome values are not fixed like we have a range of values as outcomes for example if we try to calculate the height of students in a class we get the value in range. The probability density function is calculated by the area under the curve of the interval in which or outcome values lie.
478. How do you determine whether assignment to the different buckets in an A/B test was indeed random?
如何确定 A/B 测试中分配到不同桶的分配是否确实是随机的?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77f9 | 官方: 否 | 付费: 否
答案:
In terms of statistics, there wouldn't be any discernible disparities between the variable samples in each bucket if the buckets were actually chosen at random. However, how can we tell if the sample differences between the buckets are meaningful or not?
在统计学方面,如果桶确实是随机选择的,那么每个桶中的变量样本之间不应存在明显的差异。但是,我们如何判断桶之间的样本差异是否具有意义呢?
To assess this, we can perform a statistical test.
为了评估这一点,我们可以进行统计检验。
The two-sample t-test can be used if the variables we observe are continuous variables and there is only one treatment. In the meanwhile, we can utilize ANOVA if there are numerous treatments.
如果我们观察的变量是连续变量且只有一种处理方式,可以使用双样本 t 检验。同时,如果有多种处理方式,我们可以使用方差分析(ANOVA)。
We can utilize the p-Value obtained after running a statistical test to determine whether there is a significant difference between buckets.
我们可以利用运行统计检验后获得的 p 值来确定桶之间是否存在显著差异。
479. Out of 100 goods, 25 are of poor quality. What is the range of confidence?
在 100 件商品中,有 25 件质量差。置信区间是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77fc | 官方: 否 | 付费: 否
答案:
We must calculate the sample mean from the expected value of the binomial distribution and the standard deviation from the variance of the binomial distribution because the problem in the question has a binomial distribution:
由于问题中的情况具有二项分布,我们必须根据二项分布的期望值计算样本均值,并根据二项分布的方差计算标准差:
E(X) = 100*0.25E(X)=100∗0.25
E(X) = 100*0.25E(X)=100∗0.25
Var(X)=1000.25(1-0.25)=18.75
Var(X)=1000.25(1-0.25)=18.75
We can simply enter the computed mean and standard deviation into the equation for confidence intervals to determine the result after computing them using the binomial distribution method.
我们可以简单地将计算出的均值和标准差代入置信区间方程中,在使用二项分布方法计算它们之后来确定结果。
X bar is the sample mean, Z is the confidence value, σ is the sample standard deviation, and n is the sample size in the equation above.
在上述方程中,X bar 是样本均值,Z 是置信值,σ 是样本标准差,n 是样本量。
So after putting values we get
因此,代入数值后我们得到
480. Assume Facebook users click on ads P times out of every 100. What is the smallest sample size N such that Probability(ABS(hat{P}-P) DELTA) = 95 percent when we choose a sample of size N and analyze the sample's conversion rate, denoted by hat{P}?
假设 Facebook 用户每 100 次中点击广告 P 次。当我们选择一个大小为 N 的样本并分析其转化率(记为 hat{P})时,使得 Probability(ABS(hat{P}-P) DELTA) = 95% 的最小样本量 N 是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb77ff | 官方: 否 | 付费: 否
答案:
Find the smallest sample size N that will allow our sample estimate of P to be, with a 95% confidence level, within a DELTA of the actual click-through rate P.
找出最小样本量 N,使我们的样本估计值 P 在 95% 置信水平下,与实际点击率 P 的差异在 DELTA 范围内。
The understanding of confidence intervals, the margin of error, sample size, and binomial distribution is tested by this question. The conversion rate in the hypothetical situation has a binomial distribution, so we must calculate the standard deviation using the square root of the variance of the binomial distribution.
此题考查对置信区间、误差幅度、样本量和二项分布的理解。假设情况中的转化率服从二项分布,因此我们必须使用二项分布方差的平方根来计算标准差。
The following is the general equation for the binomial distribution's variance: Var(X)=p(1-p)
二项分布方差的一般方程为:Var(X)=p(1-p)
Our understanding of the question's 95 per cent confidence interval results in a Z-score of 1.96. (see the Z-table to obtain this value). When we enter the following equation into the equation margin of error, we obtain:
我们对问题中 95% 置信区间的理解得出 Z 值为 1.96。(参见 Z 表以获得此值)。当我们将以下方程代入误差幅度方程时,我们得到:
481. What is a p-value? If you had a different (far larger, 3 mil records, for example) data set, would it affect how you interpret the p-value?
什么是 p 值?如果你有一个不同的(例如,远更大,如 300 万条记录)数据集,它会影响你如何解释 p 值吗?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7802 | 官方: 否 | 付费: 否
答案:
In the world of statistics, the term "p-Value" refers to the probability value, which is typically applied during hypothesis testing. When your null hypothesis is true, the facts you just observed are considered to be very unlikely, according to the p-value.
在统计学领域中,术语“p-Value”指的是概率值,通常在假设检验中使用。当你的零假设为真时,根据 p 值,你刚刚观察到的事实被认为是非常不可能发生的。
Typically, a significance level is established before hypothesis testing. We reject the null hypothesis if the p-value is less than the threshold we consider significant. In the meantime, if the p-Value exceeds the level of significance, we proceed with our null hypothesis.
通常,显著性水平是在假设检验之前设定的。如果 p 值小于我们认为显著的阈值,我们则拒绝零假设。同时,如果 p 值超过显著性水平,我们则继续采用零假设。
The meaning of the p-Value is unaffected by the size of your dataset, although a larger dataset yields a more solid and trustworthy conclusion from our p-Value.
p 值的含义不受数据集大小的影响,尽管更大的数据集能从我们的 p 值中得出更可靠和可信的结论。
482. What is the variance's definition?
方差的定义是什么?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7805 | 官方: 否 | 付费: 否
答案:
The variance measures the range of data points in a dataset in relation to its mean value, as the notion suggests. The general formula for a variance is given below:
根据这一概念,方差衡量的是数据集中数据点相对于其均值值的离散范围。方差的一般公式如下所示:
Where n is the total number of samples, x is the sample, x bar is the sample mean, and S is the variance.
其中 n 是样本总数,x 是样本,x bar 是样本均值,S 是方差。
483. N riders receive a $5 off voucher. P is the likelihood that a coupon will be used. What is the company's anticipated cost?
N 名骑手每人获得一张 5 美元折扣券。P 是优惠券被使用的可能性。公司的预期成本是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7808 | 官方: 否 | 付费: 否
答案:
Different from the previous question, now we need to compute the expected value of a variable with binomial distribution instead of computing the PMF. We can answer this question by plugging the values into the equation of the expected value of the binomial distribution.
与之前的问题不同,现在我们需要计算二项分布变量的期望值,而不是计算PMF。我们可以通过将数值代入二项分布期望值的公式来回答这个问题。
From the equation above, we have N coupons and the probability of using a coupon is P .
根据上面的公式,我们有N张优惠券,使用一张优惠券的概率为P。
Thus, the expected value would be: E(X)=N*P
因此,期望值将是:E(X)=N*P
And the anticipated expense would be: E(X)∗5$=N∗P∗5
而预期费用将是:E(X)∗5$=N∗P∗5
484. What is the probability of rolling the dice seven times and receiving a 5?
掷骰子七次并得到一个5的概率是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb780b | 官方: 否 | 付费: 否
答案:
Simply entering values into the binomial distribution equation will provide the solution to this query. Assuming that there have been 1 success and 7 trials, we can say that there have been 1 success and 7 trials. As we all know, there is a 1 in 6 chance of getting a 5 on a single throw.
简单地将数值代入二项分布方程即可得到该问题的解答。假设有1次成功和7次试验,我们可以说有1次成功和7次试验。众所周知,单次投掷得到5的概率是六分之一。
The probability mass function (PMF) of the binomial distribution is as follows:
二项分布的概率质量函数(PMF)如下:
Hence by putting values we get,
因此代入数值我们得到,
485. We choose two cards at random from a deck of cards with numbers ranging from 1 to 100. What is the likelihood that a number on one card is precisely twice the number on the other?
我们从一副编号从1到100的牌中随机抽取两张牌。一张牌上的数字恰好是另一张牌上数字两倍的可能性有多大?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb780e | 官方: 否 | 付费: 否
答案:
With the idea of a combination, this query can also be resolved. This is due to the fact that the order is unimportant when we draw two cards from the same deck of cards. As a result, receiving a card with the number 10 in the first draw and the number 40 in the second draw is equivalent to receiving a card with the number 40 in the first draw and the number 10 in the second.
借助组合的概念,这个问题也可以解决。这是因为当我们从同一副牌中抽取两张牌时,顺序并不重要。因此,第一次抽到编号为10的牌,第二次抽到编号为40的牌,与第一次抽到编号为40的牌,第二次抽到编号为10的牌是等效的。
Input values from the question into the combination equation will provide the following results:
将问题中的数值代入组合方程将得到以下结果:
C(100,2) =100!/(100-2)!2! = 4950 combinations
C(100,2) =100!/(100-2)!2! = 4950种组合
Hence there are 4950 combination pairings available.
因此共有4950种组合配对可用。
Given that we have 100 cards altogether, there are 50 ways out of those 4950 combinations where one card is double another.
鉴于我们总共有100张牌,在这4950种组合中,有50种情况是一张牌是另一张牌的两倍。
As a result, we may determine the probability as:
因此,我们可以确定概率为:
50/4950 = 0.01 = 1%
486. What is the likelihood of drawing two cards with the same suite (from the same deck)?
从同一副牌中抽取两张同花色的牌的可能性有多大?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7811 | 官方: 否 | 付费: 否
答案:
This is an illustration of a dependent event. According to this definition, the likelihood that two events will occur in the case of a dependent event is:
这是一个关于相关事件的图示。根据此定义,在相关事件情况下,两个事件同时发生的可能性为:
The probability of events A and B occurring simultaneously is equal to the chance of events A occurring multiplied by the likelihood of events B occurring given the outcome of events A.
事件 A 和事件 B 同时发生的概率等于事件 A 发生的概率乘以在事件 A 发生的结果下事件 B 发生的可能性。
This is expressed as P ( A ∩ B )= P ( A )∗ P ( B ∣ A )
这表示为 P ( A ∩ B )= P ( A )∗ P ( B ∣ A )
In this scenario, a deck of cards comprises four suites, each of which contains 13 cards.
在此场景中,一副牌包含四种花色,每种花色各有13张牌。
Our chance of getting a card from a certain suite in the initial draw would be 13/52. Our chances of drawing a card from the same suite as the previous one in the subsequent draw would drop from 13/52 to 12/51.
在第一次抽牌中,我们从特定花色中抽到一张牌的概率将是13/52。在后续抽牌中,我们从与先前相同花色中抽到一张牌的概率将从13/52降至12/51。
Hence P (two cards same suite)
因此 P(两张牌同一花色)
=4 ∗ 13/52 * 12/51
=4/17
487. Team A and B are competing in a game in which they must win four of the seven rounds to win.
A队和B队正在竞争一场比赛,其中他们必须在七轮中赢得四轮才能获胜。
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7815 | 官方: 否 | 付费: 否
答案:
What is the likelihood that they will play all seven rounds if A's chance of winning is p and B's chance of winning is 1-p (no chance of a tie)? What if the chances of A winning differ on the home field (p) and the away field (q)?
如果A的获胜概率为p,B的获胜概率为1-p(没有平局可能),那么他们打满全部七轮的可能性是多少?如果A在不同场地获胜的概率不同,主场为p,客场为q,情况又会如何?
If two teams compete in all seven rounds, both A and B must win three times in the first six rounds, regardless of who wins the final round. Each round can be thought of as a Bernoulli trial, with the number of times A wins in the first six games following a binomial distribution. The probability of A winning is Bi(n,k,p), with n=6, k=3, and p=p. The probability of A winning three times out of six games, according to the Binomial distribution, is:
如果两队打满全部七轮,那么无论谁赢得最后一轮,A和B都必须在前六轮中各赢三次。每一轮可以视为一次伯努利试验,A在前六场中获胜的次数遵循二项分布。A获胜的概率为 Bi(n,k,p),其中 n=6,k=3,p=p。根据二项分布,A在六场中赢三次的概率为:
Because team A has won three times, team B has won three times as well. We can suppose that Team A's chance of winning at home is p, away is q, and Team A has won x games at home if the two teams have different winning percentages at home and away. x, p, and q will determine the likelihood of both teams playing all seven rounds. We know that both teams A and B must win three rounds and that Team A must win x games at home and 3-x games away, while Team B must win 3-x games away (Team A's home being Team B's visit site, and Team B wins aways when A loses at home) and win x rounds at home. Playing seven rounds has a probability of:
因为A队赢了三场,所以B队也赢了三场。如果两队在主客场获胜概率不同,我们可以假设A队主场获胜概率为p,客场为q,且A队已在主场赢得x场比赛。那么x、p和q将决定两队打满全部七轮的可能性。我们知道A队和B队都必须赢三场,且A队必须在主场赢x场、在客场赢3-x场,而B队必须在客场赢3-x场(A队主场即B队客场,当A队在主场输时B队就在客场赢),并在主场赢x场。打满七轮的概率为:
488. Given that a die is rolled twice and the sum of the numbers is noted to be 6, what is the conditional probability that the number 4 has occurred at least once?
给定一个骰子被掷两次,且两次数字之和已知为6,那么数字4至少出现一次的条件概率是多少?
- 知识点: 数据工程与数据科学/AI (主题: probability, statistics;标签: interviewbit, probability, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c1e58d557c902bb7818 | 官方: 否 | 付费: 否
答案:
If you roll the dice twice, you'll get the following sample space:
如果你掷骰子两次,你将得到以下样本空间:
S = { (1,1)(1,2)(1,3)(1,4)(1,5)(1,6)
S = { (1,1)(1,2)(1,3)(1,4)(1,5)(1,6)
(2,1)(2,2)(2,3)(2,4)(2,5)(2,6)
(3,1)(3,2)(3,3)(3,4)(3,5)(3,6)
(4,1)(4,2)(4,3)(4,4)(4,5)(4,6)
(5,1)(5,2)(5,3)(5,4)(5,5)(5,6)
(6,1)(6,2)(6,3)(6,4)(6,5)(6,6)}
Provided the given data, calculate the probability that 4 has appeared at least once, given that the sum of the numbers is 6.
根据给定数据,在数字之和为6的条件下,计算数字4至少出现一次的概率。
Assume that F: The total of two numbers is six.
假设 F:两个数字之和为六。
Take E, for example, 4 has appeared at least once.
以 E 为例,4至少出现了一次。
As a result, we must locate P(E|F).
因此,我们必须找到 P(E|F)。
Obtaining P (E):
求 P(E):
The chances of collecting four at least once are:
至少收集到一次四的概率为:
E = (1, 4), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (4, 1), (4, 2), (4, 3), (4, 5), (4, 6), (4, 1), (4, 2), (4, 3), (4, 5), (4, 6)
E = (1, 4), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (4, 1), (4, 2), (4, 3), (4, 5), (4, 6), (4, 1), (4, 2), (4, 3), (4, 5), (4, 6)
As a result, P(E) = 11/36.
因此,P(E) = 11/36。
Identifying P (F):
求 P(F):
The chance of getting the sum of two numbers is 6:
两个数字之和为6的概率:
F = {(1, 5), (5, 1), (2, 4), (4, 2), (3, 3)}
F = {(1, 5), (5, 1), (2, 4), (4, 2), (3, 3)}
As a result, P(F) = 5/ 36
因此,P(F) = 5/36。
In addition, E ∩ F = {(2,4), (4,2)}
此外,E ∩ F = {(2,4), (4,2)}。
P(E ∩ F) = 2/36
P(E ∩ F) = 2/36。
As a result, P(E|F) = (P(E ∩ F) ) / (P (F) )
因此,P(E|F) = (P(E ∩ F) ) / (P (F) )。
Now, Substitute the computed probability values= (2/36)/ (5/36)
现在,代入计算出的概率值 = (2/36) / (5/36)。
Hence, 2/5 is the required probability.
因此,2/5 是所求的概率。
489. What are the industrial benefits of PySpark?
PySpark 的工业优势有哪些?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bd0 | 官方: 否 | 付费: 否
答案:
These days, almost every industry makes use of big data to evaluate where they stand and grow. When you hear the term big data, Apache Spark comes to mind. Following are the industry benefits of using PySpark that supports Spark: - Media streaming: Spark can be used to achieve real-time streaming to provide personalized recommendations to subscribers. Netflix is one such example that uses Apache Spark. It processes around 450 billion events every day to flow to its server-side apps.
如今,几乎每个行业都利用大数据来评估自身状况并实现增长。当你听到大数据这个术语时,就会想到 Apache Spark。以下是使用支持 Spark 的 PySpark 带来的行业优势:- 媒体流式处理:Spark 可用于实现实时流式传输,为订阅者提供个性化推荐。Netflix 就是使用 Apache Spark 的一个例子。它每天处理约 4500 亿个事件,并将其流向其服务器端应用。
- Finance: Banks use Spark for accessing and analyzing the social media profiles and in turn get insights on what strategies would help them to make the right decisions regarding customer segmentation, credit risk assessments, early fraud detection etc.
- Healthcare: Providers use Spark for analyzing the past records of the patients to identify what health issues the patients might face posting their discharge. Spark is also used to perform genome sequencing for reducing the time required for processing genome data.
- Travel Industry: Companies like TripAdvisor uses Spark to help users plan the perfect trip and provide personalized recommendations to the travel enthusiasts by comparing data and review from hundreds of websites regarding the place, hotels, etc.
- Retail and e-commerce: This is one important industry domain that requires big data analysis for targeted advertising. Companies like Alibaba run Spark jobs for analyzing petabytes of data for enhancing customer experience, providing targetted offers, sales and optimizing the overall performance.
490. What is PySpark?
什么是 PySpark?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bd3 | 官方: 否 | 付费: 否
答案:
PySpark is an Apache Spark interface in Python. It is used for collaborating with Spark using APIs written in Python. It also supports Spark’s features like Spark DataFrame, Spark SQL, Spark Streaming, Spark MLlib and Spark Core. It provides an interactive PySpark shell to analyze structured and semi-structured data in a distributed environment. PySpark supports reading data from multiple sources and different formats. It also facilitates the use of RDDs (Resilient Distributed Datasets). PySpark features are implemented in the py4j library in python.
PySpark 是 Python 中的 Apache Spark 接口。它用于通过 Python 编写的 API 与 Spark 协作。它还支持 Spark 的功能,如 Spark DataFrame、Spark SQL、Spark Streaming、Spark MLlib 和 Spark Core。它提供了一个交互式 PySpark shell,用于在分布式环境中分析结构化及半结构化数据。PySpark 支持从多个来源和不同格式读取数据。它也促进了 RDD(弹性分布式数据集)的使用。PySpark 的功能在 Python 的 py4j 库中实现。
PySpark can be installed using PyPi by using the command:
PySpark 可以使用 PyPi 通过以下命令安装:
pip install pyspark
pip install pyspark
491. What is PySpark UDF?
什么是 PySpark UDF?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bd6 | 官方: 否 | 付费: 否
答案:
UDF stands for User Defined Functions. In PySpark, UDF can be created by creating a python function and wrapping it with PySpark SQL’s udf() method and using it on the DataFrame or SQL. These are generally created when we do not have the functionalities supported in PySpark’s library and we have to use our own logic on the data. UDFs can be reused on any number of SQL expressions or DataFrames.
UDF 代表用户定义函数。在 PySpark 中,UDF 可以通过创建 Python 函数并将其包装到 PySpark SQL 的 udf() 方法中,然后在 DataFrame 或 SQL 上使用来创建。这些通常在我们没有 PySpark 库支持的功能时创建,因此我们必须对数据使用自己的逻辑。UDF 可以重复用于任意数量的 SQL 表达式或 DataFrame。
492. What are the types of PySpark’s shared variables and why are they useful?
PySpark 的共享变量类型有哪些?为什么它们有用?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bd9 | 官方: 否 | 付费: 否
答案:
Whenever PySpark performs the transformation operation using filter(), map() or reduce(), they are run on a remote node that uses the variables shipped with tasks. These variables are not reusable and cannot be shared across different tasks because they are not returned to the Driver. To solve the issue of reusability and sharing, we have shared variables in PySpark. There are two types of shared variables, they are:
每当 PySpark 使用 filter()、map() 或 reduce() 执行转换操作时,它们会在远程节点上运行,并使用随任务附带的变量。这些变量不可重用,也不能在不同任务之间共享,因为它们不会返回到驱动器。为了解决重用和共享的问题,我们在 PySpark 中有共享变量。共享变量有两种类型,它们是:
Broadcast variables: These are also known as read-only shared variables and are used in cases of data lookup requirements. These variables are cached and are made available on all the cluster nodes so that the tasks can make use of them. The variables are not sent with every task. They are rather distributed to the nodes using efficient algorithms for reducing the cost of communication. When we run an RDD job operation that makes use of Broadcast variables, the following things are done by PySpark: - The job is broken into different stages having distributed shuffling. The actions are executed in those stages.
广播变量:这些也称为只读共享变量,用于数据查找需求的情况。这些变量被缓存并使其在所有集群节点上可用,以便任务可以利用它们。变量不会随每个任务发送。相反,它们通过高效算法分布到节点上,以降低通信成本。当我们运行使用广播变量的 RDD 作业操作时,PySpark 会执行以下操作:- 作业被拆分成具有分布式混洗的不同阶段。操作在这些阶段中执行。
- The stages are then broken into tasks.
The broadcast variables are broadcasted to the tasks if the tasks need to use it.
Broadcast variables are created in PySpark by making use of the broadcast(variable) method from the SparkContext class. The syntax for this goes as follows:广播变量在 PySpark 中通过使用 SparkContext 类的 broadcast(variable) 方法创建。语法如下:
broadcastVar = sc.broadcast([10, 11, 22, 31])
broadcastVar = sc.broadcast([10, 11, 22, 31])
broadcastVar.value # access broadcast variable
broadcastVar.value # 访问广播变量
An important point of using broadcast variables is that the variables are not sent to the tasks when the broadcast function is called. They will be sent when the variables are first required by the executors.
使用广播变量的一个重要点是,在调用广播函数时变量不会发送到任务。它们将在执行器首次需要变量时才被发送。
Accumulator variables: These variables are called updatable shared variables. They are added through associative and commutative operations and are used for performing counter or sum operations. PySpark supports the creation of numeric type accumulators by default. It also has the ability to add custom accumulator types. The custom types can be of two types: - Named Accumulators: These accumulators are visible under the “Accumulator” tab in the PySpark web UI as shown in the image below:
累加器变量:这些被称为可更新共享变量。它们通过结合性和交换性操作添加,并用于执行计数器或求和操作。PySpark 默认支持创建数值类型的累加器。它还有能力添加自定义累加器类型。自定义类型可以是两种:- 命名累加器:这些累加器在 PySpark Web 用户界面的“Accumulator”选项卡下可见,如下方图片所示:
Here, we will see the Accumulable section that has the sum of the Accumulator values of the variables modified by the tasks listed in the Accumulator column present in the Tasks table. - Unnamed Accumulators: These accumulators are not shown on the PySpark Web UI page. It is always recommended to make use of named accumulators.
这里,我们将看到 Accumulable 部分,它包含了由任务修改的变量的累加器值之和,这些任务列在任务表中的 Accumulator 列中。- 未命名累加器:这些累加器不会显示在 PySpark Web 用户界面页面上。始终建议使用命名累加器。
Accumulator variables can be created by using SparkContext.longAccumulator(variable) as shown in the example below:
累加器变量可以使用 SparkContext.longAccumulator(variable) 创建,如下例所示:
ac = sc.longAccumulator("sumaccumulator")
ac = sc.longAccumulator("sumaccumulator")
sc.parallelize([2, 23, 1]).foreach(lambda x: ac.add(x))
sc.parallelize([2, 23, 1]).foreach(lambda x: ac.add(x))
Depending on the type of accumulator variable data - double, long and collection, PySpark provide DoubleAccumulator, LongAccumulator and CollectionAccumulator respectively.
根据累加器变量数据的类型(双精度、长整型和集合),PySpark分别提供DoubleAccumulator、LongAccumulator和CollectionAccumulator。
493. What is SparkSession in Pyspark?
什么是PySpark中的SparkSession?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bdc | 官方: 否 | 付费: 否
答案:
SparkSession is the entry point to PySpark and is the replacement of SparkContext since PySpark version 2.0. This acts as a starting point to access all of the PySpark functionalities related to RDDs, DataFrame, Datasets etc. It is also a Unified API that is used in replacing the SQLContext, StreamingContext, HiveContext and all other contexts.
SparkSession是PySpark的入口点,自PySpark 2.0版本起取代了SparkContext。它作为访问所有与RDD、DataFrame、Datasets等相关的PySpark功能的起点。它也是一个统一的API,用于替代SQLContext、StreamingContext、HiveContext及所有其他上下文。
The SparkSession internally creates SparkContext and SparkConfig based on the details provided in SparkSession. SparkSession can be created by making use of builder patterns.
SparkSession根据SparkSession中提供的详细信息在内部创建SparkContext和SparkConfig。可以通过使用构建器模式来创建SparkSession。
494. What do you understand about PySpark DataFrames?
你如何理解PySpark DataFrame?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bdf | 官方: 否 | 付费: 否
答案:
PySpark DataFrame is a distributed collection of well-organized data that is equivalent to tables of the relational databases and are placed into named columns. PySpark DataFrame has better optimisation when compared to R or python. These can be created from different sources like Hive Tables, Structured Data Files, existing RDDs, external databases etc as shown in the image below:
PySpark DataFrame是一个分布式组织良好的数据集合,相当于关系数据库中的表,并放置在命名列中。与R或Python相比,PySpark DataFrame具有更好的优化性能。这些可以从不同来源创建,如Hive表、结构化数据文件、现有RDD、外部数据库等,如下图所示:
The data in the PySpark DataFrame is distributed across different machines in the cluster and the operations performed on this would be run parallelly on all the machines. These can handle a large collection of structured or semi-structured data of a range of petabytes.
PySpark DataFrame中的数据分布在集群中的不同机器上,对其执行的操作将在所有机器上并行运行。这些可以处理从PB级别的大范围结构化或半结构化数据集合。
495. Is PySpark faster than pandas?
PySpark比pandas更快吗?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7be2 | 官方: 否 | 付费: 否
答案:
PySpark supports parallel execution of statements in a distributed environment, i.e on different cores and different machines which are not present in Pandas. This is why PySpark is faster than pandas.
PySpark支持在分布式环境中并行执行语句,即在不同的核心和不同的机器上进行,这是pandas所不具备的。这就是PySpark比pandas更快的原因。
496. What are the advantages of PySpark RDD?
PySpark RDD的优势有哪些?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7be5 | 官方: 否 | 付费: 否
答案:
PySpark RDDs have the following advantages: - In-Memory Processing: PySpark’s RDD helps in loading data from the disk to the memory. The RDDs can even be persisted in the memory for reusing the computations.
PySpark RDD具有以下优势:- 内存中处理:PySpark的RDD有助于将数据从磁盘加载到内存中。RDD甚至可以持久化在内存中,以便重用计算。
- Immutability: The RDDs are immutable which means that once created, they cannot be modified. While applying any transformation operations on the RDDs, a new RDD would be created.
- Fault Tolerance: The RDDs are fault-tolerant. This means that whenever an operation fails, the data gets automatically reloaded from other available partitions. This results in seamless execution of the PySpark applications.
- Lazy Evolution: The PySpark transformation operations are not performed as soon as they are encountered. The operations would be stored in the DAG and are evaluated once it finds the first RDD action.
- Partitioning: Whenever RDD is created from any data, the elements in the RDD are partitioned to the cores available by default.
497. What are the different cluster manager types supported by PySpark?
PySpark支持哪些不同的集群管理器类型?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7be8 | 官方: 否 | 付费: 否
答案:
A cluster manager is a cluster mode platform that helps to run Spark by providing all resources to worker nodes based on the requirements.
集群管理器是一种集群模式平台,通过根据需求向工作节点提供所有资源来帮助运行Spark。
The above figure shows the position of cluster manager in the Spark ecosystem. Consider a master node and multiple worker nodes present in the cluster. The master nodes provide the worker nodes with the resources like memory, processor allocation etc depending on the nodes requirements with the help of the cluster manager.
上图显示了集群管理器在Spark生态系统中的位置。考虑集群中存在一个主节点和多个工作节点。主节点借助集群管理器根据节点需求向工作节点提供内存、处理器分配等资源。
PySpark supports the following cluster manager types: - Standalone – This is a simple cluster manager that is included with Spark.
PySpark 支持以下集群管理器类型: - Standalone – 这是 Spark 自带的简单集群管理器。
- Apache Mesos – This manager can run Hadoop MapReduce and PySpark apps.
- Hadoop YARN – This manager is used in Hadoop2.
- Kubernetes – This is an open-source cluster manager that helps in automated deployment, scaling and automatic management of containerized apps.
- local – This is simply a mode for running Spark applications on laptops/desktops.
498. Does PySpark provide a machine learning API?
PySpark 是否提供机器学习 API?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7beb | 官方: 否 | 付费: 否
答案:
Similar to Spark, PySpark provides a machine learning API which is known as MLlib that supports various ML algorithms like: - mllib.classification − This supports different methods for binary or multiclass classification and regression analysis like Random Forest, Decision Tree, Naive Bayes etc.
与 Spark 类似,PySpark 提供了一个名为 MLlib 的机器学习 API,它支持各种 ML 算法,如:- mllib.classification − 这支持二元或多类分类和回归分析的不同方法,例如随机森林、决策树、朴素贝叶斯等。
- mllib.clustering − This is used for solving clustering problems that aim in grouping entities subsets with one another depending on similarity.
- mllib.fpm − FPM stands for Frequent Pattern Matching. This library is used to mine frequent items, subsequences or other structures that are used for analyzing large datasets.
- mllib.linalg − This is used for solving problems on linear algebra.
- mllib.recommendation − This is used for collaborative filtering and in recommender systems.
- spark.mllib − This is used for supporting model-based collaborative filtering where small latent factors are identified using the Alternating Least Squares (ALS) algorithm which is used for predicting missing entries.
- mllib.regression − This is used for solving problems using regression algorithms that find relationships and variable dependencies.
499. What are RDDs in PySpark?
PySpark 中的 RDD 是什么?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bee | 官方: 否 | 付费: 否
答案:
RDDs expand to Resilient Distributed Datasets. These are the elements that are used for running and operating on multiple nodes to perform parallel processing on a cluster. Since RDDs are suited for parallel processing, they are immutable elements. This means that once we create RDD, we cannot modify it. RDDs are also fault-tolerant which means that whenever failure happens, they can be recovered automatically. Multiple operations can be performed on RDDs to perform a certain task. The operations can be of 2 types:
RDD 扩展为弹性分布式数据集。这些是用于在多个节点上运行和操作以在集群上执行并行处理的元素。由于 RDD 适合并行处理,它们是不可变元素。这意味着一旦我们创建 RDD,就不能修改它。RDD 还具有容错性,这意味着每当发生故障时,它们可以自动恢复。可以对 RDD 执行多种操作以完成特定任务。操作可分为 2 种类型:
- Transformation: These operations when applied on RDDs result in the creation of a new RDD. Some of the examples of transformation operations are filter, groupBy, map.Let us take an example to demonstrate transformation operation by considering filter() operation:
from pyspark import SparkContext
from pyspark import SparkContext
sc = SparkContext("local", "Transdormation Demo")
sc = SparkContext("local", "Transdormation Demo")
words_list = sc.parallelize (
words_list = sc.parallelize (
["pyspark",
["pyspark",
"interview",
"interview",
"questions",
"questions",
"at",
"at",
"interviewbit"]
"interviewbit"]
)
filtered_words = words_list.filter(lambda x: 'interview' in x)
filtered_words = words_list.filter(lambda x: 'interview' in x)
filtered = filtered_words.collect()
filtered = filtered_words.collect()
print(filtered)
print(filtered)
The above code filters all the elements in the list that has ‘interview’ in the element. The output of the above code would be:
上述代码过滤了列表中所有包含“interview”的元素。上述代码的输出将是:
[
"interview",
"interview",
"interviewbit"
"interviewbit"
]
- Action: These operations instruct Spark to perform some computations on the RDD and return the result to the driver. It sends data from the Executer to the driver. count(), collect(), take() are some of the examples.Let us consider an example to demonstrate action operation by making use of the count() function.
from pyspark import SparkContext
from pyspark import SparkContext
sc = SparkContext("local", "Action Demo")
sc = SparkContext("local", "Action Demo")
words = sc.parallelize (
words = sc.parallelize (
["pyspark",
["pyspark",
"interview",
"interview",
"questions",
"questions",
"at",
"at",
"interviewbit"]
"interviewbit"]
)
counts = words.count()
counts = words.count()
print("Count of elements in RDD -> ", counts)
print("Count of elements in RDD -> ", counts)
In this class, we count the number of elements in the spark RDDs. The output of this code is
在本节课中,我们统计Spark RDD中元素的数量。这段代码的输出是
Count of elements in RDD -> 5
Count of elements in RDD -> 5
500. What are PySpark serializers?
什么是PySpark序列化器?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bf1 | 官方: 否 | 付费: 否
答案:
The serialization process is used to conduct performance tuning on Spark. The data sent or received over the network to the disk or memory should be persisted. PySpark supports serializers for this purpose. It supports two types of serializers, they are: - PickleSerializer: This serializes objects using Python’s PickleSerializer (class pyspark.PickleSerializer). This supports almost every Python object.
序列化过程用于对Spark进行性能调优。通过网络发送或接收的数据应持久化到磁盘或内存中。PySpark支持序列化器来满足这一需求。它支持两种类型的序列化器,它们是:- PickleSerializer:该序列化器使用Python的PickleSerializer(类pyspark.PickleSerializer)对对象进行序列化。它支持几乎所有的Python对象。
MarshalSerializer: This performs serialization of objects. We can use it by using class pyspark.MarshalSerializer. This serializer is faster than the PickleSerializer but it supports only limited types.
Consider an example of serialization which makes use of MarshalSerializer:考虑一个使用MarshalSerializer的序列化示例:
--serializing.py----
from pyspark.context import SparkContext
from pyspark.context import SparkContext
from pyspark.serializers import MarshalSerializer
from pyspark.serializers import MarshalSerializer
sc = SparkContext("local", "Marshal Serialization", serializer = MarshalSerializer()) #Initialize spark context and serializer
sc = SparkContext("local", "Marshal Serialization", serializer = MarshalSerializer()) #初始化Spark上下文和序列化器
print(sc.parallelize(list(range(1000))).map(lambda x: 3 * x).take(5))
print(sc.parallelize(list(range(1000))).map(lambda x: 3 * x).take(5))
sc.stop()
sc.stop()
When we run the file using the command:
当我们使用以下命令运行该文件时:
$SPARK_HOME/bin/spark-submit serializing.py
$SPARK_HOME/bin/spark-submit serializing.py
The output of the code would be the list of size 5 of numbers multiplied by 3:
代码的输出将是大小为5的乘以3的数字列表:
[0, 3, 6, 9, 12]
501. Why do we use PySpark SparkFiles?
为什么我们使用PySpark SparkFiles?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bf4 | 官方: 否 | 付费: 否
答案:
PySpark’s SparkFiles are used for loading the files onto the Spark application. This functionality is present under SparkContext and can be called using the sc.addFile() method for loading files on Spark. SparkFiles can also be used for getting the path using the SparkFiles.get() method. It can also be used to resolve paths to files added using the sc.addFile() method.
PySpark的SparkFiles用于将文件加载到Spark应用程序中。此功能存在于SparkContext下,可以使用sc.addFile()方法调用以将文件加载到Spark上。SparkFiles也可以使用SparkFiles.get()方法获取路径。它还可以用于解析通过sc.addFile()方法添加的文件的路径。
502. What is PySpark SparkContext?
什么是PySpark SparkContext?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7bf9 | 官方: 否 | 付费: 否
答案:
PySpark SparkContext is an initial entry point of the spark functionality. It also represents Spark Cluster Connection and can be used for creating the Spark RDDs (Resilient Distributed Datasets) and broadcasting the variables on the cluster.
PySpark SparkContext是Spark功能的初始入口点。它还表示Spark集群连接,可用于创建Spark RDD(弹性分布式数据集)并在集群上广播变量。
The following diagram represents the architectural diagram of PySpark’s SparkContext:
下图展示了PySpark的SparkContext架构图:
When we want to run the Spark application, a driver program that has the main function will be started. From this point, the SparkContext that we defined gets initiated. Later on, the driver program performs operations inside the executors of the worker nodes. Additionally, JVM will be launched using Py4J which in turn creates JavaSparkContext. Since PySpark has default SparkContext available as “sc”, there will not be a creation of a new SparkContext.
当我们想要运行Spark应用程序时,会启动一个具有主函数的驱动程序。从这一点开始,我们定义的SparkContext会被初始化。随后,驱动程序在工作节点的执行器内部执行操作。此外,JVM将使用Py4J启动,这进而创建JavaSparkContext。由于PySpark有默认的SparkContext可用为“sc”,因此不会创建新的SparkContext。
503. What are the advantages and disadvantages of PySpark?
PySpark 的优点和缺点是什么?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7c11 | 官方: 否 | 付费: 否
答案:
Advantages of PySpark: - Simple to use: Parallelized code can be written in a simpler manner.
PySpark 的优点:- 使用简单:可以以更简单的方式编写并行化代码。
- Error Handling: PySpark framework easily handles errors.
- Inbuilt Algorithms: PySpark provides many of the useful algorithms in Machine Learning or Graphs.
- Library Support: Compared to Scala, Python has a huge library collection for working in the field of data science and data visualization.
Easy to Learn: PySpark is an easy to learn language.
Disadvantages of PySpark: - Sometimes, it becomes difficult to express problems using the MapReduce model.PySpark 的缺点:- 有时,使用 MapReduce 模型表达问题会变得困难。
- Since Spark was originally developed in Scala, while using PySpark in Python programs they are relatively less efficient and approximately 10x times slower than the Scala programs. This would impact the performance of heavy data processing applications.
- The Spark Streaming API in PySpark is not mature when compared to Scala. It still requires improvements.
- PySpark cannot be used for modifying the internal function of the Spark due to the abstractions provided. In such cases, Scala is preferred.
504. What are the characteristics of PySpark?
PySpark 有哪些特性?
- 知识点: 数据工程与数据科学/AI (主题: pyspark, spark, data-engineering;标签: interviewbit, pyspark, topic-specific, spark, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2458d557c902bb7c14 | 官方: 否 | 付费: 否
答案:
There are 4 characteristics of PySpark:
PySpark 有 4 个特性:
- Abstracted Nodes: This means that the individual worker nodes can not be addressed.
- Spark API: PySpark provides APIs for utilizing Spark features.
- Map-Reduce Model: PySpark is based on Hadoop’s Map-Reduce model this means that the programmer provides the map and the reduce functions.
- Abstracted Network: Networks are abstracted in PySpark which means that the only possible communication is implicit communication.
505. What are the essential QlikView features?
QlikView 的基本功能有哪些?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8059 | 官方: 否 | 付费: 否
答案:
QlikView has many features that help you quickly create advanced reports from multiple data sources. Below are some of the features that make QlikView unique: - Natural analytics and data discovery: QlikView searches through all the data stored in the memory in a natural manner. Natural search means that the data searching process does not follow predefined patterns, but instead will search for data and associations in a way that is the most natural. Within QlikView apps, users can quickly discover and analyze data.
QlikView 具有许多功能,可帮助您从多个数据源快速创建高级报告。以下是使 QlikView 独具特色的一些功能:- 自然分析和数据发现:QlikView 以自然的方式搜索存储在内存中的所有数据。自然搜索意味着数据搜索过程不遵循预定义模式,而是以最自然的方式搜索数据和关联。在 QlikView 应用中,用户可以快速发现和分析数据。
- Data collaboration and connectivity: Qlik DataMarket (DaaS) is a unique QlikView cloud-based data service that allows users to fetch data sets from different syndicated and public data sources. Several public datasets are available, including population, currencies, business demographics, weather conditions, economic indicators, etc. RESTful API connectors can also be used to connect and integrate with data sources like Facebook, Alfresco, Twitter, LinkedIn, Adobe, Documentum, etc.
- Data association is automatically maintained: QlikView recognizes or identifies the relationship between every piece of data in a dataset automatically. Therefore, users do not have to pre-configure relationships between data entities.
- In-memory storage capability: In-memory storage technology is one of QlikView's key strengths. Data from different sources (including traditional sources like data warehouses) are loaded or stored into RAM on the system and can later be retrieved directly from there.
- Associative model: QlikView is the only tool that offers an associative data discovery model. It simplifies the process of discovering and analyzing data in BI tools. As a result of these associations, we create a logical connection by linking related data fields and data values with each other.
- Comparative Analysis: Comparative analysis in QlikView is an extension of the associative model. Comparisons of different fields and data sets are possible through comparative analysis. Users and developers can choose which data sections or states to compare. The comparison of data is aided by charts, tables, and graphs for better understanding and analysis.
506. With the Tools menu provided in QlikView's Menu bar, what operations can be performed?
使用 QlikView 菜单栏中提供的工具菜单,可以执行哪些操作?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb805d | 官方: 否 | 付费: 否
答案:
From the Tools menu, we can choose the Edit menu to edit the tools, and create different kinds of charts with wizards such as the Time Chart Wizard, Quick Chart Wizard, Box Plot Wizard, and Statistics Chart Wizard. Alerts and themes can also be managed using this tool menu.
通过工具菜单,我们可以选择编辑菜单来编辑工具,并使用向导(如时间图表向导、快速图表向导、箱线图向导和统计图表向导)创建不同类型的图表。还可以使用此工具菜单管理警报和主题。
507. Describe Inline data. Is there a way to load Inline into QlikView?
描述内联数据。有没有办法将内联数据加载到 QlikView 中?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8060 | 官方: 否 | 付费: 否
答案:
You can directly enter the data into a QlikView document by typing it in or pasting it in. This is known as inline data. Data can be loaded into QlikView quickly via the clipboard. You can access this feature from the Insert tab of the script editor. As shown below, open up the script editor, and then go to and click on Insert –> Load Statement –> Load Inline option.
您可以通过键入或粘贴来直接将数据输入到 QlikView 文档中。这称为内联数据。可以通过剪贴板快速将数据加载到 QlikView。您可以从脚本编辑器的插入选项卡访问此功能。如下所示,打开脚本编辑器,然后转到并单击插入 –> 加载语句 –> 加载内联选项。
As soon as we open the screen above, we see a spreadsheet-like document as shown below where values can be typed. The column headers are generated automatically.
一旦我们打开上述屏幕,我们会看到一个类似电子表格的文档,如下所示,其中可以键入值。列标题会自动生成。
508. Is it possible to import or load Web files into QlikView?
是否可以将 Web 文件导入或加载到 QlikView 中?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8063 | 官方: 否 | 付费: 否
答案:
Yes, you can load web files into QlikView using the Script Editor. For connecting to and retrieving data from different data sources, QlikView uses load scripts, which can be managed within the script editor. The file is loaded into QlikView via the load script, which can be seen in the below screenshot. So, if we use a delimited file, we can tweak/modify the below-given script as required.
是的,您可以使用脚本编辑器将 Web 文件加载到 QlikView。为了连接和检索来自不同数据源的数据,QlikView 使用加载脚本,这些脚本可以在脚本编辑器中进行管理。文件通过加载脚本加载到 QlikView 中,可以在下面的屏幕截图中看到。因此,如果我们使用分隔文件,我们可以根据需要调整/修改下面给出的脚本。
509. What do you mean by delimited files? And why are they called CSV files?
分隔文件是什么意思?为什么它们被称为 CSV 文件?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8066 | 官方: 否 | 付费: 否
答案:
QlikView delimited files are text files in which the data fields are separated using commas, semicolons, tabs, etc. These types of files are also known as CSVs (comma-separated values) and have the extension '.csv'. CSV files can be loaded in QlikView. They are useful since they allow storing large amounts of data in a simple text format.
QlikView 分隔文件是文本文件,其中数据字段使用逗号、分号、制表符等进行分隔。这些类型的文件也称为 CSV(逗号分隔值),并具有扩展名 '.csv'。CSV 文件可以加载到 QlikView 中。它们很有用,因为它们允许以简单的文本格式存储大量数据。
510. In QlikView, which types of data files can be loaded?
在 QlikView 中,可以加载哪些类型的数据文件?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8069 | 官方: 否 | 付费: 否
答案:
In QlikView, there are several types of QlikView data files available from which data can be loaded. Listed below are a few of them: - Delimited Files: Store large amounts of data in a simple text format.
在 QlikView 中,有几种可用的 QlikView 数据文件类型,从中可以加载数据。下面列出其中一些:- 分隔文件:以简单文本格式存储大量数据。
- Fixed Record Files: Consist of data records or rows that have the same length or byte size.
- Dif Files (Data Interchange Format files): Used for importing and exporting spreadsheet data. They only contain data from one spreadsheet.
- Excel (XLS) Files: Contain data created in MS Excel documents.
- Excel (XLSX) Files: Use for storing data from MS Excel documents.
- HTML (HyperText Markup Language) Files: Also known as web files, and contains information on a web page.
- QVD (QlikView Data) Files: A file that can be used to read and write data to and from QlikView. Files like these are mainly used by QlikView services as storage and as intermediate files.
- KML Files (Keyhole Markup Language): A file format for defining and storing geographic data used in earth browsers.
511. Can you tell me how to use macros in an application?
你能告诉我如何在应用程序中使用宏吗?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb806c | 官方: 否 | 付费: 否
答案:
A Qlik macro is generally a set of tasks that you want to automate - for reporting purposes, these tasks would otherwise need to be done manually. This concept is similar to Excel macros. Macros can be used for the following things: - To reload an application.
Qlik 宏通常是一组你想要自动化的任务——用于报告目的,这些任务否则需要手动完成。这个概念类似于 Excel 宏。宏可用于以下事项:- 重新加载应用程序。
- As well as to create objects.
512. Explain the fact constellation schema.
解释事实星座模式。
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb806f | 官方: 否 | 付费: 否
答案:
A fact constellation schema is basically a way to represent a multidimensional model. This model includes several fact tables which share some common dimension tables. It can be considered a collection of multiple star schemas and is therefore also known as a galaxy schema.
事实星座模式基本上是一种表示多维模型的方式。该模型包括多个事实表,这些事实表共享一些公共维度表。它可以被视为多个星型模式的集合,因此也称为星系模式。
In the above diagram, yellow-coloured Dimension tables are the ones common to both star schemas. The blue-coloured fact tables correspond to their respective star schemas.
在上述图中,黄色的维度表是两个星型模式共有的。蓝色的事实表对应于它们各自的星型模式。
513. Explain aggregate functions.
解释聚合函数。
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2b58d557c902bb8072 | 官方: 否 | 付费: 否
答案:
In QlikView, you can bundle or aggregate data from rows within a table by using the Aggregate function. This function lets you apply mathematical or statistical operations on large data chunks collectively. There are different types of aggregate functions in QlikView, each based on the actions they take on the data as shown below:
在 QlikView 中,你可以通过使用聚合函数将表中的行数据捆绑或聚合。此函数让你能够对大量数据块集体应用数学或统计操作。QlikView 中有不同类型的聚合函数,每种基于它们对数据执行的操作,如下所示:
514. What is a previous function in QlikView?
什么是 QlikView 中的 previous 函数?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2b58d557c902bb8075 | 官方: 否 | 付费: 否
答案:
A previous() function finds or determines the value of the ‘ expr ’ expression utilizing the data from the previous input record that hasn't been discarded due to a where clause. The function will return NULL in the first row of an internal table.
previous() 函数使用来自先前输入记录(未被 where 子句丢弃)的数据来查找或确定“ expr ”表达式的值。该函数在内部表的第一行将返回 NULL。
Syntax: Previous(expr)
语法:Previous(expr)
Here, expr is the expression that contains the data to be measured.
在这里,expr 是包含要测量数据的表达式。
515. Explain QlikView Dashboard.
解释 QlikView 仪表板。
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8078 | 官方: 否 | 付费: 否
答案:
QlikView Dashboards are essentially sheets or documents that contain various sheet objects containing the loaded data in the QlikView script. In a dashboard, values from various fields are displayed simultaneously. A dashboard allows users to view and analyze data in several ways and with different types of sheet objects.
QlikView 仪表板本质上是包含各种工作表对象的表格或文档,这些对象包含 QlikView 脚本中加载的数据。在仪表板中,各种字段的值会同时显示。仪表板允许用户通过多种方式和不同类型的表对象来查看和分析数据。
516. What is a container?
什么是容器?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb807b | 官方: 否 | 付费: 否
答案:
In QlikView, there is an object called CONTAINER that allows multiple chart objects to be displayed at once that can be accessed through tabs. In the container, multiple charts are housed in the same box, as shown below. You will see all charts in the same window, but only one will be active at a time, and you can navigate between charts using the bottom tabs. Tab positions can be changed to top, left, or right as well.
在 QlikView 中,有一个名为 CONTAINER 的对象,它允许同时显示多个图表对象,并可通过选项卡进行访问。在容器中,多个图表被安置在同一个框中,如下所示。您会看到所有图表位于同一个窗口中,但一次只有一个处于活动状态,您可以使用底部选项卡在图表之间导航。选项卡位置也可以更改为顶部、左侧或右侧。
Example: Look at the following snapshot. There are four different charts in one container, including Region-wise sales, Manpower distribution, Region-wise profit, and YoY growth. These charts can be accessed by clicking on their respective tabs.
示例:请看以下快照。一个容器中有四个不同的图表,包括按地区划分的销售额、人员分布、按地区划分的利润和同比增长率。可以通过单击它们各自的选项卡来访问这些图表。
517. What do you mean by applymap() in Qlik sense?
在 Qlik Sense 中,applymap() 是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb807e | 官方: 否 | 付费: 否
答案:
Using the ApplyMap() script function, you can map an expression's output to a previously loaded mapping table.
使用 ApplyMap() 脚本函数,您可以将表达式的输出映射到之前加载的映射表。
Syntax:
语法:
ApplyMap('map_name', expression [ , default_mapping ] )
ApplyMap('map_name', expression [ , default_mapping ] )
Here, - map_name: Name of a mapping table that has been created by a load or a select statement.
这里,- map_name:由加载或选择语句创建的映射表的名称。
- expression: The expression refers to the piece of the quote or the condition, whose result should be mapped.
- default_mapping: If the mapping table does not contain a matching value for an expression, this value is used as the default mapping value.
518. What is mapping load in QlikView?
QlikView 中的映射加载是什么?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8081 | 官方: 否 | 付费: 否
答案:
In QlikView, you can use the Mapping Load statement to load data fields and values (from pre-existing tables from various sources and models) into a newly created mapping table. These are temporary tables as they are automatically removed from the data model at the end of the script execution. Syntax:
在 QlikView 中,您可以使用 Mapping Load 语句将数据字段和值(来自各种来源和模型的现有表)加载到新创建的映射表中。这些是临时表,因为它们在脚本执行结束时自动从数据模型中移除。语法:
Mapping (loadstatement | selectstatement)
Mapping (loadstatement | selectstatement)
Here, the prefix 'Mapping' is used to LOAD/SELECT statements that instruct or command the system to save the loaded fields in a mapping table.
这里,前缀 'Mapping' 用于 LOAD/SELECT 语句,指示或命令系统将加载的字段保存到映射表中。
519. What are the different types of loads in QlikView?
QlikView 中有哪些不同类型的加载?
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8084 | 官方: 否 | 付费: 否
答案:
There are different methods or ways to load data into QlikView. Listed below are a few of them: - Data loading from file: It is a normal method used to load data into the Qlikview application. Data can be loaded from different types of files, including Excel, CSV, Text files, etc. You can achieve this by creating ODBC (Open Database Connectivity) and OLEDB (Object Linking and Embedding Database) as well as connecting directly to your database.
有多种方法或方式可以将数据加载到 QlikView 中。以下是其中的一些:- 从文件加载数据:这是将数据加载到 Qlikview 应用程序中的常用方法。可以从不同类型的文件(包括 Excel、CSV、文本文件等)加载数据。您可以通过创建 ODBC(开放数据库连接)和 OLEDB(对象链接和嵌入数据库)以及直接连接到数据库来实现这一点。
- Inline load: An inline load is another way to load data, which allows the user to define their own data and load it within Qlikview. It is possible to define Inline Data in the Inline Data Wizard.
- Incremental load: Incremental load in QlikView is used to load only newly added or changed records instead of the entire dataset every day. It will come in handy when a database is large.
- Buffer load: Buffer load in QlikView helps to create and maintain the QVD (QlikView Data) files automatically.
520. State difference between QlikView vs Qlik Sense.
说明 QlikView 与 Qlik Sense 之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: qlikview, bi;标签: interviewbit, qlikview, topic-specific, bi)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2b58d557c902bb8087 | 官方: 否 | 付费: 否
答案:
QlikView and Qlik Sense are the main products offered by the Qlik software company. Both QlikView and Qlik Sense are BI tools and have many similarities, but each is tailored to a particular market and serves a different purpose.
QlikView 和 Qlik Sense 是 Qlik 软件公司提供的主要产品。QlikView 和 Qlik Sense 都是 BI 工具,有许多相似之处,但每个都针对特定市场量身定制,并服务于不同的目的。
| QlikView | Qlik Sense |
|---|---|
| QlikView is a business intelligence tool that is widely used to provide analytical solutions, data visualization, and insight for business growth and monitoring. QlikView 是一种商业智能工具,广泛用于提供分析解决方案、数据可视化和业务增长与监控的洞察。 | It is a version of QlikView, launched in 2014, with some advanced features. It helps in building interactive dashboards and reports and also extracting data from various data sources. 它是 QlikView 的一个版本,于 2014 年推出,具有一些高级功能。它有助于构建交互式仪表板和报告,以及从各种数据源提取数据。 |
| With QlikView, you can perform analytical operations on data through Online Analytical Processing (OLAP). 使用 QlikView,您可以通过在线分析处理(OLAP)对数据执行分析操作。 | There is no OLAP functionality in Qlik Sense. Qlik Sense 中没有 OLAP 功能。 |
| QlikView does not support self-service visualization. Data mining and analytics are not available either. QlikView 不支持自助服务可视化。数据挖掘和分析也不可用。 | Qlik Sense supports self-service visualization. Data mining and analytics are also included. Qlik Sense 支持自助服务可视化。数据挖掘和分析也包括在内。 |
| It does provide guided analytics functionality. 它确实提供引导式分析功能。 | It does not provide guided analytics functionality. 它不提供引导式分析功能。 |
| QlikView provides basic visualizations. QlikView 提供基本可视化。 | The attractive interface of Qlik Sense makes it a favourite among consumers. Therefore, Qlik Sense provides modern visualizations for representing data along with simple drag-and-drop functionality. Qlik Sense 吸引人的界面使其成为消费者的最爱。因此,Qlik Sense 提供现代可视化来表示数据,以及简单的拖放功能。 |
| The tool is used by technical users since it is required to manipulate data via scripting. 该工具适用于技术用户,因为需要通过脚本操作数据。 | Furthermore, it can also be used by non-technical users. 此外,非技术用户也可以使用它。 |
| There are no AI-enabled insights (Artificial Intelligence) or chart suggestions in QlikView. QlikView 中没有 AI 支持的洞察(人工智能)或图表建议。 | Additionally, Qlik Sense provides AI-enabled insights and chart suggestions. 此外,Qlik Sense 提供 AI 支持的洞察和图表建议。 |
| Additionally, it enables us to integrate data from multiple sources and visualize those data. 此外,它使我们能够集成来自多个来源的数据并可视化这些数据。 | We can use it for data monitoring, security, application management, data auditing, data connectivity, and task management. 我们可以将其用于数据监控、安全性、应用程序管理、数据审计、数据连接和任务管理。 |
521. Write a function in R to create a scatter plot of two given vectors of numeric data?
编写一个 R 函数,用于创建两个给定数值向量的散点图?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81ef | 官方: 否 | 付费: 否
答案:
The function below creates a scatter plot of two given vectors of numeric data. It takes in two arguments: x and y, which are the vectors containing the numeric data for the x-axis and y-axis, respectively.
下面的函数创建两个给定数值数据向量的散点图。它接受两个参数:x和y,它们分别是包含x轴和y轴数值数据的向量。
scatter_plot <- function(x, y) {
scatter_plot <- function(x, y) {
Create the scatter plot using the plot() function
plot(x, y, main = "Scatter Plot", xlab = "x-axis data", ylab = "y-axis data", pch = 16)
plot(x, y, main = "Scatter Plot", xlab = "x-axis data", ylab = "y-axis data", pch = 16)
Add a regression line to the plot using the abline() function
abline(lm(y ~ x), col = "red")
abline(lm(y ~ x), col = "red")
}
To use the function, we simply pass in the vectors containing the numeric data for the x-axis and y-axis as arguments. For example, to create a scatter plot of the vectors x and y, we would call the function as follows:
要使用该函数,我们只需将包含x轴和y轴数值数据的向量作为参数传入。例如,要创建向量x和y的散点图,我们可调用该函数如下:
x <- c(1, 2, 3, 4, 5)
x <- c(1, 2, 3, 4, 5)
y <- c(1, 4, 9, 16, 25)
y <- c(1, 4, 9, 16, 25)
scatter_plot(x, y)
scatter_plot(x, y)
The resulting scatter plot would show the relationship between the values in the x and y vectors, with a red regression line added to the plot to show the overall trend of the data.
生成的散点图将显示x和y向量中数值之间的关系,并在图中添加一条红色回归线以显示数据的整体趋势。
522. Write a function in R to impute missing values in a given data frame?
写一个R函数来填补给定数据框中的缺失值?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81f2 | 官方: 否 | 付费: 否
答案:
The following function imputes missing values in a given data frame by replacing the missing values with the mean of the non-missing values in the column:
以下函数通过将缺失值替换为列中非缺失值的平均值来填补给定数据框中的缺失值:
Function to impute missing values
impute_missing <- function(data) {
impute_missing <- function(data) {
Loop through each column in the data frame
for(col in colnames(data)) {
for(col in colnames(data)) {
Calculate the mean of the non-missing values in the column
col_mean <- mean(data[,col], na.rm = TRUE)
col_mean <- mean(data[,col], na.rm = TRUE)
Replace missing values in the column with the calculated mean
data[is.na(data[,col]), col] <- col_mean
data[is.na(data[,col]), col] <- col_mean
}
Return the updated data frame with imputed missing values
return(data)
return(data)
}
To use the function, simply pass in the data frame as an argument:
要使用该函数,只需将数据框作为参数传入即可:
Impute missing values in the data frame
imputed_data <- impute_missing(data)
imputed_data <- impute_missing(data)
The function will replace the missing values in the data frame with the mean of the non-missing values in each column. This method of imputing missing values is useful when there are relatively few missing values in the data and the distribution of the values in the column is approximately normal.
该函数将用每列中非缺失值的均值替换数据框中的缺失值。当数据中缺失值相对较少,且列中数值分布近似正态分布时,这种填补缺失值的方法非常有用。
523. Write a function in R to calculate the covariance between two given vectors of numeric data?
在R中编写一个函数来计算两个给定数值向量的协方差?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81f6 | 官方: 否 | 付费: 否
答案:
To calculate the covariance between two vectors of numeric data in R, we can use the cov function from the stats package.
要在R中计算两个数值向量之间的协方差,我们可以使用stats包中的cov函数。
The cov function takes two arguments: the first is the first vector of numeric data and the second is the second vector of numeric data.
cov函数接受两个参数:第一个是第一个数值向量,第二个是第二个数值向量。
Here is an example of using the cov function to calculate the covariance between two vectors of numeric data:
以下是使用cov函数计算两个数值向量协方差的一个示例:
Load the stats package
library(stats)
library(stats)
Define the first vector of numeric data
vec1 <- c(1, 2, 3, 4, 5)
vec1 <- c(1, 2, 3, 4, 5)
Define the second vector of numeric data
vec2 <- c(10, 20, 30, 40, 50)
vec2 <- c(10, 20, 30, 40, 50)
Calculate the covariance between the two vectors
cov(vec1, vec2)
cov(vec1, vec2)
The output of this code will be the covariance between the two vectors.
这段代码的输出将是两个向量之间的协方差。
The covariance is a measure of how two variables are related. A positive covariance indicates that the two variables are positively correlated, while a negative covariance indicates that the two variables are negatively correlated. A covariance of zero indicates that the two variables are independent.
协方差是衡量两个变量相关程度的指标。正协方差表示两个变量正相关,负协方差表示两个变量负相关,协方差为零则表示两个变量相互独立。
In this example, the covariance between the two vectors is likely to be positive, since both vectors are increasing in the same direction. This indicates that there is a positive relationship between the two variables represented by the vectors.
在示例中,两个向量之间的协方差可能是正的,因为两个向量都朝相同方向递增。这表明由这两个向量所表示的两个变量之间存在正相关关系。
524. Write a function in R to create a bar plot of a given vector of categorical data?
在R中编写一个函数来为给定的类别型数据向量创建条形图?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81f9 | 官方: 否 | 付费: 否
答案:
To create a bar plot of a given vector of categorical data in R, we can use the function barplot(). The function takes the vector as an input and creates a bar plot showing the frequency of each category in the vector.
要在R中为给定的类别型数据向量创建条形图,我们可以使用barplot()函数。该函数以向量为输入,并创建一个显示向量中每个类别频数的条形图。
Here is an example of how to use the barplot() function in R:
以下是如何在 R 中使用 barplot() 函数的示例:
Create a vector of categorical data
data <- c("cat", "dog", "bird", "cat", "dog", "bird", "bird")
data <- c("cat", "dog", "bird", "cat", "dog", "bird", "bird")
Create a bar plot of the vector
barplot(data)
barplot(data)
In this example, the barplot() function creates a bar plot showing the frequency of each category in the vector. The plot shows that there are two "cat" values, two "dog" values, and three "bird" values in the vector.
在此示例中,barplot() 函数创建了一个条形图,显示向量中每个类别的频率。该图显示向量中有两个“cat”值、两个“dog”值和三个“bird”值。
We can also customize the bar plot by adding labels, changing the colors of the bars, and changing the width of the bars. Here is an example of how to customize the bar plot:
我们还可以通过添加标签、更改条形的颜色以及更改条形的宽度来自定义条形图。以下是自定义条形图的示例:
Create a vector of categorical data
data <- c("cat", "dog", "bird", "cat", "dog", "bird", "bird")
data <- c("cat", "dog", "bird", "cat", "dog", "bird", "bird")
Create a bar plot of the vector
barplot(data,
barplot(data,
main = "Frequency of Animal Types", # Add a title to the plot
main = "Frequency of Animal Types", # 为图添加标题
xlab = "Animal Type", # Add a label for the x-axis
xlab = "Animal Type", # 为 x 轴添加标签
ylab = "Frequency", # Add a label for the y-axis
ylab = "Frequency", # 为 y 轴添加标签
col = c("red", "blue", "green"), # Change the colors of the bars
col = c("red", "blue", "green"), # 更改条形的颜色
width = 0.5) # Change the width of the bars
width = 0.5) # 更改条形的宽度
In this example, the barplot() function creates a bar plot with customized labels, colors, and bar widths. The plot shows the frequency of each category in the vector and provides clear labels for the axes and the bars.
在此示例中,barplot() 函数创建了一个带有自定义标签、颜色和条形宽度的条形图。该图显示了向量中每个类别的频率,并为坐标轴和条形提供了清晰的标签。
525. Write a function in R to compute the correlation between two given vectors of numeric data?
编写一个 R 函数来计算两个给定数值向量的相关性?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81fc | 官方: 否 | 付费: 否
答案:
The function below will compute the correlation between two given vectors of numeric data in R.
下面的函数将在 R 中计算两个给定数值向量的相关性。
correlation_vectors <- function(vector1, vector2) {
correlation_vectors <- function(vector1, vector2) {
Compute the correlation between the two vectors
result <- cor(vector1, vector2)
result <- cor(vector1, vector2)
Return the result
return(result)
return(result)
}
To use this function, simply pass in the two vectors as arguments when calling the function, like so:
要使用此函数,只需在调用函数时传递两个向量作为参数,如下所示:
vector1 <- c(1, 2, 3, 4, 5)
vector1 <- c(1, 2, 3, 4, 5)
vector2 <- c(5, 4, 3, 2, 1)
vector2 <- c(5, 4, 3, 2, 1)
correlation_vectors(vector1, vector2)
correlation_vectors(vector1, vector2)
This will compute the correlation between the two vectors and return the result. In this example, the result will be -1, indicating a perfect negative correlation between the two vectors.
这将计算两个向量之间的相关性并返回结果。在此示例中,结果将为 -1,表示两个向量之间存在完全负相关。
- Data Science
- All Events
- My Events
526. Write a function in R to calculate the standard deviation of a given vector of numbers?
如何用 R 编写一个函数来计算给定数字向量的标准差?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb81ff | 官方: 否 | 付费: 否
答案:
To calculate the standard deviation of a vector of numbers in R, we can use the built-in function sd(). This function takes a vector of numbers as input and returns the standard deviation of the numbers in the vector.
要在 R 中计算数字向量的标准差,我们可以使用内置函数 sd()。该函数接受一个数字向量作为输入,并返回向量中数字的标准差。
Here is an example of how to use this function:
以下是如何使用此函数的示例:
Create a vector of numbers
numbers <- c(1, 2, 3, 4, 5)
numbers <- c(1, 2, 3, 4, 5)
Calculate the standard deviation of the numbers
sd(numbers)
sd(numbers)
This code creates a vector of numbers and then calculates the standard deviation of those numbers using the sd() function. The result of this calculation is printed on the screen.
此代码创建一个数字向量,然后使用 sd() 函数计算这些数字的标准差。计算结果将打印在屏幕上。
The standard deviation is a measure of how much the numbers in a vector differ from the mean of the numbers. It is calculated by taking the square root of the sum of the squares of the differences between each number and the mean, divided by the number of numbers in the vector. This allows us to see how far the numbers are spread out from the mean and can help us identify any outliers or unusual values in the data.
标准差是衡量向量中数字与数字均值之间差异程度的指标。它的计算方法是取每个数字与均值之差的平方和除以向量中数字的个数,然后开平方根。这样可以让我们了解数字相对于均值的分布范围,并有助于识别数据中的任何异常值或不寻常的值。
The sd() function in R is a convenient and easy way to calculate the standard deviation of a vector of numbers. It can be used in a variety of data analysis and statistical modelling tasks and can be combined with other functions and tools in R to perform more complex analyses and calculations.
R 中的 sd() 函数是计算数字向量标准差的一种方便且简单的方法。它可用于各种数据分析和统计建模任务,并可与 R 中的其他函数和工具结合使用,以执行更复杂的分析和计算。
527. Write a function in R to generate random numbers from a specified distribution?
如何用 R 编写一个函数来从指定分布生成随机数?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb8202 | 官方: 否 | 付费: 否
答案:
To generate random numbers from a specified distribution in R, we can use the r function from the stats package. This function takes the name of the distribution as its first argument, followed by any necessary parameters for that distribution.
要从指定分布在R中生成随机数,我们可以使用stats包中的r函数。该函数的第一个参数是分布名称,后面跟该分布所需的必要参数。
For example, to generate random numbers from a normal distribution with a mean of 0 and a standard deviation of 1, we can use the following code:
例如,要生成均值为0、标准差为1的正态分布随机数,可以使用以下代码:
Load the stats package
library(stats)
library(stats)
Generate 10 random numbers from a normal distribution
random_numbers <- rnorm(n = 10, mean = 0, sd = 1)
random_numbers <- rnorm(n = 10, mean = 0, sd = 1)
Print the random numbers
print(random_numbers)
print(random_numbers)
In this code, we use the rnorm function from the stats package to generate 10 random numbers from a normal distribution with a mean of 0 and a standard deviation of 1. We then print the resulting random numbers to the console.
在这段代码中,我们使用stats包中的rnorm函数从均值为0、标准差为1的正态分布中生成10个随机数。然后将生成的随机数打印到控制台。
Alternatively, we can use the sample function from the base R package to generate random numbers from a specified distribution. This function takes a vector of values as its first argument, followed by the number of samples to generate and any necessary parameters for the distribution.
或者,我们可以使用R基础包中的sample函数从指定分布生成随机数。该函数的第一个参数是一个值向量,后面跟要生成的样本数量以及该分布所需的必要参数。
For example, to generate 10 random numbers from a uniform distribution between 0 and 1, we can use the following code:
例如,要生成10个在0和1之间均匀分布的随机数,可以使用以下代码:
Load the base R package
library(base)
library(base)
Generate 10 random numbers from a uniform distribution
random_numbers <- sample(x = 0:1, size = 10, replace = TRUE, prob = NULL)
random_numbers <- sample(x = 0:1, size = 10, replace = TRUE, prob = NULL)
Print the random numbers
print(random_numbers)
print(random_numbers)
In this code, we use the sample function to generate 10 random numbers from a uniform distribution between 0 and 1. We specify the range of values to sample from using the x argument, and the number of samples to generate using the size argument. We set the replace and prob arguments to their default values to use a simple uniform distribution. We then print the resulting random numbers to the console.
在这段代码中,我们使用sample函数生成10个在0和1之间均匀分布的随机数。我们使用x参数指定要从中采样的值范围,并使用size参数指定要生成的样本数量。我们将replace和prob参数设置为默认值以使用简单的均匀分布。然后将生成的随机数打印到控制台。
528. Write a function in R to create a histogram of a given vector of numeric data?
编写一个R函数来创建给定数值数据向量的直方图?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb8205 | 官方: 否 | 付费: 否
答案:
To create a histogram of a given vector of numeric data in R, we can use the hist() function. This function takes in the vector of numeric data as the first argument, and can also take in optional arguments such as the number of bins to use in the histogram, the color and fill of the bars, and labels for the x and y axes.
要在R中为给定数值数据向量创建直方图,我们可以使用hist()函数。该函数的第一个参数是数值数据向量,还可以接受可选参数,如直方图中使用的箱数、条形的颜色和填充,以及x轴和y轴的标签。
For example, to create a histogram of the vector x with 10 bins, filled with the color "red", and labeled axes, we can use the following code:
例如,要为向量x创建一个带10个箱、用“red”颜色填充且带轴标签的直方图,可以使用以下代码:
hist(x,
hist(x,
breaks = 10,
breaks = 10,
col = "red",
col = "red",
xlab = "X values",
xlab = "X 值",
ylab = "Frequency")
ylab = "频率")
This will create a histogram with 10 bins, where each bin represents a range of values in the vector x, and the height of the bar in each bin represents the number of values in that range. The histogram will be filled with the color "red", and the x and y axes will be labeled with the provided labels.
这将创建一个包含 10 个箱的直方图,其中每个箱代表向量 x 中的一个数值范围,每个箱中条形的高度代表该范围内的数值个数。直方图将以颜色“红色”填充,x 轴和 y 轴将使用提供的标签进行标注。
Alternatively, we can specify the bin edges directly using the breaks argument, rather than specifying the number of bins. For example, to create a histogram with the same x axis labels but with custom bin edges, we can use the following code:
或者,我们可以直接使用 breaks 参数指定箱边界,而不是指定箱的数量。例如,要创建具有相同 x 轴标签但使用自定义箱边界的直方图,可以使用以下代码:
hist(x,
hist(x,
breaks = c(0, 5, 10, 15, 20),
breaks = c(0, 5, 10, 15, 20),
col = "red",
col = "red",
xlab = "X values",
xlab = "X 值",
ylab = "Frequency")
ylab = "频率")
This will create a histogram with 4 bins, where the first bin represents values in the range 0 to 5, the second bin represents values in the range 5 to 10, and so on. The histogram will again be filled with the color "red", and the x and y axes will be labeled with the provided labels.
这将创建一个包含 4 个箱的直方图,其中第一个箱代表 0 到 5 范围内的值,第二个箱代表 5 到 10 范围内的值,依此类推。直方图再次以颜色“红色”填充,x 轴和 y 轴将使用提供的标签进行标注。
Overall, the hist() function is a useful tool for visualizing the distribution of numeric data in a vector, and can be customized with various arguments to suit the specific needs of the data.
总体而言,hist() 函数是可视化向量中数值数据分布的有用工具,可以通过各种参数进行自定义,以适应数据的特定需求。
529. Explain the concept of packages in R and how to use them?
解释 R 中包的概念以及如何使用它们?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8208 | 官方: 否 | 付费: 否
答案:
In R, a package is a collection of functions, data, and documentation that extends the capabilities of base R. Packages are created and maintained by members of the R community and provide a way to easily share code and data. To use a package in R, you first need to install it using the install.packages() function. For example, to install the dplyr package, you would run the following code:
在 R 中,包是一组函数、数据和文档的集合,扩展了基础 R 的功能。包由 R 社区的成员创建和维护,提供了一种轻松共享代码和数据的方式。要在 R 中使用包,首先需要使用 install.packages() 函数安装它。例如,要安装 dplyr 包,可以运行以下代码:
install.packages("dplyr")
install.packages("dplyr")
Once a package is installed, you can use it in your R code by using the library() function to load it. For example, to use the dplyr package, you would run the following code:
一旦安装了包,你可以通过使用 library() 函数将其加载到你的 R 代码中来使用它。例如,要使用 dplyr 包,你可以运行以下代码:
library(dplyr)
library(dplyr)
After loading the package, you can use any of the functions, data, or documentation included in the package. Some packages include many different functions and can be used to perform a wide range of tasks, while others are designed for a specific purpose and may only include a few functions.
加载包后,你可以使用包中包含的任何函数、数据或文档。有些包包含许多不同的函数,可用于执行广泛的任务,而其他包则专为特定目的设计,可能只包含几个函数。
530. What are the main features of R?
R 的主要特点是什么?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb820b | 官方: 否 | 付费: 否
答案:
- R is a powerful and widely-used programming language for statistical computing and data analysis.
It has a large and active user community, with a vast array of available packages and libraries for a wide range of applications.
- 它有一个庞大且活跃的用户社区,拥有大量适用于各种应用的包和库。
R is open-source, meaning it is freely available for possible modification and redistribution.
- R 是开源的,意味着它免费供可能的修改和再分发使用。
It has a highly expressive syntax and a rich set of built-in functions and data types.
- 它具有高度表达性的语法和丰富的内置函数及数据类型。
R is designed for handling large amounts of data and can handle both structured and unstructured data.
- R 专为处理大量数据而设计,可以处理结构化和非结构化数据。
It has strong support for data visualization, with a variety of tools and libraries for creating high-quality graphics and charts.
- 它提供了强大的数据可视化支持,有多种工具和库用于创建高质量的图形和图表。
R integrates seamlessly with other popular tools and technologies, such as SQL, Hadoop, and Python.
- R 与其他流行工具和技术(如 SQL、Hadoop 和 Python)无缝集成。
It has robust support for statistical modelling, machine learning, and other advanced data analysis techniques.
- 它对统计建模、机器学习和其他高级数据分析技术有稳健的支持。
R is actively developed and maintained by a team of dedicated contributors and volunteers, ensuring that it remains a cutting-edge tool for data science.
- R 由一个专门的贡献者和志愿者团队积极开发和维护,确保它保持作为数据科学前沿工具的地位。
531. What is the difference between R and other programming languages?
R 和其他编程语言有什么区别?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb820e | 官方: 否 | 付费: 否
答案:
- R is specifically designed for data analysis and processing, whereas other programming languages like Python, Java, and C++ have a more general-purpose usage.
R has a wide range of built-in statistical and graphical techniques, making it a powerful tool for data exploration and visualization. Other programming languages may require additional libraries or packages to perform similar functions.
- R 具有广泛的内置统计和图形技术,这使得它成为数据探索和可视化的强大工具。其他编程语言可能需要额外的库或包才能执行类似功能。
R has a large and active community of users and developers who contribute to its development, which results in regular updates and improvements to the language.
- R 拥有一个庞大且活跃的用户和开发者社区,他们为语言的发展做出贡献,这导致该语言定期更新和改进。
R syntax is relatively simple and easy to learn, making it accessible to people with little or no programming experience.
- R 语法相对简单易学,使得几乎或完全没有编程经验的人也能轻松上手。
R is widely used in the field of statistics, data science, and research, while other programming languages have a broader range of applications.
- R 在统计学、数据科学和研究领域被广泛使用,而其他编程语言则拥有更广泛的应用范围。
R is an open-source programming language, which means that it is free to use and distribute, and users can access the source code and make modifications as per their needs.
- R 是一种开源编程语言,这意味着它可以免费使用和分发,用户可以访问源代码并根据需要进行修改。
R has a vast library of packages that are developed by the community and are available for the users to use, which makes it more flexible and efficient for certain tasks.
- R 拥有庞大的包库,这些包由社区开发并可供用户使用,这使得它在某些任务上更加灵活和高效。
R supports functional programming, which is a powerful programming paradigm, making it suitable for performing complex tasks.
- R 支持函数式编程,这是一种强大的编程范式,使其适合执行复杂任务。
532. Can you explain the basics of R programming syntax?
你能解释一下 R 编程语法的基础知识吗?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb8211 | 官方: 否 | 付费: 否
答案:
The basics of R programming syntax include:
R 编程语法的基础知识包括:
Comments: Comments in R are denoted by the pound sign (#), and are used to provide explanations or notes about the code. 2. Variable assignment: Variables in R are assigned using the assignment operator (=). For example, x = 3 assigns the value 3 to the variable x. 3. Basic data types: R has several basic data types, including numeric (integer and decimal), character (string), logical (true/false), and NULL (no value). 4. Operators: R has a variety of operators that can be used to perform mathematical and logical operations on variables, such as + (addition), - (subtraction), * (multiplication), and %in% (membership). 5. Functions: Functions in R are used to perform specific operations or calculations on data, and can be created and customized by the user. 6. Packages: R has a large number of packages that provide additional functionality and data, and can be installed and loaded into the R environment. 7. Control structures: R has control structures that allow for the creation of conditional and looping statements, such as if/else and for loops. 8. Input/output: R can read and write data from various sources, including files and databases, and can also output results in various formats.
- 注释:R 中的注释用井号 (#) 表示,用于对代码提供解释或说明。 2. 变量赋值:R 中的变量使用赋值运算符 (=) 进行赋值。例如,x = 3 将值 3 赋给变量 x。 3. 基本数据类型:R 有几种基本数据类型,包括数值型(整数和小数)、字符型(字符串)、逻辑型(真/假)和 NULL(无值)。 4. 运算符:R 有多种运算符可用于对变量执行数学和逻辑运算,例如 +(加法)、-(减法)、*(乘法)和 %in%(成员判断)。 5. 函数:R 中的函数用于对数据执行特定操作或计算,用户可创建和自定义函数。 6. 包:R 有大量提供额外功能和数据的包,可安装并加载到 R 环境中。 7. 控制结构:R 具有控制结构,允许创建条件和循环语句,例如 if/else 和 for 循环。 8. 输入/输出:R 可以从各种来源(包括文件和数据库)读取和写入数据,也可以以多种格式输出结果。
Successful Tech Career for FREE!
免费开启成功的科技职业生涯!
Successful Tech Career!
成功的技术职业生涯!
Interview Process
面试流程
CTC & Designation
CTC与职位级别
Projects on the Job
工作项目
Referral System
推荐系统
Try It Out
试试看
2 Lakh+ Roadmaps Created
已生成20万+职业规划
533. How can you create variables and assign values in R?
如何在 R 中创建变量并赋值?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8214 | 官方: 否 | 付费: 否
答案:
There are several ways to create variables and assign values in R. Some common ways include: - Using the assignment operator " # create a variable called "x" and assign it the value 5
在 R 中有多种创建变量和赋值的方法。一些常见的方法包括:- 使用赋值运算符 " # 创建一个名为"x"的变量并赋值为 5
x <- 5 - Using the "=" sign to assign a value to a variable name:
x <- 5 - 使用"="符号将值赋给变量名:
create a variable called "y" and assign it the value 10
y = 10 - Using the " # create a variable called "z" in the global environment and assign it the value 15
y = 10 - 使用 " # 在全局环境中创建一个名为"z"的变量并赋值为 15
z <<- 15 - Using the "assign()" function to assign a value to a variable name:
z <<- 15 - 使用"assign()"函数将值赋给变量名:
create a variable called "a" and assign it the value 20
assign("a", 20)
assign("a", 20)
Note that in all of these examples, the variable name should not contain any spaces or special characters, and should start with a letter.
注意,在所有上述示例中,变量名不应包含空格或特殊字符,且应以字母开头。
534. Can you explain the different data types in R and how to handle them?
你能解释一下 R 中的不同数据类型以及如何处理它们吗?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8217 | 官方: 否 | 付费: 否
答案:
In R, there are different data types that can be used to store and manipulate data. These data types include:
在 R 中,有不同的数据类型可用于存储和处理数据。这些数据类型包括:
Numeric: Numeric data types store numbers, either integers or floating-point values. These data types are used for numerical calculations and are typically stored in memory as binary digits. 2. Character: Character data types store text values, such as strings of letters, numbers, and symbols. These data types are often used to store text data and are stored in memory as characters. 3. Factor: Factor data types are used to store categorical data, such as gender, country, or product type. Factors are typically stored as integer values in memory, with each unique category assigned a corresponding integer value. 4. Logical: Logical data types store boolean values, either TRUE or FALSE. These data types are typically used in conditional statements to evaluate whether a certain condition is met.
- 数值型:数值型数据类型用于存储数字,包括整数或浮点值。这些数据类型用于数值计算,通常在内存中以二进制数字形式存储。 2. 字符型:字符型数据类型用于存储文本值,如字母、数字和符号组成的字符串。这些数据类型常用于存储文本数据,在内存中以字符形式存储。 3. 因子型:因子型数据类型用于存储分类数据,如性别、国家或产品类型。因子在内存中通常以整数值存储,每个唯一类别对应一个整数值。 4. 逻辑型:逻辑型数据类型用于存储布尔值,即TRUE或FALSE。这些数据类型通常用于条件语句中,以评估是否满足特定条件。
To handle these data types in R, you can use various functions and operators. For example, you can use the as.numeric() function to convert a character or factor value to a numeric data type, or you can use the is.factor() function to check if a variable is a factor data type. Additionally, you can use logical operators, such as "&" and "|", to evaluate conditions and return boolean values.
在R中处理这些数据类型时,可以使用各种函数和运算符。例如,可以使用as.numeric()函数将字符或因子值转换为数值数据类型,或使用is.factor()函数检查变量是否为因子数据类型。此外,还可以使用逻辑运算符(如“&”和“|”)来评估条件并返回布尔值。
535. How can you import and export data in R?
如何在R中导入和导出数据?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb821a | 官方: 否 | 付费: 否
答案:
Data can be imported and exported in R using the read.table() and write.table() functions, respectively.
在R中,可以使用read.table()和write.table()函数分别导入和导出数据。
To import data from a file, use the read.table() function with the file path and the delimiter of the data as arguments. For example:
要从文件导入数据,请使用read.table()函数,并将文件路径和数据的分隔符作为参数。例如:
data <- read.table("data.txt", sep=",")
data <- read.table("data.txt", sep=",")
To export data to a file, use the write.table() function with the data object, the file path, and the delimiter as arguments. For example:
要将数据导出到文件,请使用write.table()函数,并将数据对象、文件路径和分隔符作为参数。例如:
write.table(data, "data.txt", sep=",")
write.table(data, "data.txt", sep=",")
Alternatively, data can also be imported and exported using other functions such as read.csv() and write.csv() for CSV files, read.xlsx() and write.xlsx() for Excel files, and read.sav() and write.sav() for SPSS files.
另外,数据也可以通过其他函数导入和导出,例如使用read.csv()和write.csv()处理CSV文件,使用read.xlsx()和write.xlsx()处理Excel文件,使用read.sav()和write.sav()处理SPSS文件。
536. Explain the concept of data frames in R?
解释R中数据框的概念?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb821d | 官方: 否 | 付费: 否
答案:
A data frame in R is a table-like data structure that contains multiple variables of different data types in the same row. It is a two-dimensional data structure that allows for easy manipulation and analysis of data. Each variable in a data frame is represented as a column, and each row contains a record of the observations for each variable. Data frames are a fundamental data type in R, and are commonly used for working with large datasets. They can be created from various sources, including CSV files, databases, and other data structures, and can be easily manipulated and transformed using various R functions.
R中的数据框是一种表状数据结构,包含同一行中多个不同数据类型的变量。它是一种二维数据结构,便于数据的操作和分析。数据框中的每个变量表示为列,每行包含每个变量观测值的记录。数据框是R中的基本数据类型,常用于处理大型数据集。它们可以从各种来源创建,包括CSV文件、数据库和其他数据结构,并可使用各种R函数轻松操作和转换。
Example - Consider the below table
示例 - 考虑下面的表格
| Student ID 学生ID | Name 姓名 | Quiz 1 测验1 | Quiz 2 测验2 | Midterm 期中考试 | Final 期末考试 |
|---|---|---|---|---|---|
| 1001 | Alice | 85 | 92 | 89 | 93 |
| 1002 | Bob | 78 | 84 | 80 | 87 |
| 1003 | Charlie | 92 | 88 | 91 | 90 |
| 1004 | David | 80 | 77 | 85 | 82 |
In this table, each row represents a student, and each column represents a type of assessment. The columns include Quiz 1, Quiz 2, Midterm, and Final. The values in each cell represent the score that each student received on the corresponding assessment.
在此表中,每行代表一个学生,每列代表一种评估类型。列包括测验1、测验2、期中考试和期末考试。每个单元格中的值代表每个学生在相应评估中获得的分数。
For example, Alice received a score of 85 on Quiz 1, a score of 92 on Quiz 2, a score of 89 on the Midterm, and a score of 93 on the Final.
例如,Alice在测验1中获得85分,测验2中获得92分,期中考试中获得89分,期末考试中获得93分。
To create this data frame, The R Code -
要创建此数据框,R代码为 -
Create a data frame
my_data <- data.frame(
my_data <- data.frame(
"Student ID" = c(1001, 1002, 1003, 1004),
"学生ID" = c(1001, 1002, 1003, 1004),
"Name" = c("Alice", "Bob", "Charlie", "David"),
"姓名" = c("Alice", "Bob", "Charlie", "David"),
"Quiz 1" = c(85, 78, 92, 80),
"测验1" = c(85, 78, 92, 80),
"Quiz 2" = c(92, 84, 88, 77),
"测验2" = c(92, 84, 88, 77),
"Midterm" = c(89, 80, 91, 85),
"期中" = c(89, 80, 91, 85),
"Final" = c(93, 87, 90, 82)
"期末" = c(93, 87, 90, 82)
)
Print the data frame
print(my_data)
print(my_data)
537. How can you perform basic statistical analysis in R?
如何在R中执行基础统计分析?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8220 | 官方: 否 | 付费: 否
答案:
To perform basic statistical analysis in R, follow these steps: - Install and load the necessary packages. For example, to perform basic descriptive statistics, you can use the "psych" package. To install and load it, run the following code:
要在R中执行基础统计分析,请按照以下步骤:- 安装并加载必要的包。例如,要执行基础描述性统计,可以使用"psych"包。要安装并加载它,运行以下代码:
install.packages("psych")
install.packages("psych")
library(psych) - Import or create the data you want to analyze. You can import data from a file or create it manually by entering the values in a vector. For example, to create a vector of 10 random numbers, you can use the rnorm() function:
library(psych) - 导入或创建要分析的数据。你可以从文件导入数据,或通过在向量中输入数值手动创建数据。例如,要创建一个包含10个随机数的向量,可以使用rnorm()函数:
data <- rnorm(10) - Use the appropriate function to perform the statistical analysis. For example, to calculate the mean of the data, you can use the mean() function:
data <- rnorm(10) - 使用适当的函数执行统计分析。例如,要计算数据的平均值,可以使用mean()函数:
mean(data) - To visualize the data, use the appropriate plotting function. For example, to create a histogram of the data, you can use the hist() function:
mean(data) - 要可视化数据,使用适当的绘图函数。例如,要创建数据的直方图,可以使用hist()函数:
hist(data) - To perform more advanced statistical analysis, you can use additional functions from the packages or from other packages. For example, to perform a t-test, you can use the t.test() function:
hist(data) - 要执行更高级的统计分析,可以使用包中的其他函数或其他包中的函数。例如,要执行t检验,可以使用t.test()函数:
t.test(data)
t.test(data)
538. What are the different data visualization techniques in R?
R中有哪些不同的数据可视化技术?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8223 | 官方: 否 | 付费: 否
答案:
There are several data visualization techniques in R, including:
R中有多种数据可视化技术,包括:
Bar plots: for comparing categorical data 2. Histograms: for visualizing the distribution of numeric data 3. Scatter plots: for showing the relationship between two numeric variables 4. Line plots: for visualizing the trend of a numeric variable over time 5. Box plots: for displaying the range and quartiles of numeric data 6. Bubble plots: for visualizing three-dimensional data 7. Heatmaps: for visualizing the intensity of data across two dimensions 8. Pie charts: for displaying proportions of a whole 9. Network diagrams: for showing relationships between elements in a network 10. Sankey diagrams: for showing flows between elements in a system.
- 条形图:用于比较分类数据 2. 直方图:用于可视化数值数据的分布 3. 散点图:用于展示两个数值变量之间的关系 4. 折线图:用于可视化数值变量随时间变化的趋势 5. 箱线图:用于显示数值数据的范围和四分位数 6. 气泡图:用于可视化三维数据 7. 热力图:用于可视化数据在两个维度上的强度 8. 饼图:用于显示整体的比例 9. 网络图:用于展示网络中元素之间的关系 10. 桑基图:用于展示系统中元素之间的流动。
539. What is R (programming Language)?
什么是R(编程语言)?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb8226 | 官方: 否 | 付费: 否
答案:
R is an open-source programming language that is commonly utilized for statistical analysis and data processing. It is known for its command-line interface and can be run on various platforms such as Windows, Linux, and macOS. R is considered a cutting-edge tool in the field of data analysis and statistics.
R是一种开源编程语言,常用于统计分析和数据处理。它以其命令行界面而闻名,可以在Windows、Linux和macOS等多种平台上运行。R被认为是数据分析和统计领域的前沿工具。
540. What are the different control structures in R and how to use them?
R中有哪些不同的控制结构,如何使用它们?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8229 | 官方: 否 | 付费: 否
答案:
In R, there are several types of control structures that you can use to control the flow of execution in your code. These control structures include:
在R中,有几种类型的控制结构可以用来控制代码的执行流程。这些控制结构包括:
if statements: There are used to execute a certain block of code only if a certain condition is met. 2. for loops: There are used to repeat a block of code a specific number of times. 3. while loops: These are used to repeat a block of code while a certain condition is true. 4. repeat loops: These are similar to while loops but do not have a stopping condition, so they will continue to repeat the code until they are explicitly stopped.
- if语句:用于仅在满足特定条件时执行某段代码。 2. for循环:用于重复执行某段代码特定次数。 3. while循环:用于在某个条件为真时重复执行某段代码。 4. repeat循环:这些与while循环类似,但没有停止条件,因此会一直重复执行代码,直到被明确停止。
Here is an example of how you might use these control structures in R:
以下是在R中使用这些控制结构的一个示例:
If statement example
if (x > 10) {
if (x > 10) {
This code will only be executed if x is greater than 10
print("x is greater than 10")
print("x大于10")
}
For loop example
for (i in 1:10) {
for (i in 1:10) {
This code will be executed 10 times, with i taking on the values 1 through 10
print(i)
print(i)
}
While loop example
while (x < 100) {
while (x < 100) {
This code will be executed repeatedly as long as x is less than 100
x <- x + 1
x <- x + 1
print(x)
print(x)
}
Repeat loop example
repeat {
repeat {
This code will be executed repeatedly until the loop is explicitly stopped
x <- x + 1
x <- x + 1
print(x)
print(x)
Stop the loop if x becomes greater than 100
if (x > 100) {
if (x > 100) {
break
中断
}
}
In general, it's important to use control structures like these in your code to make it more readable and easier to understand. They also help you avoid writing repetitive code, which can make your code more efficient and less prone to errors.
总的来说,在你的代码中使用这类控制结构很重要,这样能让代码更易读、更易于理解。它们还能帮助你避免编写重复的代码,从而使代码更高效、更不容易出错。
541. Explain the concept of functions in R and how to write them?
解释R中函数的概念,以及如何编写函数?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb822c | 官方: 否 | 付费: 否
答案:
In R, a function is a block of code that takes one or more inputs (called arguments), performs a set of operations on those inputs, and returns one or more outputs (called return values). Functions are useful because they allow us to reuse code and avoid repeating the same operations multiple times.
在R中,函数是一段代码块,它接受一个或多个输入(称为参数),对这些输入执行一系列操作,并返回一个或多个输出(称为返回值)。函数很有用,因为它们允许我们重用代码,避免重复执行相同的操作。
To write a function in R, we use the "function" keyword followed by a pair of parentheses, inside which we specify the input arguments. The body of the function is contained within a pair of curly braces, and within this body, we can perform any operations we want on the input arguments and return the desired output.
要在R中编写函数,我们使用“function”关键字,后跟一对圆括号,在其中指定输入参数。函数体包含在一对花括号内,在这个函数体内,我们可以对输入参数执行任何我们想要的操作,并返回所需的输出。
Here is an example of a simple function that takes a numeric vector as input and returns the sum of its elements:
这里是一个简单函数的示例,它接受一个数值向量作为输入,并返回其元素的和:
Define the function
sum_vector <- function(x) {
sum_vector <- function(x) {
Calculate the sum of the vector elements
sum_x <- sum(x)
sum_x <- sum(x)
Return the sum
return(sum_x)
return(sum_x)
}
Call the function with a sample vector
v = c(1, 2, 3, 4, 5)
v = c(1, 2, 3, 4, 5)
sum_vector(v)
sum_vector(v)
The function first calculates the sum of the elements in the input vector using the "sum()" function, and then returns this value using the "return()" function. When we call the function with a sample vector, it will output the sum of the vector elements.
该函数首先使用“sum()”函数计算输入向量中元素的和,然后使用“return()”函数返回这个值。当我们用一个示例向量调用该函数时,它会输出向量元素的和。
542. Explain the concept of object-oriented programming in R?
解释R中面向对象编程的概念?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2e58d557c902bb822f | 官方: 否 | 付费: 否
答案:
Object-oriented programming (OOP) is a programming paradigm that revolves around the concept of "objects", which are self-contained units of data and functionality. In OOP, objects are created from user-defined classes, which act as templates that define the properties and behaviours of objects.
面向对象编程(OOP)是一种编程范式,它围绕“对象”的概念展开,对象是数据和功能的自包含单元。在OOP中,对象是从用户定义的类创建的,这些类作为模板,定义了对象的属性和行为。
In R, OOP is implemented through the use of the S3 and S4 classes. S3 classes are the simplest and most commonly used in R, and consist of a set of attributes and methods that define the object's characteristics and behaviour. S4 classes, on the other hand, are more complex and provide more control over object behaviour and inheritance.
在R中,面向对象编程通过使用S3和S4类来实现。S3类是最简单且在R中最常用的,由一组定义对象特征和行为的属性和方法组成。另一方面,S4类更为复杂,对对象行为及继承提供了更多控制。
OOP in R allows for the creation of more organized and modular code, as well as the ability to reuse and extend existing classes and objects. It also enables the use of polymorphism, which allows objects of different classes to be treated similarly, allowing for more flexible and dynamic code.
R中的面向对象编程允许创建更有组织和模块化的代码,同时也支持重用和扩展现有类与对象。它还支持多态性,使不同类的对象能够被类似地处理,从而实现更灵活和动态的代码。
543. What are the different classes in R and how to create them?
R中有哪些不同的类,以及如何创建它们?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8232 | 官方: 否 | 付费: 否
答案:
There are several classes in R, including: - Numeric: This class includes numbers, such as integers and floating point values. To create a numeric class in R, you can use the "as.numeric()" function. For example:
R中有几种不同的类,包括:- 数值型:此类包括整数和浮点数等数字。要在R中创建数值型类,可以使用"as.numeric()"函数。例如:
my_numeric_value <- as.numeric(2) - Character: This class includes strings or text values. To create a character class in R, you can use the "as.character()" function. For example:
my_numeric_value <- as.numeric(2) - 字符型:此类包括字符串或文本值。要在R中创建字符型类,可以使用"as.character()"函数。例如:
my_character_value <- as.character("Hello World") - Factor: This class includes categorical data that can be grouped into levels or categories. To create a factor class in R, you can use the "factor()" function. For example:
my_character_value <- as.character("Hello World") - 因子型:此类包括可以分组为水平或类别的分类数据。要在R中创建因子型类,可以使用"factor()"函数。例如:
my_factor_value <- factor(c("A", "B", "A", "C", "B")) - Date: This class includes the date and time values. To create a date class in R, you can use the "as.Date()" function. For example:
my_factor_value <- factor(c("A", "B", "A", "C", "B")) - 日期型:此类包括日期和时间值。要在R中创建日期型类,可以使用"as.Date()"函数。例如:
my_date_value <- as.Date("2022-01-01") - List: This class includes a collection of objects of different classes. To create a list class in R, you can use the "list()" function. For example:
my_date_value <- as.Date("2022-01-01") - 列表型:此类包括不同类别对象的集合。要在R中创建列表型类,可以使用"list()"函数。例如:
my_list_value <- list(1, "Hello", as.Date("2022-01-01"))
my_list_value <- list(1, "Hello", as.Date("2022-01-01"))
544. Explain the concept of exception handling in R?
解释R中异常处理的概念?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8235 | 官方: 否 | 付费: 否
答案:
Exception handling in R refers to the process of catching and handling errors or exceptions that may occur during the execution of a R script. This is important in ensuring that the script does not crash or stop executing due to an unexpected error or exception.
R中的异常处理是指捕获和处理在R脚本执行过程中可能发生的错误或异常的过程。这对于确保脚本不会因意外错误或异常而崩溃或停止执行非常重要。
To handle exceptions in R, we use the tryCatch() function which takes a code block as its first argument and one or more error-handling functions as subsequent arguments. These error-handling functions are executed when an error or exception occurs within the code block, allowing us to handle the error in a specific way.
要在R中处理异常,我们使用tryCatch()函数,该函数将代码块作为其第一个参数,并将一个或多个错误处理函数作为后续参数。当代码块内发生错误或异常时,这些错误处理函数会被执行,使我们能够以特定方式处理错误。
For example, we can use the tryCatch() function to suppress the error message and continue with the execution of the script, or to print a custom error message and exit the script. This allows us to gracefully handle errors and exceptions in our R code, improving the stability and reliability of our scripts.
例如,我们可以使用tryCatch()函数来抑制错误消息并继续执行脚本,或打印自定义错误消息并退出脚本。这使我们可以优雅地处理R代码中的错误和异常,从而提高脚本的稳定性和可靠性。
Certainly! R uses the tryCatch() function for exception handling. Here's an example code that demonstrates the usage of tryCatch() :
当然!R使用tryCatch()函数进行异常处理。下面是一个演示tryCatch()用法的示例代码:
Let's understand with the help of an example code to understand it better -
让我们借助一个示例代码来更好地理解它——
Define a function that throws an error
my_function <- function(x) {
my_function <- function(x) {
if (x < 0) {
if (x < 0) {
stop("Error: x cannot be negative")
stop("错误:x 不能为负数")
} else {
} else {
return(sqrt(x))
return(sqrt(x))
}
}
Call the function with valid input
result1 <- tryCatch({
result1 <- tryCatch({
my_function(25)
my_function(25)
}, error = function(e) {
}, error = function(e) {
print(paste("Caught an exception:", e$message))
print(paste("捕获到异常:", e$message))
})
Print the result
print(result1)
print(result1)
Call the function with invalid input
result2 <- tryCatch({
result2 <- tryCatch({
my_function(-10)
my_function(-10)
}, error = function(e) {
}, error = function(e) {
print(paste("Caught an exception:", e$message))
print(paste("捕获到异常:", e$message))
})
Print the result
print(result2)
print(result2)
In this example, we define a function called my_function() that takes a single input x. If x is negative, the function throws an error using the stop() function. Otherwise, it returns the square root of x.
在这个例子中,我们定义了一个名为 my_function() 的函数,它接受一个输入 x。如果 x 为负数,该函数会使用 stop() 函数抛出一个错误。否则,它返回 x 的平方根。
We then call my_function() twice - once with a valid input of 25, and once with an invalid input of -10. In each case, we wrap the function.
然后我们调用了两次 my_function()——一次使用有效输入 25,一次使用无效输入 -10。在每种情况下,我们都将函数包裹起来。
545. Explain the concept of regular expressions in R and how to use them?
解释 R 中正则表达式的概念以及如何使用它们?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb8238 | 官方: 否 | 付费: 否
答案:
Regular expressions, or "regex," are a set of characters and symbols used to match and find patterns in text. In R, regular expressions are typically used with the grep() function to search for specific patterns within a character vector.
正则表达式,或称“regex”,是一组用于匹配和查找文本中模式的字符和符号。在R中,正则表达式通常与grep()函数一起使用,以在字符向量中搜索特定模式。
To use regular expressions in R, you must first specify the pattern you are searching for using a combination of characters and special symbols. For example, the pattern [0-9] will match any single digit, while [A-Z] will match any uppercase letter.
要在R中使用正则表达式,你必须首先使用字符和特殊符号的组合来指定你要搜索的模式。例如,模式[0-9]将匹配任何单个数字,而[A-Z]将匹配任何大写字母。
Once you have specified the pattern, you can use the grep() function to search for that pattern within a character vector. For example, the code grep("[0-9]", c("apple", "banana", "1234")) will return the index positions of the vector where the pattern is found, in this case returning 3.
一旦指定了模式,你可以使用grep()函数在字符向量中搜索该模式。例如,代码grep("[0-9]", c("apple", "banana", "1234"))将返回找到该模式的向量索引位置,在此例中返回3。
Regular expressions can also include special symbols such as ^ to match the start of a string, $ to match the end of a string, and .* to match any characters in between. These symbols can be combined to create more complex patterns, allowing for more precise searches within a character vector.
正则表达式还可以包含特殊符号,如^匹配字符串的开头,$匹配字符串的结尾,以及.*匹配介于两者之间的任何字符。这些符号可以组合以创建更复杂的模式,从而允许在字符向量中进行更精确的搜索。
546. Explain the concept of time series analysis in R?
解释R中时间序列分析的概念?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb823b | 官方: 否 | 付费: 否
答案:
Time series analysis is a statistical method used to analyze and model the patterns and trends of data over time. This is typically used to forecast future values based on past data.
时间序列分析是一种统计方法,用于分析和建模数据随时间变化的模式和趋势。这通常用于根据过去的数据预测未来的值。
In R, time series analysis involves using functions and packages such as ts(), decompose(), and forecast() to manipulate and analyze time series data. This can include operations such as smoothing, filtering, and decomposition to better understand the underlying patterns and trends in the data. Time series analysis in R also often involves visualizing the data using plots and graphs to better understand the trends and patterns.
在R中,时间序列分析涉及使用ts()、decompose()和forecast()等函数和包来操作和分析时间序列数据。这可能包括平滑、滤波和分解等操作,以更好地理解数据中的底层模式和趋势。R中的时间序列分析通常还涉及使用图表和图形可视化数据,以更好地理解趋势和模式。
547. What is Shiny in R and how to use it for web development?
什么是R中的Shiny,以及如何使用它进行Web开发?
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c2e58d557c902bb823e | 官方: 否 | 付费: 否
答案:
Shiny is a web application framework for the R programming language. It allows users to create interactive web applications using R without needing to know any web development languages like HTML, CSS, or JavaScript.
Shiny是R编程语言的Web应用程序框架。它允许用户使用R创建交互式Web应用程序,而无需了解HTML、CSS或JavaScript等任何Web开发语言。
To use Shiny for web development, you first need to install the Shiny package in R. Once installed, you can use Shiny's functions and templates to create a web application. This typically involves writing R code to define the layout and functionality of the application, as well as any necessary data or visualizations.
要使用Shiny进行Web开发,你首先需要在R中安装Shiny包。安装后,你可以使用Shiny的函数和模板来创建Web应用程序。这通常涉及编写R代码来定义应用程序的布局和功能,以及任何必要的数据或可视化。
Once the application is complete, you can run it locally on your computer or deploy it to a Shiny server to make it available to others. Users can then access the application through a web browser and interact with it using the controls and features you have defined.
应用程序完成后,你可以将其在本地计算机上运行,或部署到Shiny服务器以使其可供他人使用。用户随后可以通过Web浏览器访问应用程序,并使用你定义的控件和功能与之交互。
Shiny is a powerful tool for creating interactive web applications using R and can be used for a wide range of purposes, including data analysis, visualization, and machine learning.
Shiny是使用R创建交互式Web应用程序的强大工具,可用于广泛的目的,包括数据分析、可视化和机器学习。
548. Write a function in R to calculate the mean of a given vector of numbers.
编写一个R函数来计算给定数字向量的均值。
- 知识点: 数据工程与数据科学/AI / 编程语言基础 (主题: r, statistics;标签: interviewbit, r, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c2f58d557c902bb8241 | 官方: 否 | 付费: 否
答案:
To calculate the mean of a given vector of numbers in R, we can use the mean() function from the base R package.
要计算R中给定数字向量的均值,我们可以使用基础R包中的mean()函数。
The syntax for the mean() function is as follows:
mean()函数的语法如下:
mean(x, na.rm = FALSE, trim = 0, ...)
mean(x, na.rm = FALSE, trim = 0, ...)
where x is the input vector of numbers, na.rm is a logical value indicating whether to remove missing values (NA) from the calculation, trim is the proportion of observations to trim from each end of the vector before calculating the mean, and ... are additional arguments.
其中 x 是数字输入向量,na.rm 是一个逻辑值,指示是否从计算中移除缺失值(NA),trim 是在计算均值之前从向量两端修剪的观测值比例,而 ... 是其他附加参数。
Here is an example of how to use the mean() function to calculate the mean of a vector of numbers:
以下是一个如何使用 mean() 函数计算数字向量均值的示例:
create a vector of numbers
x <- c(1, 2, 3, 4, 5)
x <- c(1, 2, 3, 4, 5)
calculate the mean of the vector
mean(x)
mean(x)
The output of this code is 3, which is the mean of the vector x (i.e. the sum of the elements divided by the number of elements).
这段代码的输出是 3,这是向量 x 的均值(即元素之和除以元素个数)。
In this example, we did not specify the na.rm and trim arguments, so the default values of FALSE and 0 were used, respectively. This means that no missing values were removed from the calculation, and no observations were trimmed from the vector before calculating the mean.
在此示例中,我们没有指定 na.rm 和 trim 参数,因此分别使用了默认值 FALSE 和 0。这意味着在计算中未移除缺失值,在计算均值前未从向量中修剪任何观测值。
We can also use the mean() function to calculate the mean of a vector with missing values, by setting the na.rm argument to TRUE:
我们还可以通过将 na.rm 参数设置为 TRUE,使用 mean() 函数计算含缺失值的向量的均值:
create a vector of numbers with missing values
x <- c(1, 2, 3, NA, 5)
x <- c(1, 2, 3, NA, 5)
calculate the mean of the vector, ignoring missing values
mean(x, na.rm = TRUE)
mean(x, na.rm = TRUE)
The output of this code is 2.8, which is the mean of the non-missing values in the vector x.
这段代码的输出是 2.8,这是向量 x 中非缺失值的均值。
Additionally, we can use the mean() function to calculate the mean of a vector after trimming a certain proportion of observations from each end of the vector:
此外,我们还可以使用 mean() 函数,在修剪向量两端一定比例的观测值后计算均值:
create a vector of numbers
x <- c(1, 2, 3, 4, 5)
x <- c(1, 2, 3, 4, 5)
calculate the mean of the vector after trimming 10% of observations from each end
mean(x, trim = 0.1)
mean(x, trim = 0.1)
The output of this code is 3.25, which is the mean of the vector x after trimming the first and last elements (i.e. the first and last 10% of observations).
这段代码的输出是 3.25,这是向量 x 在修剪第一个和最后一个元素(即首尾各 10% 的观测值)后的均值。
In summary, the mean() function is a useful tool for calculating the mean of a given vector of numbers in R. It allows us to easily remove missing values and trim observations from the calculation, making it a versatile and convenient way to calculate means in R.
总之,mean() 函数是 R 中计算给定数字向量均值的有用工具。它允许我们轻松移除缺失值并从计算中修剪观测值,使其成为在 R 中计算均值的一种多用途且便捷的方法。
549. Why choose SAS over other data analytical tools?
为什么选择 SAS 而非其他数据分析工具?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cd4 | 官方: 否 | 付费: 否
答案:
Listed below are a few reasons to choose SAS over other data analysis tools: - Learning and using SAS is very easy as compared to other analytics software tools. It has a better and more stable Graphic User Interface (GUI) and offers an easy option (PROC SQL) for users who are already familiar with SQL.
以下列出了选择SAS而非其他数据分析工具的几个理由:- 与其他分析软件工具相比,学习和使用SAS非常容易。它有更好且更稳定的图形用户界面(GUI),并为已熟悉SQL的用户提供简单的选项(PROC SQL)。
- Every day, data is growing and securing data becomes more complicated. SAS is very capable of storing and organizing large amounts of data smoothly and reliably.
- In the corporate world and large companies, SAS is often used, as it is more professional and easier to use compared to other languages. SAS jobs abound all over the market.
- SAS provides adequate graphical functionality. However, it provides limited customization options.
- Since SAS is licensed software and its updates are released in a controlled environment, all of its features have been thoroughly tested. As a result, there are fewer chances of errors.
- The customer service and technical support provided by SAS are outstanding. In any case, if a user runs into technical difficulties during installation, they will receive immediate assistance from the team.
- With its high level of security in terms of data privacy, SAS is a recognized and trusted name in the enterprise market.
550. What are some common mistakes that people make while writing programs in SAS?
人们在编写SAS程序时常犯的错误有哪些?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c4158d557c902bc6cd7 | 官方: 否 | 付费: 否
答案:
The following are some of the most common programming errors in SAS: - If a semicolon is missing from a statement, SAS will misinterpret not only that statement but potentially several that follow.
以下是SAS中最常见的一些编程错误:- 如果语句中缺少分号,SAS不仅会误解该语句,还可能误解后续的几条语句。
- A number of errors will result from unclosed quotes and unclosed comments because SAS may fail to read the subsequent statements correctly.
- Data and procedure steps have very different functions in SAS, so statements that are valid in one will probably cause errors in the other.
- Data is not sorted before using a statement that requires a sort
- Submitted programs are not checked for log entries.
- The quotation marks are not matched.
- The dataset option is invalid or the statement option is invalid.
- Debugging techniques are not used.
551. What are different ways to exclude or include specific variables in a dataset?
有哪些不同的方法可以在数据集中排除或包含特定变量?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cda | 官方: 否 | 付费: 否
答案:
DROP and KEEP statements can be used to exclude or include specific variables from a data set. - Drop Statement: This instructs SAS which variables to remove from the data set.
DROP和KEEP语句可用于从数据集中排除或包含特定变量。- Drop语句:这指示SAS从数据集中移除哪些变量。
Keep Statement: The variables in the data set to be retained are specified using this statement.
Example: Consider the following data set:示例:考虑以下数据集:
DATA outdata;
DATA outdata;
INPUT gender $ section score1 score2;
INPUT gender $ section score1 score2;
DATALINES;
DATALINES;
F A 17 20
F A 17 20
F B 25 17
F B 25 17
F C 12 15
F C 12 15
M D 21 25
M D 21 25
;
proc print;
proc print;
run;
运行;
The following DROP statement instructs SAS to drop variables score1 and score2.
以下DROP语句指示SAS删除变量score1和score2。
data readin;
data readin;
set outdata;
set outdata;
totalsum = sum(score1,score2);
totalsum = sum(score1,score2);
drop score1, score2;
drop score1, score2;
run;
运行;
Output:
输出:
Gender Section totalsum
性别 部分 总计
F A 37
F A 37
F B 42
F B 42
F C 27
F C 27
M D 46
M D 46
The following KEEP statement instructs SAS to retain score1 in the data set.
下面的KEEP语句指示SAS在数据集中保留score1。
data readin1;
data readin1;
set readin;
set readin;
keep score1;
keep score1;
run;
运行;
Output:
输出:
Gender Section score1 totalsum
性别 部分 score1 总计
F A 17 37
F A 17 37
F B 25 42
F B 25 42
F C 12 27
F C 12 27
M D 21 46
M D 21 46
552. Explain N and ERROR in SAS.
请解释 SAS 中的 N 和 _ERROR_。
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cdd | 官方: 否 | 付费: 否
答案:
In a SAS Data Step, there are two variables that are automatically created, namely, the ERROR variable and the N variable. - N_: Typically, this variable is used to keep track of the number of times a data step has been iterated. It is set to 1 by default. The variable _N increases every time the data step of a data statement is iterated.
在 SAS 数据步中,有两个自动创建的变量,即 ERROR 变量和 N 变量。- N_:通常,此变量用于跟踪数据步已经迭代的次数。默认情况下它被设置为 1。每次数据语句的数据步被迭代时,变量 _N 都会增加。
- _ERROR_: The value is 0 by default and gives information about any errors that occur during execution. Whenever there is an error, such as an input data error, a math error, or a conversion error, the value is set to 1. This variable can be used to locate errors in data records and to display an error message in the SAS log.
553. What do you mean by the "+" operator and sum function?
你所说的 “+” 运算符和 sum 函数是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c4158d557c902bc6ce0 | 官方: 否 | 付费: 否
答案:
In SAS, summation or addition is performed either with the “sum” function or by using the “+” operator. Function "Sum" returns the sum of arguments that are present (non-missing arguments), whereas "+" operator returns a missing value if one or more arguments are not present or missing.
在 SAS 中,求和或加法要么通过 “sum” 函数执行,要么通过使用 “+” 运算符执行。函数 “sum” 返回存在的(非缺失)参数之和,而 “+” 运算符在一个或多个参数不存在或缺失时返回缺失值。
Example: Consider a data set containing three variables a, b, and c.
示例:考虑一个包含三个变量 a、b 和 c 的数据集。
data variabledata;
data variabledata;
input a b c;
input a b c;
cards;
cards;
1 2 3
34 3 4
. 3 2
53 . 3
54 4 .
45 4 2
;
run;
运行;
There are missing values for all variables and we wish to compute the sum of all variables.
所有变量都存在缺失值,我们希望计算所有变量的总和。
data sumofvariables;
data sumofvariables;
set variabledata;
set variabledata;
x=sum(a,b,c);
x=sum(a,b,c);
y=a+b+c;
y=a+b+c;
run;
运行;
Output:
输出:
x y
x y
6 6
41 41
5 .
56 .
58 .
51 51
The value of y is missing for the 3rd, 4th, and 5th observations in the output.
在输出中,第3、4、5个观测的y值缺失。
554. Name different data types that SAS support.
列出SAS支持的不同数据类型。
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6ce3 | 官方: 否 | 付费: 否
答案:
SAS supports two data types, i.e., Character and Numeric . Dates are also considered characters despite the fact that there are implicit functions that can be performed on them.
SAS支持两种数据类型,即字符型和数值型。日期也被视为字符,尽管可以对它们执行隐式函数。
555. State the difference between using the drop = data set option in the set statement and data statement.
说明在set语句和data语句中使用drop=数据集选项的区别。
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6ce6 | 官方: 否 | 付费: 否
答案:
In SAS, the drop= option is used to exclude variables from processing or from the output data set. This option tells SAS which variables you wish to remove from a data set. - The drop= option in the set statement can be used if you do not wish to process certain variables or do not want to have them included in the new data set.
在SAS中,drop=选项用于从处理或输出数据集中排除变量。该选项告诉SAS您希望从数据集中移除哪些变量。- 如果您不希望处理某些变量或不希望它们包含在新数据集中,可以在set语句中使用drop=选项。
However, if you want to process certain variables but don't want them to be included in the new data set, then choose drop= in the data statement.
Syntax: DROP=variable(s);语法:DROP=变量(们);
In this case, variable(s) lists one or more names of variables. Variables can be listed in any format SAS supports.
在这种情况下,变量(们)列出一个或多个变量名。变量可以按照SAS支持的任意格式列出。
Example: Consider the following data set:
示例:考虑以下数据集:
DATA outdata;
DATA outdata;
INPUT gender $ section score1 score2;
INPUT gender $ section score1 score2;
DATALINES;
DATALINES;
F A 17 20
F A 17 20
F B 25 17
F B 25 17
F C 12 15
F C 12 15
M D 21 25
M D 21 25
;
proc print;
proc print;
run;
运行;
The following DROP= data set option command SAS to drop variables score1 and score2.
以下 DROP= 数据集选项命令 SAS 删除变量 score1 和 score2。
data readin;
data readin;
set outdata (drop = score1 score2);
set outdata (drop = score1 score2);
totalsum = sum(score1, score2);
totalsum = sum(score1, score2);
run;
运行;
Output:
输出:
Gender Section score1 score2 totalsum
Gender Section score1 score2 totalsum
F A . . .
F A . . .
F B . . .
F B . . .
F C . . .
F C . . .
M D . . .
M D . . .
556. What is the meaning of STOP and OUTPUT statements in SAS?
SAS 中 STOP 和 OUTPUT 语句的含义是什么?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c4158d557c902bc6ce9 | 官方: 否 | 付费: 否
答案:
- STOP Statement: Using STOP, SAS immediately stops processing the current DATA step and resumes processing statements after the current DATA step ends. In other words, the STOP statement halts the execution of all statements containing it, including DO statements and looping statements.
Syntax: STOP;
语法:STOP;
Example: As demonstrated in this example, STOP is used to avoid an infinite loop when using a random access method within a DATA step:
示例:如本例所示,在DATA步中使用随机访问方法时,STOP用于避免无限循环:
data sample;
data sample;
do developerobs=1 to engineeringobs by 10;
do developerobs=1 to engineeringobs by 10;
set master.research point=developerobs nobs=engineeringobs;
set master.research point=developerobs nobs=engineeringobs;
output;
output;
end;
结束;
stop;
stop;
run;
运行;
- OUTPUT Statement: Output tells SAS to write the current observation immediately to a SAS data set, not at the end of the DATA step. The current observation will be written to all data sets named in the DATA statement if there is no data set name specified in the OUTPUT statement.
Syntax: OUTPUT ;
语法:OUTPUT;
Example: Each line of input data can be used to create two or more observations. As given below, for each observation in the data set Scaler, three observations are created in the SAS data set Result.
示例:每行输入数据可用于创建两个或更多观测。如下所示,对于数据集Scaler中的每个观测,在SAS数据集Result中创建三个观测。
data Result(drop=time4-time6);
data Result(drop=time4-time6);
set Scaler;
set Scaler;
time=time4;
time=time4;
output;
output;
time=time5;
time=time5;
output;
output;
time=time6;
time=time6;
output;
output;
run;
运行;
557. Explain what is first and last in SAS?
解释SAS中的FIRST和LAST是什么?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cec | 官方: 否 | 付费: 否
答案:
SAS Programming always uses the BY and SET statements to group data based on the order of grouping. When both BY and SET statements are used together, SAS automatically creates two temporary variables, FIRST. and LAST. 'SAS' identifies the first and last observations of a group based on the values of the FIRST. and LAST. variables. These variables are always 1 or 0, depending on the following conditions: - FIRST.variable = 1 if an observation of a group is the first one in a BY group.
SAS编程中,总是使用BY和SET语句根据分组的顺序对数据进行分组。当BY和SET语句一起使用时,SAS会自动创建两个临时变量FIRST.和LAST.。SAS根据FIRST.和LAST.变量的值来识别组中的第一条和最后一条观测。这些变量始终为1或0,具体取决于以下条件:- 如果组中的观测是BY组中的第一条,则FIRST.variable=1。
- FIRST.variable = 0 if observation of group is not the first one in a BY group.
- LAST.variable = 1 if observation of group is the last one in a BY group.
LAST.variable = 0 if observation of group is not the last one in a BY group.
Essentially, SAS stores FIRST.variable and LAST.variable in a program data vector (PDV). As a result, they become available for DATA step processing. However, SAS will not add them to the output data set since they are temporary.本质上,SAS将FIRST.variable和LAST.variable存储在程序数据向量(PDV)中。因此,它们可用于DATA步骤的处理。但是,由于它们是临时的,SAS不会将它们添加到输出数据集中。
Example: In the following example, ID is a grouping variable containing duplicate entries. When FIRST.variable = 1 and LAST.variable = 1, it means that there is only a single value in the group like ID=4, ID=6 and ID=8 as shown below:
示例:在以下示例中,ID是一个包含重复条目的分组变量。当FIRST.variable=1且LAST.variable=1时,表示组中只有一个值,如ID=4、ID=6和ID=8所示,如下所示:
558. Consider the following expression stored in the variable address: 9/4 Infantry Marg Mhow CITY, MP, 453441
考虑存储在变量address中的以下表达式:9/4 Infantry Marg Mhow CITY, MP, 453441
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cef | 官方: 否 | 付费: 否
答案:
In the following scenario, what would the scan function return?
在以下场景中,SCAN函数将返回什么?
x=scan(address,3);
x=scan(address,3);
In the above program, we have used the scan function to read the 3rd word in the address string. The following output will the returned by the scan function:
在上述程序中,我们使用SCAN函数读取地址字符串中的第三个单词。SCAN函数将返回以下输出:
x=Marg;
x=Marg;
559. What do you mean by the Scan function in SAS and write its usage?
在SAS中,SCAN函数是什么意思,并写出它的用法?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c4158d557c902bc6cf2 | 官方: 否 | 付费: 否
答案:
The Scan() function is typically used to extract words from a value marked by delimiters (characters or special signs that separate words in a text string). The SCAN function selects individual words from text or variables containing text and stores them in new variables.
SCAN()函数通常用于从以分隔符(分隔文本字符串中单词的字符或特殊符号)标记的值中提取单词。SCAN函数从文本或包含文本的变量中选择单个单词,并将它们存储在新变量中。
Syntax:
语法:
scan(argument,n,delimiters)
scan(argument,n,delimiters)
In this case, - Argument: It specifies the character variable or text to be scanned.
在这种情况下,-参数:它指定要扫描的字符变量或文本。
- N: The number n indicates which word to read.
Delimiters: These are characters values or special signs in a text string.
Example:示例:
Consider that we would like to extract the first word from a sentence 'Hello, Welcome to Scaler!'. In this case, the delimiter used is a blank.
假设我们要从句子“Hello, Welcome to Scaler!”中提取第一个单词。在这种情况下,使用的分隔符是空格。
data _null_;
data _null_;
string="Hello, Welcome to Scaler!";
string="Hello, Welcome to Scaler!";
first_word=scan(string, 1, ' ' );
first_word=scan(string, 1, ' ' );
put first_word =;
put first_word =;
run;
运行;
First_word returns the word 'hello' since it's the first word in the above sentence. Now, consider that we would like to extract the last word from a sentence 'Hello, Welcome to Scaler!'. In this case, the delimiter used is a blank.
First_word返回单词“hello”,因为它是上述句子中的第一个单词。现在,假设我们要从句子“Hello, Welcome to Scaler!”中提取最后一个单词。在这种情况下,使用的分隔符是空格。
data _null_;
data _null_;
string="Hello, Welcome to Scaler!";
string="Hello, Welcome to Scaler!";
last_word=scan(string, -1, ' ' );
last_word=scan(string, -1, ' ' );
put last_word =;
put last_word =;
run;
运行;
Last_word returns 'Scaler!' As Scaler is the last word in the above sentence.
Last_word返回“Scaler!”,因为Scaler是上述句子中的最后一个单词。
560. State difference between Missover and Truncover in SAS.
说明SAS中Missover和Truncover之间的区别。
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4158d557c902bc6cf5 | 官方: 否 | 付费: 否
答案:
- Missover: The INPUT statement does not jump to the next line when the Missover option is used on the INFILE statement. If the INPUT statement cannot read the entire field specified due to the field length, it will set the value to missing. The variables with no values assigned are set to missing when an INPUT statement reaches the end of an input data record.
Example: An external file with variable-length records, for example, contains the following records:
示例:一个包含可变长度记录的外部文件,例如,包含以下记录:
1
22
333
4444
55555
Following are the steps to create a SAS data set using these data. The numeric informat 5 is used for this data step and the informatted length of the variable NUM is matched by only one input record.
以下是使用这些数据创建 SAS 数据集的步骤。此数据步骤使用数字输入格式 5,且变量 NUM 的格式化长度仅与一条输入记录匹配。
data readin;
data readin;
infile 'external-file' missover;
infile 'external-file' missover;
input NUM 5.;
input NUM 5.;
run;
运行;
proc print data=readin;
proc print data=readin;
run;
运行;
Output:
输出:
Obs ID
观测 ID
1 .
2 .
3 .
4 .
5 55555
Those values that were read from input records that were too short have been set to missing. This problem can be corrected by using the TRUNCOVER option in the INFILE statement: - Truncover: This option assigns the raw data value to the variable, even if it is shorter than what the INPUT statement expects.
从过短的输入记录中读取的那些值已被设置为缺失。此问题可通过在 INFILE 语句中使用 TRUNCOVER 选项来纠正: - Truncover:此选项将原始数据值赋给变量,即使其比 INPUT 语句期望的长度短。
Example:
示例:
An external file with variable-length records, for example, contains the following records:
例如,一个包含变长记录的外部文件包含以下记录:
1
22
333
4444
55555
Following are the steps to create a SAS data set using these data. The numeric informat 5 is used for this data step.
以下是使用这些数据创建 SAS 数据集的步骤。此数据步骤使用数字输入格式 5。
data readin;
data readin;
infile 'external-file' truncover;
infile 'external-file' truncover;
input NUM 5.;
input NUM 5.;
run;
运行;
proc print data=readin;
proc print data=readin;
run;
运行;
Output:
输出:
Obs ID
观测 ID
1 1
2 22
3 333
4 4444
5 55555
Those values that were read from input records that were too short are not set to missing.
从过短的输入记录中读取的值不会被设置为缺失值。
561. What is PDV (Program Data Vector)?
什么是 PDV(程序数据向量)?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: coding
- 分类: fullstack
- id: 69b37c4258d557c902bc6cf8 | 官方: 否 | 付费: 否
答案:
Logical areas of memory where SAS builds data sets, one observation at a time are called Program data vectors (PDVs). Whenever a program is executed, SAS usually reads data values from the input buffer or generates them based on SAS language statements and assigns these data values to specific or respective variables in the program data vector. The program data vector also includes two automatic variables i.e., N and ERROR variable.
内存中逻辑区域,SAS 在此构建数据集,一次一个观测,称为程序数据向量(PDV)。每当执行程序时,SAS 通常会从输入缓冲区读取数据值或基于 SAS 语言语句生成这些值,并将这些数据值分配给程序数据向量中的特定或相应变量。程序数据向量还包括两个自动变量,即 N 和 ERROR 变量。
562. What is the use of Retain in SAS?
SAS 中 RETAIN 的用途是什么?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4258d557c902bc6cfb | 官方: 否 | 付费: 否
答案:
SAS, at the start of each iteration of the data step, reads the data statement and puts the missing values of variables (assigned either through an INPUT statement or via an assignment statement within the data step) into the program data vector (logical areas of memory). RETAIN statements override this default. In other words, a RETAIN statement instructs SAS not to set variables to missing when moving from one iteration of the data step to another. The variables are instead retained.
SAS 在数据步每次迭代开始时,读取数据语句并将变量(通过 INPUT 语句或数据步内赋值语句分配的)的缺失值放入程序数据向量(内存中的逻辑区域)中。RETAIN 语句覆盖此默认行为。换句话说,RETAIN 语句指示 SAS 在从一个数据步迭代转到另一个迭代时,不要将变量设置为缺失值。相反,这些变量会被保留。
Syntax:
语法:
RETAIN variable1 variable2 ... variablen;
RETAIN 变量1 变量2 ... 变量n;
There are no limits to the number of variables you can specify. When you do not specify variable names, SAS retains the values of every variable that was created in INPUT or assignment statement by default.
您可以指定的变量数量没有限制。当您不指定变量名时,SAS 默认保留在 INPUT 或赋值语句中创建的每个变量的值。
563. Write down some capabilities of SAS Framework.
写出 SAS Framework 的一些功能。
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4258d557c902bc6cfe | 官方: 否 | 付费: 否
答案:
SAS Framework has the following four capabilities:
SAS Framework 具有以下四个功能:
- Access Data: Data accessibility is a powerful SAS capability. In other words, data can be accessed from different sources including raw databases, excel files, Oracle databases, SAS datasets, etc.
- Manage Data: SAS offers additional capabilities including data management. Data accessed from a variety of sources can thus be managed easily in order to generate useful insights. The process of managing data can include creating variables, validating data, cleaning data, creating subsets, etc. SAS manages the existing data to provide the data that you need.
- Analyze Data: SAS will analyze the data once it has been managed to perform simple evaluations like frequency and averages, along with more complex evaluations like forecasting, regression, etc.
- Present: The analyzed data can be saved and stored as a graphic report, a list, and overall statistics that can be printed or published. They can also be saved into a data file.
564. What are the essential features of SAS?
SAS 的基本特征是什么?
- 知识点: 数据工程与数据科学/AI (主题: sas, statistics;标签: interviewbit, sas, topic-specific, statistics)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c4258d557c902bc6d01 | 官方: 否 | 付费: 否
答案:
SAS has the following essential features:
SAS 具有以下基本特征:
- SAS offers extensive support for programmatically transforming and analyzing data in comparison to other BI (Business Intelligence) tools,
- SAS offers extensive support for programmatically transforming and analyzing data in comparison to other BI (Business Intelligence) tools.
- Furthermore, SAS is a platform-independent software, which means it can run on almost any operating system, including Linux, Windows, Mac, and Ubuntu.
- It provides very fine control over data manipulation and analysis, which is its USP.
- The SAS package provides a complete data analysis solution, ranging from simple figures to advanced analysis. One of the best features of SAS software is its Inbuilt Library, which contains all the necessary packages for data analysis and reporting.
- The reports can be visualized in the form of graphs that range from simple scatter plots and bar graphs to complex multi-page classification panels.
- Another feature of SAS is its support for multiple data formats. With SAS, you can read data from a variety of file types, formats, and even from files with missing data.
- Since SAS is a 4GL (4 Generation Programming Language), it has an easy-to-learn syntax, which makes it an essential feature.
565. What are the essential features of Snowflake?
Snowflake 的基本特征是什么?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76b0 | 官方: 否 | 付费: 否
答案:
Snowflake has the following key features: - With Snowflake, you can interact with the data cloud through a web interface. Users can navigate the web GUI to control their accounts, monitor resources, and monitor resources and system usage queries data, etc.
Snowflake 具有以下关键特征: - 通过 Snowflake,您可以通过 Web 界面与数据云交互。用户可以导航 Web 图形界面(GUI)来管理其账户、监控资源,并监控资源和系统使用情况、查询数据等。
- Users can connect to Snowflake's data cloud using a wide range of client connectors and drivers. Among these connectors are Python Connector (an interface for writing Python applications to connect to Snowflake), Spark connector, NodeJS driver, .NET driver, JBDC driver for Java development, ODBC driver for C or C++ programming, etc.
- The core architecture of Snowflake enables it to operate on the public cloud, where it uses virtualized computing instances and efficient storage buckets for processing huge amounts of big data cost-effectively and scalable.
- Snowflake integrates with a number of big data tools, including business intelligence, machine learning, data integration, security, and governance tools.
- With advanced features such as simplicity, increased performance, high concurrency, and profitability, Snowflake is incomparable to other traditional data warehouse solutions.
- Snowflake supports the storage of both structured and semi-structured data (such as JSON, Avro, ORC, Parquet, and XML data).
- Snowflake automates cloud data management, security, governance, availability, and data resilience, resulting in reduced costs, no downtime, and better operational efficiency.
- With it, users can rapidly query data from a database, without having an impact on the underlying dataset. This allows them to receive data closer to real-time.
- Most DDL (Data Definition Language) and DML (Data Manipulation Language) commands in SQL are supported by the Snowflake data warehouse. Additionally, advanced DML, lateral views, transactions, stored procedures, etc., are also supported.
566. Explain Snowflake Architecture.
解释 Snowflake 架构。
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: system-design
- 分类: fullstack
- id: 69b37c5358d557c902bc76b3 | 官方: 否 | 付费: 否
答案:
The Snowflake architecture is a hybrid of shared-disk (A common disk or storage device is shared by all computing nodes) and shared-nothing (Each computing node has a private memory and storage space) database architecture in order to combine the best of both. Snowflake utilizes a central data repository for persistent data, which is available to all compute nodes similar to a shared-disk architecture. But, equally, as with shared-nothing architectures, Snowflake uses massively parallel computing (MPP) clusters for query processing, in which each node stores part of the whole data set locally.
Snowflake架构是共享磁盘(所有计算节点共享一个通用磁盘或存储设备)和共享无盘(每个计算节点拥有私有内存和存储空间)数据库架构的混合体,旨在结合两者的优势。Snowflake利用一个中央数据仓库存储持久数据,类似于共享磁盘架构,所有计算节点均可访问。但同样地,与共享无盘架构一样,Snowflake使用大规模并行计算(MPP)集群进行查询处理,其中每个节点在本地存储整个数据集的一部分。
The Snowflake architecture is divided into three key layers as shown below: - Database Storage Layer: Once data has been loaded into Snowflake, this layer reorganizes that data into a specific format like columnar, compressed, and optimized format. The optimized data is stored in cloud storage.
Snowflake架构分为以下三个关键层:- 数据库存储层:数据加载到Snowflake后,此层将该数据重组为特定格式,如列式、压缩和优化格式。优化后的数据存储在云存储中。
- Query Processing Layer: In the processing layer, queries are executed using virtual warehouses. Virtual warehouses are independent MPP (Massively Parallel Processing) compute clusters comprised of multiple compute nodes that Snowflake allocates from cloud providers. Due to the fact that virtual warehouses do not share their compute resources with each other, their performance is independent of each other.
- Cloud Services Layer: It provides services to administer and manage a Snowflake data cloud, such as access control, authentication, metadata management, infrastructure management, query parsing, optimization, and many more.
567. What do you mean by virtual warehouse?
你所说的虚拟仓库是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76b7 | 官方: 否 | 付费: 否
答案:
A virtual warehouse is basically a collection of computing resources (like CPU, memory, Solid state drive, etc.) that customers can access to run queries, load data, and perform other DML (Data Manipulation Language) and SQL (Structured Query Language) operations.
虚拟仓库基本上是一组计算资源(如CPU、内存、固态硬盘等),客户可以访问这些资源来运行查询、加载数据以及执行其他DML(数据操作语言)和SQL(结构化查询语言)操作。
For example, it provides memory, temporary storage, and CPU resources that can be used for DML operations and SQL execution. You can use this independent compute cluster at any time and then turn it off when not needed. You are charged (paid) for each virtual warehouse you run, their size, and how long they run. Virtual warehouses do not share their compute resources with each other, and therefore, their performance is independent of each other.
例如,它提供可用于DML操作和SQL执行的内存、临时存储和CPU资源。您可以随时使用这个独立的计算集群,并在不需要时将其关闭。您需要为运行的每个虚拟仓库、其大小和运行时间付费。虚拟仓库之间不共享计算资源,因此它们的性能相互独立。
As shown in the following diagram, different groups of users can be assigned separate and dedicated virtual warehouses. Therefore, ETL processes can continuously load and execute complex transformation procedures on separate warehouses, ensuring no impact on data scientists or finance reports.
如下图所示,不同用户组可以被分配独立且专用的虚拟仓库。因此,ETL流程可以持续在单独的仓库上加载和执行复杂转换过程,确保不对数据科学家或财务报告产生影响。
568. Can you tell me how to access the Snowflake Cloud data warehouse?
你能告诉我如何访问Snowflake云数据仓库吗?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76ba | 官方: 否 | 付费: 否
答案:
Snowflake's data warehouse can be accessed using the following ways: - ODBC Drivers (a driver for connecting to Snowflake).
Snowflake的数据仓库可以通过以下方式访问:- ODBC驱动程序(用于连接Snowflake的驱动程序)。
- JDBC Drivers (a driver enabling a Java application to interact with a database).
- Python Libraries (for creating Python applications that connect to Snowflake and perform standard operations).
- Web User Interface (can be used for almost any task you can accomplish with SQL and the command line, such as: Creating and managing users and other account-level objects).
- SnowSQL Command-line Client (Python-based command-line interface to connect to Snowflake from Windows, Linux, and MacOS).
569. What is the difference between Snowflake and Redshift?
Snowflake和Redshift有什么区别?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76bd | 官方: 否 | 付费: 否
答案:
Cloud-based data warehouses are becoming increasingly popular, with Redshift and Snowflake being two of the biggest players. These are large data analytics databases capable of analyzing and reading vast amounts of data.
基于云的数据仓库正变得越来越流行,其中Redshift和Snowflake是两大主要参与者。这些大型数据分析数据库能够分析和读取大量数据。
Snowflake vs Redshift -
Snowflake与Redshift对比 -
| Snowflake | Redshift |
|---|---|
| Despite similar on-demand pricing, Snowflake and Redshift package their features differently. In Snowflake's pricing structure, compute usage is separate from storage usage 尽管按需定价类似,但Snowflake和Redshift在功能打包方式上有所不同。Snowflake的定价结构中,计算使用与存储使用是分开的 | In Redshift, both computer usage and storage usage are combined. 在Redshift中,计算使用和存储使用是合并的。 |
| Snowflake is more robust than Redshift when it comes to JSON storage. In essence, Snowflake makes it possible to store and query JSON with built-in, native functions. 在JSON存储方面,Snowflake比Redshift更强大。本质上,Snowflake通过内置的原生函数实现了JSON的存储和查询。 | On the other hand, when JSON is loaded into Redshift, it is split into strings, making it more difficult to query and work with. 另一方面,当JSON加载到Redshift时,会被拆分为字符串,使得查询和处理更加困难。 |
| Snowflake offers security and compliance features specifically tailored to its editions so that your data is protected to the maximum level as per your data strategy. Snowflake提供针对其各版本量身定制的安全性和合规性功能,以便根据您的数据策略最大程度地保护您的数据。 | The Redshift platform offers a wide range of encryption solutions Redshift平台提供了广泛的加密解决方案 |
| Data vacuuming and compression can be automated on Snowflake. It offers the best advantage as it automates much of the process, saving time and effort. 数据清理和压缩可以在Snowflake上自动化。它提供了最佳优势,因为自动化了大部分流程,节省了时间和精力。 | Data vacuuming and compression cannot be automated on Redshift, so the system requires more hands-on maintenance. 数据清理和压缩在Redshift上无法自动化,因此系统需要更多手动维护。 |
570. Explain stages in Snowflake.
解释Snowflake中的阶段。
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76c0 | 官方: 否 | 付费: 否
答案:
Stages are locations in Snowflake where data is stored, and staging is the process of uploading data into a stage. Data that needs to be loaded or stored within Snowflake is stored either elsewhere in the other cloud regions like in AWS (Amazon Web Service) S3, GCP (Google Cloud Platform), or Azure, or is stored internally within Snowflake. When data is stored in another cloud region, this is known as an external stage; when it is stored inside a snowflake, it is known as an internal stage. Internal stages can be further categorized as follows: - User stages: Each of these stages pertains to a specific user, so they'll be assigned to every user by default for storing files.
阶段是Snowflake中数据存储的位置,而暂存是将数据上传到阶段的过程。需要在Snowflake中加载或存储的数据要么存储在其他云区域(如AWS(亚马逊网络服务)S3、GCP(谷歌云平台)或Azure),要么存储在Snowflake内部。当数据存储在其他云区域时,这称为外部阶段;当数据存储在Snowflake内部时,称为内部阶段。内部阶段可以进一步分类如下:- 用户阶段:每个此类阶段与特定用户相关,因此默认情况下会为每个用户分配这些阶段来存储文件。
- Table stages: Each of these stages pertains to a specific database table, so they'll be assigned to every table by default.
- Internal named stages: Compared to the user or table stages, these stages offer a greater degree of flexibility. As these are some of the Snowflake objects, all operations that can be performed on objects can also be performed on internally named stages. These stages must be created manually and we can specify file formats when creating these stages.
571. Explain Snowpipe.
解释Snowpipe。
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76c3 | 官方: 否 | 付费: 否
答案:
In simple terms, Snowpipe is a continuous data ingestion service provided by Snowflake that loads files within minutes as soon as they are added to a stage and submitted for ingestion. Therefore, you can load data from files in micro-batches (organizing data into small groups/matches), allowing users to access the data within minutes (very less response time), rather than manually running COPY statements on a schedule to load large batches. By loading the data into micro-batches, Snowpipe makes it easier to analyze it. Snowpipe uses a combination of filenames and file checksums to ensure that only new data is processed.
简单来说,Snowpipe是Snowflake提供的持续数据摄取服务,当文件添加到阶段并提交摄取时,它会在几分钟内加载文件。因此,您可以从文件中以微批次(将数据组织成小组/匹配)加载数据,使用户能够在几分钟内(响应时间很短)访问数据,而不是按计划手动运行COPY语句加载大批数据。通过将数据加载到微批次中,Snowpipe使得分析数据更加容易。Snowpipe使用文件名和文件校验和的组合来确保只处理新数据。
Advantages of Snowpipe - - By eliminating roadblocks, Snowpipe facilitates real-time analytics.
Snowpipe 的优势——通过消除障碍,Snowpipe 促进了实时分析。
- It is cost-effective.
- It is simple to use.
- There is no management required.
- It provides flexibility, resilience, and so on.
572. What do you mean by Snowflake Computing?
您所说的 Snowflake Computing 是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76c6 | 官方: 否 | 付费: 否
答案:
The term snowflake computing refers to Snowflake's ability to provide instant, secure, and governed access to all data networks, along with its core architecture that enables multiple types of data workloads and offers a unified platform for modern data applications. In contrast to other data warehouses, Snowflake does not use a database or "big data" software platform such as Hadoop. Snowflake, however, combines an entirely new SQL query engine with a natively cloud-based architecture.
“雪flake计算”这一术语指的是Snowflake能够为所有数据网络提供即时、安全和受控的访问,同时其核心架构支持多种类型的数据工作负载,并为现代数据应用提供统一平台。与其他数据仓库不同,Snowflake不使用数据库或如Hadoop之类的“大数据”软件平台。然而,Snowflake将全新的SQL查询引擎与原生云架构相结合。
573. Which cloud platforms does Snowflake currently support?
Snowflake目前支持哪些云平台?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76c9 | 官方: 否 | 付费: 否
答案:
Snowflake currently supports the following cloud platforms: - Amazon Web Services (AWS)
Snowflake目前支持以下云平台:- 亚马逊网络服务(AWS)
- Google Cloud Platform (GCP)
- Microsoft Azure (Azure).
574. In Snowflake, how are data and information secured?
在Snowflake中,数据和信息如何得到安全保障?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76cc | 官方: 否 | 付费: 否
答案:
Every organization considers data security to be one of its top priorities. The Snowflake platform adheres to the best security standards in the industry to encrypt and safeguard customer data. The platform provides the best key management features at no additional charge. To protect client data, Snowflake employs the following security measures: - Snowflake automatically encrypts the data that it contains using a managed key.
每个组织都将数据安全视为其首要任务之一。Snowflake平台遵循行业最佳安全标准,以加密和保护客户数据。该平台免费提供最佳密钥管理功能。为了保护客户数据,Snowflake采用以下安全措施:- Snowflake自动使用托管密钥加密其包含的数据。
- Snowflake is based on Transport Layer Security (TLS) to ensure data security between customers and servers.
- Depending on your cloud region, you can select a geographic location to store your data.
575. Is Snowflake an ETL (Extract, Transform, and Load) tool?
Snowflake是ETL(提取、转换和加载)工具吗?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76cf | 官方: 否 | 付费: 否
答案:
Yes, Snowflake is an ETL (Extract, Transform, and Load) tool, since it is performed in three steps, including:
是的,Snowflake是ETL(提取、转换和加载)工具,因为它通过三个步骤执行,包括:
- The data is extracted from the source and saved in data files in a variety of formats including JSON, CSV, XML, and more.
- Loads data into a stage, either internal (Snowflake managed location) or external (Microsoft Azure, Amazon S3 bucket, Google Cloud).
- The COPY INTO command is used to copy data into the Snowflake database.
576. Which ETL tools are compatible with Snowflake?
哪些ETL工具与Snowflake兼容?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76d4 | 官方: 否 | 付费: 否
答案:
Snowflake is compatible with the following ETL tools: - Matillion
Snowflake与以下ETL工具兼容:- Matillion
- Blendo
- Hevo Data
- StreamSets
- Etleap
- Apache Airflow, etc.
577. What do you mean by Horizontal and Vertical Scaling?
您所说的横向和纵向扩展是什么意思?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76d7 | 官方: 否 | 付费: 否
答案:
- Horizontal Scaling: Horizontal scaling increases concurrency by scaling horizontally. As your customer base grows, you can use auto-scaling to increase the number of virtual warehouses, enabling you to respond instantly to additional queries.
- Vertical Scaling: Vertical scaling involves increasing the processing power (e.g. CPU, RAM) of an existing machine. It generally involves scaling that can reduce processing time. Consider choosing a larger virtual warehouse-size if you want to optimize your workload and make it run faster.
578. Is snowflake OLTP (Online Transactional Processing) or OLAP (Online Analytical Processing)?
Snowflake是OLTP(在线事务处理)还是OLAP(在线分析处理)?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76da | 官方: 否 | 付费: 否
答案:
Snowflake is developed as an OLAP (Online Analytical Processing) database system, not as an OLTP (Online Transaction Processing) database system. In OLTP (Online Transaction Processing), data is collected, stored, and processed from real-time transactions, but in OLAP (Online Analytical Processing), complex queries are used to evaluate aggregated historical data from OLTP systems. Snowflake is not designed to handle much updating and inserting of small amounts of data like a transactional database would. Snowflake, for instance, cannot handle referential integrity because, even though it supports integrity and other constraints, they are not enforced except the NOT NULL constraint that is always enforced. Other constraints than NOT NULL are created as disabled constraints. However, depending on the use, we may also use it for online transaction processing (OLTP).
Snowflake被开发为OLAP(在线分析处理)数据库系统,而非OLTP(在线事务处理)数据库系统。在OLTP(在线事务处理)中,数据从实时交易中收集、存储和处理,但在OLAP(在线分析处理)中,使用复杂查询来评估来自OLTP系统的聚合历史数据。Snowflake并非设计用于像事务数据库那样处理大量小型数据的更新和插入操作。例如,Snowflake无法处理参照完整性约束,因为它虽然支持完整性和其他约束,但除了始终强制执行的NOT NULL约束外,其他约束均未强制执行。除NOT NULL外的其他约束会作为禁用约束创建。然而,根据使用情况,我们也可以将其用于在线事务处理(OLTP)。
579. Snowflake is what kind of database?
Snowflake是什么类型的数据库?
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76dd | 官方: 否 | 付费: 否
答案:
All Snowflake's features are built on top of SQL (Structured Query Language) databases. The data in this relational database system is stored in columns and it is compatible with other tools, including Excel and Tableau. As a SQL database, Snowflake contains a query tool, supports multi-statement transactions, provides role-based security, etc.
Snowflake的所有功能都基于SQL(结构化查询语言)数据库构建。这个关系数据库系统中的数据以列存储,并与包括Excel和Tableau在内的其他工具兼容。作为SQL数据库,Snowflake包含查询工具,支持多语句事务,提供基于角色的安全性等。
580. Explain in short about Snowflake Clustering.
简要解释一下 Snowflake 聚类。
- 知识点: 数据工程与数据科学/AI (主题: snowflake, data-warehouse;标签: interviewbit, snowflake, topic-specific, data-warehouse)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5358d557c902bc76e0 | 官方: 否 | 付费: 否
答案:
In Snowflake, clustering is a type of data partitioning, where unique cluster keys are specified for each table. Cluster keys are subsets of a table's columns that are used to co-locate data within the table. These keys are appropriate for comprehensive tables. The process of managing clustered data in a table is known as re-clustering.
在 Snowflake 中,聚类是一种数据分区类型,为每个表指定唯一的聚类键。聚类键是表列的子集,用于在表内共同定位数据。这些键适用于大型表。管理表中聚类数据的过程称为重新聚类。
581. What is YARN in Spark?
Spark 中的 YARN 是什么?
- 知识点: 数据工程与数据科学/AI (主题: spark, data-engineering;标签: interviewbit, spark, topic-specific, data-engineering)
- 类型: technical | 难度: easy | 子类型: concept
- 分类: fullstack
- id: 69b37c5658d557c902bc78cd | 官方: 否 | 付费: 否
答案:
- YARN is one of the key features provided by Spark that provides a central resource management platform for delivering scalable operations throughout the cluster.
- YARN is a cluster management technology and a Spark is a tool for data processing.
评论