WO2020199745A1 - 一种样本聚类方法及装置 - Google Patents

一种样本聚类方法及装置 Download PDF

Info

Publication number
WO2020199745A1
WO2020199745A1 PCT/CN2020/073872 CN2020073872W WO2020199745A1 WO 2020199745 A1 WO2020199745 A1 WO 2020199745A1 CN 2020073872 W CN2020073872 W CN 2020073872W WO 2020199745 A1 WO2020199745 A1 WO 2020199745A1
Authority
WO
WIPO (PCT)
Prior art keywords
samples
sample
similarity
vector
graph node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/073872
Other languages
English (en)
French (fr)
Inventor
曹绍升
崔卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Publication of WO2020199745A1 publication Critical patent/WO2020199745A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Definitions

  • One or more embodiments of this specification relate to the field of computer information processing, and more particularly to a sample clustering method and device.
  • Clustering is a commonly used analysis method in data analysis, especially big data analysis. Intuitively speaking, clustering refers to the clustering of highly correlated samples to form a sample cluster (cluster). Clustering can divide the samples with high correlation into a sample cluster, so that the samples in the same cluster have a higher correlation, while the samples in different clusters have a lower correlation.
  • One or more embodiments of this specification describe a sample clustering method and device, which can improve the accuracy of sample clustering results.
  • a sample clustering method including:
  • the network structure of the multiple samples Based on the similarity between the two samples of the multiple samples, determine the network structure of the multiple samples; wherein the multiple samples are used as nodes in the network structure, and the connection edge information between the two nodes is based on Determine the similarity between the pair of samples corresponding to the pair of nodes;
  • the sample includes a user sample
  • the attribute characteristics include registration information and/or behavior information of the user sample.
  • the determining the similarity between two samples of the multiple samples based on the feature vectors of the multiple samples includes:
  • the cosine similarity or the Euclidean distance between the two samples of the multiple samples is calculated to obtain the similarity between the two samples of the multiple samples.
  • the determining the network structure of the multiple samples based on the similarity between the two samples of the multiple samples includes:
  • connecting edges are constructed between the samples corresponding to the similarity between the top M or the top M'of the two samples to obtain the network structure of the multiple samples; wherein, the top M or the top M' The similarity between two samples of M'percent is used as the weight of the corresponding connected edges.
  • the determining the network structure of the multiple samples based on the similarity between the two samples of the multiple samples includes:
  • Determining the first two-two sample similarity from the similarity between the two samples of the plurality of samples, and the first two-two sample similarity is greater than a preset threshold
  • the use of unsupervised embedding processing based on the network structure to obtain respective graph node vectors of the multiple samples includes:
  • each level of vector iteration in the multi-level vector iteration includes, based on the first sample
  • the graph node vector of the previous iteration of the graph node vector and the graph node vector of the previous iteration of the neighbor sample of the first sample determine the graph node vector of the current iteration of the first sample.
  • the use of unsupervised embedding processing based on the network structure to obtain respective graph node vectors of the multiple samples includes:
  • the first sample among the plurality of samples based on the respective feature vectors of the first sample and its neighbor samples, respectively determine the graph node vectors of the first sample and the first iteration of the neighbor samples;
  • each level of vector iteration in the multi-level vector iteration includes, based on the first The graph node vector of the previous iteration of the neighbor sample of the sample determines the graph node vector of the current iteration of the first sample.
  • the use of unsupervised embedding processing based on the network structure to obtain respective graph node vectors of the multiple samples includes:
  • the deepwalk graph embedding algorithm or the GraRep graph embedding algorithm is used to perform embedding processing to obtain respective graph node vectors of the multiple samples.
  • a sample clustering device comprising:
  • the obtaining unit is configured to obtain a feature vector composed of attribute features of multiple samples
  • the first determining unit is configured to determine the similarity between two samples of the multiple samples based on the feature vectors of the multiple samples;
  • the second determining unit is configured to determine the network structure of the multiple samples based on the similarity between the two samples of the multiple samples; wherein the multiple samples are used as nodes in the network structure, and the two nodes The connection edge information between is determined based on the similarity between the pair of samples corresponding to the pair of nodes;
  • a processing unit configured to use unsupervised embedding processing based on the network structure to obtain respective graph node vectors of the multiple samples
  • the clustering unit is configured to cluster the multiple samples based on the graph node vectors of the multiple samples.
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect.
  • a computing device including a memory and a processor, the memory stores executable code, and the processor implements the method of the first aspect when the executable code is executed by the processor.
  • multiple samples can be clustered based on the graph node vector of multiple samples; the graph node vector of the sample describes the sample in the entire network
  • the topological properties reflect the indirect similarity between samples, thus improving the accuracy of the clustering results.
  • Fig. 1 shows a flowchart of a sample clustering method according to an embodiment
  • Figure 2 shows a network structure of multiple samples according to an embodiment
  • Fig. 3 shows a schematic block diagram of a sample clustering device according to an embodiment.
  • the user samples can be clustered based on interaction relationships between users, such as communication relationships, device sharing relationships, and transfer relationships.
  • a relationship network diagram can be constructed according to the presence or absence of interaction between samples and the frequency of interaction.
  • the nodes in the relational network graph represent samples, the connected edges in the relational network graph represent interactive relationships between samples, and the length of the connected edges represents the frequency of interaction.
  • a certain clustering algorithm can be used to merge the nodes in the relational network graph to achieve clustering of samples. Based on this clustering scheme, samples with higher interaction frequency can be clustered into a sample cluster.
  • the similarity between two samples can be obtained based on the attribute characteristics of the samples, and the samples can be clustered.
  • Samples generally have multiple attributes.
  • attribute characteristics can include registration information and/or behavior information; among them, registration information can specifically include age, gender, education level, occupation, behavior information can include shopping information, entertainment information, etc., shopping information can include purchase Sports information can include the type of entertainment, the time of entertainment, and so on.
  • the attribute characteristics can include the name, category, price, and shelf time of the product.
  • each sample should have 20 attribute characteristics, but for A sample, only the first 10 attribute characteristics are obtained; for B sample, only the following attributes are obtained 10 attribute characteristics; for the C sample, 20 attribute characteristics are obtained.
  • the first 10 attributes of A sample and C sample are very close, so the two have a high degree of similarity.
  • the last 10 attributes of the B sample and the C sample are very similar, so the two have a high degree of similarity.
  • samples A and B have a certain indirect similarity through sample C, and the scheme of calculating similarity directly based on attribute characteristics cannot take such indirect similarity into consideration.
  • a network structure can be constructed based on the similarity between two samples, and based on neighbor samples of each sample, a graph node vector describing the topological properties of each sample in the network structure can be obtained.
  • the graph node vector of a sample can reflect the indirect similarity between the sample and its high-order neighbors; based on the graph node vector of multiple samples, multiple samples are clustered, which improves the accuracy of the clustering results.
  • the sample clustering method provided in the embodiment of this specification will be specifically introduced.
  • the method can be executed by any device, device, platform, or device cluster with computing and processing capabilities.
  • the method includes the following steps. Step 100, obtain a feature vector composed of attribute features of multiple samples; Step 102, determine the similarity between two samples of the multiple samples based on the feature vectors of the multiple samples; Step 104, based on the multiple samples The similarity between the two samples of the sample is determined to determine the network structure of the multiple samples, wherein the multiple samples are used as nodes in the network structure, and the connection edge information between the two nodes is based on the data of the two nodes.
  • step 106 based on the network structure, use unsupervised embedding processing to obtain the respective graph node vectors of the multiple samples; step 108, based on the graph nodes of the multiple samples Vector to cluster the multiple samples.
  • step 100 a feature vector composed of attribute features of multiple samples is obtained.
  • the attribute characteristics of a sample refer to the information that can be used to describe the characteristics of the sample. It can be understood that a sample can have multiple attributes.
  • the sample is specifically a user sample, and its attribute characteristic information may include registration information and/or behavior information.
  • Registration information refers to the information that a user fills in when registering an account, which can include age, gender, education, occupation, etc.
  • Behavior information refers to information about the behavior of users on the corresponding website, for example, shopping information, information behavior, etc.
  • the shopping information purchases the type of goods, the evaluation of the goods, etc.
  • the sports information may include the type of entertainment, the time of the entertainment, and so on.
  • the sample is specifically a product sample
  • the attribute characteristics may include the name, category, price, shelf time, purchase crowd, number of evaluations, favorable rating, etc. of the product.
  • step 102 based on the feature vectors of the multiple samples, the similarity between two samples of the multiple samples is determined.
  • the feature vector is a vector obtained by mapping the attribute features of the sample, and the attribute feature of the sample is information that can be used to describe the characteristics of the sample. It is easy to understand that for any two samples in the multiple samples, the similarity between the two samples can be calculated based on the feature vectors of the two samples.
  • the degree of similarity between samples refers to the degree of similarity between two samples in one or more aspects, for example, the similarity of consumption preferences, the similarity of financial investment, the similarity of interests and hobbies, etc. . It is easy to understand that in order to obtain the similarity of two samples in one or more aspects, the corresponding attribute characteristics can be selected for calculation and analysis.
  • the feature vectors of the plurality of samples may be normalized. Then, for any two samples of the plurality of samples, the cosine value of the angle between the two feature vectors is calculated to obtain the cosine similarity of the two, and the obtained cosine similarity is used as the similarity between the two. In this way, the similarity between each pair of samples in the plurality of samples can be obtained.
  • the feature vectors of the plurality of samples may be normalized. Then, for any two samples in the plurality of samples, the Euclidean distance is calculated based on the feature vectors of the two, and the obtained Euclidean distance is used as the similarity between the two. In this way, the similarity between each pair of samples in the plurality of samples can be obtained.
  • step 104 the network structure of the multiple samples is determined based on the similarity between the two samples of the multiple samples.
  • the network structure may also be called a topology structure, which describes the relationship between multiple samples. Multiple samples are used as nodes in the network structure, and the connection edge information between two nodes is determined based on the similarity between the two samples corresponding to the two nodes.
  • the connected edge information may include the weight of the connected edge.
  • the similarity between the sample and itself can be set to 1, and the similarity between the sample and any other sample is between 0 and 1.
  • the similarity between two samples of the multiple samples may not be filtered, that is, in the network structure, there is a connecting edge between any two nodes.
  • the weight of the connecting edge between any two nodes is determined based on the similarity between the two corresponding samples.
  • a connecting edge can be constructed between two samples with a high degree of similarity between samples for subsequent cluster analysis. Specifically, the similarity between two samples of the multiple samples can be filtered. Then, based on the filtering result, the network structure is determined. In this embodiment, for any pair of samples, when their similarity satisfies a preset condition, a connecting edge is constructed between the two corresponding nodes, and the similarity is used as the weight of the constructed connecting edge.
  • the similarities between the two samples of the multiple samples are sorted in descending order; in the ranking result, the samples corresponding to the similarities between the two samples of the top M Connecting edges are constructed between them to obtain the network structure of the multiple samples; wherein the similarity between the first M pairwise samples is used as the weight of the respective connecting edges.
  • the specific value of M is set in advance, and the specific value of M can be determined based on experience, or the specific value of M determined by experiment. For different network structures, the value of M can be different.
  • the similarities between the two samples of the plurality of samples are sorted in descending order, in descending order; in the sorting result, the top two percent of M' A connecting edge is constructed between the samples corresponding to the similarity between the two samples to obtain the network structure of the multiple samples; wherein the similarity between the two samples in the top M'is used as the weight of the corresponding connecting edge. value.
  • the specific value of M' is preset, and the specific value of M'can be determined based on experience, or the specific value of M'determined by experiment. For different network structures, the value of M'can be different.
  • the similarity between the samples can be compared with a preset threshold. If it is greater than the preset threshold, a connecting edge is constructed between the two samples, and the difference between the two samples The similarity between samples is used as the weight of the constructed connecting edge. In this way, a connecting edge can be constructed between two samples whose similarity between each sample is greater than a preset threshold to determine the network structure.
  • the similarity between the first two samples can be determined from the similarity between the two samples of the plurality of samples, and the similarity between the first two samples is greater than the preset threshold; Connecting edges are constructed between samples corresponding to the similarity between samples to obtain the network structure of the multiple samples; wherein the similarity between the first two samples is used as the weight of the corresponding connecting edge.
  • step 106 based on the network structure, unsupervised embedding is used to obtain the graph node vectors of the multiple samples.
  • the graph node vector of the first sample may be determined based on neighbor samples of the first sample.
  • the neighbor samples of the first sample refer to the samples directly connected to the first sample.
  • the similarity between two samples of the plurality of samples is filtered as described above to obtain the network structure.
  • the two samples with higher similarity between samples have connecting edges, and the two samples with lower similarity between samples have no connecting edges.
  • the graph node vector of the first iteration of sample i and its neighbor samples may be determined based on the respective feature vectors of sample i and its neighbor samples.
  • the feature vector can be normalized and then used as the graph node vector for the first iteration. It is also possible to normalize the feature vector and multiply it by a nonlinear transformation function to obtain the graph node vector for the first iteration.
  • the above-mentioned nonlinear transformation function can use Relu function, Sigmoid function, Tanh function, etc.
  • multi-level vector iteration is performed.
  • the graph node vector of the current iteration of sample i is determined based on the graph node vector of the previous iteration of the neighbor sample of sample i.
  • the graph node vector obtained by the last-level vector iteration in the multi-level vector iteration is used as the final graph node vector and used for subsequent analysis.
  • PCA principal component analysis
  • N i may be set to the neighbor samples in the sample set consisting of i, N i in the sample j is any one element, i.e. the sample j is a neighbor of the samples in the sample i.
  • the graph node vector of the t-level iteration of sample i Calculated by the following formula:
  • the graph node vector of the t-level iteration of sample i Calculated by the following formula:
  • Equation (2) On the basis of equation (1), the graph node vector of the previous iteration of each neighbor sample of sample i When performing the summation, a weighting factor a ij is introduced.
  • a ij can be the similarity between sample i and sample j, or the weight of the connecting edge between sample i and sample j.
  • the graph node vector of the previous iteration of sample i and the graph node of the previous iteration of sample i Vector determine the graph node vector of this iteration of sample i.
  • the graph node vector obtained by the last-level vector iteration in the multi-level vector iteration is used as the final graph node vector and used for subsequent analysis.
  • the graph node vector of the t-level iteration of sample i Calculated by the following formula:
  • Equation (4) is based on equation (3), the graph node vector of the previous iteration of each neighbor sample of this i
  • a weight factor a ij is introduced.
  • a ij is between 0 and 1, and specifically can be the inter-sample similarity between sample i and sample j.
  • the C sample is a neighbor sample of the A sample, so the graph node vector of the A sample reflects the feature vector of the C sample.
  • the C sample is the neighbor sample of the B sample. Therefore, the graph node vector of the B sample also reflects the feature vector of the C sample. Therefore, the indirect similarity between the A sample and the B sample can be established through the sample C, and this indirect similarity is reflected by the graph node vector of the A sample and the graph node vector of the B sample.
  • the deepwalk graph embedding algorithm or the GraRep graph embedding algorithm may be used to embed each node on the network structure to obtain the graph node vector of each of the multiple samples.
  • the graph node vector of the sample obtained through the foregoing embodiment describes the topological properties of the sample in the entire network, and this topological property reflects the indirect similarity between the samples, for example, the similarity between the sample and the neighbors of neighbors.
  • step 108 cluster the multiple samples based on the graph node vectors of the multiple samples.
  • the graph node vector of each sample can be regarded as the new feature vector of each sample.
  • a clustering algorithm for example, k-means
  • the solution of the embodiment of this specification can cluster multiple samples based on the graph node vectors of multiple samples; the graph node vectors of the samples describe the topological properties of the samples in the entire network and reflect the relationship between the samples.
  • the indirect similarity therefore, improves the accuracy of the clustering results.
  • the graph node vectors of each of the three samples of A, B, and C can be obtained.
  • the graph node vector of the A sample reflects the indirect similarity between the A sample and the B sample
  • the graph node vector of the B sample reflects the indirect similarity between the B sample and the A sample.
  • a sample clustering device 300 is provided.
  • the device 300 includes:
  • the obtaining unit 310 is configured to obtain a feature vector composed of attribute features of multiple samples
  • the first determining unit 320 is configured to determine the similarity between two samples of the multiple samples based on the feature vectors of the multiple samples;
  • the second determining unit 330 is configured to determine the network structure of the plurality of samples based on the similarity between the two samples of the plurality of samples; wherein, the plurality of samples are used as nodes in the network structure, The connection edge information between the nodes is determined based on the similarity between the pair of samples corresponding to the pair of nodes;
  • the processing unit 340 is configured to use unsupervised embedding processing based on the network structure to obtain respective graph node vectors of the multiple samples;
  • the clustering unit 350 is configured to cluster the multiple samples based on the graph node vectors of the multiple samples.
  • the sample includes a user sample
  • the attribute characteristics include registration information and/or behavior information of the user sample.
  • the first determining unit 320 includes a normalization subunit 321 and a calculation subunit 322;
  • the normalization subunit 321 is configured to perform normalization processing on the feature vectors of the multiple samples
  • the calculation subunit 322 is configured to calculate the cosine similarity or Euclidean distance between two samples of the plurality of samples based on the normalized feature vectors of the plurality of samples, and obtain the two samples of the plurality of samples. The similarity between two samples.
  • the second determining unit 330 includes a sorting subunit 331 and a constructing subunit 332;
  • the sorting subunit 331 is configured to sort the similarities between two samples of the plurality of samples in descending order;
  • the constructing subunit 332 is configured to construct a connecting edge between the samples corresponding to the similarity between the top M or top M′ of the two samples in the ranking result, to obtain the network structure of the multiple samples; wherein , The similarity between the first M or the first M'of the two samples is used as the weight of the respective connected edges.
  • the second determining unit 330 includes a third determining subunit 333 and a constructing subunit 332;
  • the third determining sub-unit 333 is configured to determine the similarity between the first two samples from the similarity between the two samples of the plurality of samples, and the similarity between the first two samples is greater than a preset threshold;
  • the constructing sub-unit 332 is configured to construct a connecting edge between the samples corresponding to the similarity between the first pair of samples to obtain the network structure of the plurality of samples; wherein, the first pair of samples are similar
  • the degree is used as the weight of the corresponding connected edge.
  • the processing unit 340 includes a fourth determining subunit 341 and an executing subunit 342;
  • the fourth determining subunit 341 is configured to determine the first sample of the first sample and its neighbor samples based on the respective feature vectors of the first sample and its neighbor samples. Iterative graph node vector;
  • the execution subunit 342 is configured to perform multi-level vector iteration for the first sample, and use the result of the multi-level vector iteration as the graph node vector of the first sample; wherein each level vector in the multi-level vector iteration The iteration includes determining the graph node vector of the current iteration of the first sample based on the graph node vector of the previous iteration of the first sample and the graph node vector of the previous iteration of neighbor samples of the first sample.
  • the processing unit 340 includes a fourth determining subunit 341 and an executing subunit 342;
  • the fourth determining subunit 341 is configured to determine the first sample of the first sample and its neighbor samples based on the respective feature vectors of the first sample and its neighbor samples. Iterative graph node vector;
  • the execution subunit 342 is configured to perform multi-level vector iteration for the first sample, and use the result of the multi-level vector iteration as the graph node vector of the first sample; wherein each of the multi-level vector iterations
  • the level vector iteration includes determining the graph node vector of the current iteration of the first sample based on the graph node vector of the previous iteration of the neighbor sample of the first sample.
  • the processing unit 340 is further configured to use the deepwalk graph embedding algorithm or the GraRep graph embedding algorithm to perform embedding processing to obtain the graph node vectors of the multiple samples.
  • the functional units of the device 300 can be implemented with reference to the method embodiment shown in FIG. 1, and details are not described herein again.
  • the embodiment of this specification provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer is caused to execute the method shown in FIG. 1.
  • the embodiments of this specification provide a computing device, including a memory and a processor, the memory stores executable code, and when the processor executes the executable code, the method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种样本聚类方法及装置。所述方法包括:首先,获取多个样本的属性特征构成的特征向量(100);其次,基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度(102);接着,基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定(104);然后,基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量(106);之后,基于所述多个样本的图节点向量,对所述多个样本进行聚类(108)。

Description

一种样本聚类方法及装置 技术领域
本说明书一个或多个实施例涉及计算机信息处理领域,尤其涉及一种样本聚类方法及装置。
背景技术
在进行数据分析,特别是大数据分析时,聚类是一种常用的分析方法。直观上讲,聚类是指将相关高的样本聚在一起,从而形成一个样本类簇(cluster)。聚类可以把相关高的样本划分到一个样本类簇,使得同一个类簇内的样本相关度较高,而不同类簇之间的样本相关度较低。
在很多场景中,都需要对样本进行聚类,例如,对电商用户进行聚类,得到不同类型的人群,进而为特定类型的人群提供针对性的服务,可以有效的改善用户体验。因此,提供一种能够对样本进行准确聚类的方法具有重要意义。
发明内容
本说明书一个或多个实施例描述了一种样本聚类方法及装置,可以提高样本聚类结果的准确度。
根据第一方面,提供了一种样本聚类方法,所述方法包括:
获取多个样本的属性特征构成的特征向量;
基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;
基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;
基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;
基于所述多个样本的图节点向量,对所述多个样本进行聚类。
在一个实施例中,所述样本包括用户样本,所述属性特征包括用户样本的注册信息和/或行为信息。
在一个实施例中,所述基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度,包括:
对所述多个样本的特征向量进行归一化处理;
基于归一化处理后的所述多个样本的特征向量,计算所述多个样本的两两样本间余弦相似度或欧式距离,获得所述多个样本的两两样本间相似度。
在一个实施例中,所述基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构,包括:
按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;
在排序结果中前M个或前百分之M’的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前M个或前百分之M’的两两样本间相似度作为各自对应的连接边的权值。
在一个实施例中,所述基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构,包括:
从所述多个样本的两两样本间相似度中确定出第一两两样本间相似度,所述第一两两样本间相似度大于预设阈值;
在所述第一两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述第一两两样本间相似度作为对应的连接边的权值。
在一个示例中,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
对于第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的上一级迭代的图节点向量和第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
在一个示例中,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分 别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
对于所述第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
在一个实施例中,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
采用deepwalk图嵌入算法或GraRep图嵌入算法,进行嵌入处理,得到所述多个样本各自的图节点向量。
根据第二方面,提供了一种样本聚类装置,所述装置包括:
获取单元,配置为获取多个样本的属性特征构成的特征向量;
第一确定单元,配置为基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;
第二确定单元,配置为基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;
处理单元,配置为基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;
聚类单元,配置为基于所述多个样本的图节点向量,对所述多个样本进行聚类。
根据第三方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面的方法。
根据第四方面,提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面的方法。
根据本说明书实施例提供的方法和装置,通过本说明书实施例的方案,可以基于多个样本的图节点向量,对多个样本进行聚类;样本的图节点向量刻画了样本在整个网络中的拓扑性质,反映了样本之间的间接相似度,因此,提高了聚类结果的准确性。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的 附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1示出根据一个实施例的样本聚类方法的流程图;
图2示出根据一个实施例的多个样本的网络结构;
图3示出根据一个实施例的样本聚类装置的示意性框图。
具体实施方式
下面结合附图,对本说明书提供的方案进行描述。
如前所述,在很多场景中,都需要对样本进行聚类,例如,对用户进行聚类,从而将用户划分到不同人群。对于用户样本而言,可以基于用户之间的通信关系、设备共用关系、转账关系等交互关系,对用户样本进行聚类。例如,可以根据样本间的有无交互关系以及交互的频次构建关系网络图。关系网络图中的节点表示样本,关系网络图中的连接边表示样本之间具有交互关系,连接边的长短表示交互的频次。然后,可以采用某种聚类算法,对关系网络图中的节点进行合并,从而实现对样本的聚类。基于这种聚类方案,可以把交互频次较高的样本聚到一个样本类簇中。例如,在这种聚类方案下,往往会将一个家庭的成员聚为一个样本类簇。而很多情况下,在某一方面,例如兴趣爱好、消费习惯等,一个家庭的各成员之间的并不必然相似。因此,基于样本之间的交互关系进行聚类,并不直接反映出样本之间的相似度。甚至在同一样本类簇中,两个样本之间的相似度很低。
而在很多应用场景中,将相似度较高的样本聚到同一样本类簇中,具有重要意义。例如,对于电商而言,将相似度较高的用户划分到同一个用户群体,进而可以为该用户群体,提供相同或相似的服务,从而可以提高用户的体验。
根据一种方案,可以基于样本的属性特征,得到样本两两间的相似度,对样本进行聚类。样本一般具有多个属性特征。以用户样本为例,属性特征可以包括注册信息和/或行为信息;其中,注册信息具体可以包括年龄、性别、教育程度、职业,行为信息可以包括购物信息、娱乐信息等,购物信息可以包括购买的商品类型、对商品的评价等,运动信息可以包括娱乐的类型、娱乐的时间等。以商品样本为例,属性特征可以包括商品的名称、类别、价格、上架时间等等。
但在很多情况下,样本的属性特征并不全面。一般的做法是,简单的利用平均值或0填充缺失的属性特征。因此,在样本的属性特征缺失比较严重的情况下,识别样本两两间的相似度的结果可能并不准确。以A、B、C三个样本为例,可以设定,每个样本应有20个属性特征,但对于A样本,只获得了其前10个属性特征;对于B样本,只获得了其后10个属性特征;对于C样本,获得了其20个属性特征。A样本和C样本的前10个属性特征很接近,因此,两者具有很高的相似度。B样本和C样本的后10个属性特征很接近,因此,两者具有很高的相似度。但A样本和B样本之间,由于信息的缺失,导致两者的相似度较低,使得在聚类时,A样本和B样本可能不被聚在一个样本类簇中。然而,实际上,A、B样本通过样本C存在一定的间接相似性,而直接基于属性特征计算相似度的方案并不能考虑到这样的间接相似性。
在本申请说明书实施例中,可以先基于两两样本间的相似度构建网络结构,基于各样本的邻居样本,得到刻画了各样本在网络结构中的拓扑性质的图节点向量。样本的图节点向量可以反映样本与其高阶邻居之间的间接相似度;基于多个样本的图节点向量,对多个样本进行聚类,提高了聚类结果的准确性。
接下来,参考图1,对本说明书实施例提供的样本聚类方法进行具体介绍。所述方法可以由任何具有计算、处理能力的装置、设备、平台、设备集群执行。如图1所示,所述方法包括如下步骤。步骤100,获取多个样本的属性特征构成的特征向量;步骤102,基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;步骤104,基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构,其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;步骤106,基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;步骤108,基于所述多个样本的图节点向量,对所述多个样本进行聚类。
接下来,结合具体例子,对上述步骤进行具体描述。
首先,在步骤100中,获取多个样本的属性特征构成的特征向量。
样本的属性特征是指可用于描述样本特性的信息。可以理解,样本可以有多个属性特征。在一个例子中,样本具体为用户样本,其属性特征信息可以包括注册信息和/或行为信息。注册信息是指用户在注册帐户时,填写的信息,可以包括年龄、性别、教育程度、职业等。行为信息是指用户在相应网站上发生的行为的信息,例如,购物信息、信息行为等。购物信息购买的商品类型、对商品的评价等,运动信息可以包括娱乐的类型、 娱乐的时间等。
在一个例子中,样本具体为商品样本,属性特征可以包括商品的名称、类别、价格、上架时间、购买人群、评价数量、好评率等等。
可以将样本的多个属性特征映射为特征向量,以用于后续样本分析。
接着,在步骤102中,基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度。
如上所述,特征向量为将样本的属性特征进行映射得到的向量,而样本的属性特征为可用于描述样本特性的信息。容易理解,对于多个样本中的任意两个样本,可以基于这两个样本的特征向量,计算这两个样本间的相似度。
在本说明书实施例中,样本间的相似度,是指两个样本在一方面或多方面的的相似程度,例如,消费偏好的相似程度、理财投资的相似程度、兴趣爱好的相似程度等等。容易理解,为了得到两个样本在某一方面或多方面的相似度,可以选择相应的属性特征进行计算分析。
在一个实施例中,可对所述多个样本的特征向量进行归一化处理。然后,对于所述多个样本中的任意两个样本,计算两者特征向量夹角的余弦值,得到两者的余弦相似度,得到的余弦相似度用作两者间相似度。采用此种方式,可以得到所述多个样本中各个两两样本间相似度。
在一个实施例中,可对所述多个样本的特征向量进行归一化处理。然后,对于所述多个样本中的任意两个样本,基于两者的特征向量计算欧式距离,得到的欧式距离用作两者间相似度。采用此种方式,可以得到所述多个样本中各个两两样本间相似度。
其次,在步骤104中,基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构。
所述网络结构也可以称为拓扑结构,其描述了多个样本之间的关系。多个样本作为网络结构中的节点,两两节点之间的连接边信息是基于该两两节点所对应的两两样本间相似度而确定。连接边信息可以包括连接边的权值。可以设定样本与其自身的相似度为1,样本与任一个其他样本之间的相似度介于0和1之间。
在一个实施例中,可以不对所述多个样本的两两样本间相似度进行过滤,即在所述网络结构中,任意两个节点之间存在连接边。任意两个节点之间的连接边的权重基于其 对应的两个样本的样本间相似度而确定。
在一个实施例中,可以在样本间相似度较高的两个样本之间构建连接边,以用于后续的聚类分析。具体的,可以对所述多个样本的两两样本间相似度进行过滤。然后,基于过滤结果,确定所述网络结构。在该实施例中,对于任意两两样本,当其相似度满足预设条件时,在其对应的两两节点之间构建连接边,并将其相似度作为构建的连接边的权重。
在该实施例的一个示例中,按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;在排序结果中前M个的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前M个两两样本间相似度作为各自对应的连接边的权值。
M的具体值为预先设定,具体可以根据经验确定M的具体值,也可以根据试验确定出的M的具体值。对于不同的网络结构,M的取值可以不同。
在一个实施例中,按照从大到小的顺序,按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;在排序结果中前百分之M’的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前百分之M’的两两样本间相似度作为各自对应的连接边的权值。
M’的具体值为预先设定,具体可以根据经验确定M’的具体值,也可以根据试验确定出的M’的具体值。对于不同的网络结构,M’的取值可以不同。
在一个实施例中,对于任意两个样本,可以将其样本间相似度和预设阈值比较,如果大于预设阈值,则在这两个样本间构建连接边,并将该两个样本间的样本间相似度作为构建的连接边的权值。如此,可以在各个样本间相似度大于预设阈值的两两样本间构建连接边,以确定所述网络结构。换言之,可以从所述多个样本的两两样本间相似度中确定出第一两两样本间相似度,所述第一两两样本间相似度大于预设阈值;在所述第一两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述第一两两样本间相似度作为对应的连接边的权值。
在该实施例中,以包括上述A、B、C三个样本的多个样本为例。假定A、C样本的样本间相似度为0.5,B、C样本的样本间相似度为0.5,以及预设阈值为0.3。容易理解,A、B样本的样本间相似度低于0.3。因此,通过该实施例的方案,可以构建如图2所示的网络结构。如图2所示,A、C样本之间具有连接边,权值为0.5;B、C样本之间具 有连接边,权值为0.5;而A、B样本之间没有连接边。
然后,在步骤106中,基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量。
在一个实施例中,对于所述多个样本中的任一样本,例如,第一样本,可以基于第一样本的邻居样本,来确定第一样本的图节点向量。第一样本的邻居样本是指与第一样本直接相连的样本。
在该实施例的一个示例中,如前所述对所述多个样本的两两样本间相似度进行过滤以得到网络结构。如此得到的网络结构中,样本间相似度较高的两两样本之间具有连接边,而样本间相似度较低的两两样本之间没有连接边。此时,对于所述多个样本中的任一样本,例如样本i,可以先基于样本i和其邻居样本各自的特征向量,分别确定样本i和其邻居样本各自的初次迭代的图节点向量。具体的,可以将特征向量作归一化处理,然后作为初次迭代的图节点向量。也可以将特征向量作归一化处理后,乘以非线性变换函数,以得到初次迭代的图节点向量。上述非线性变换函数可以使用Relu函数,Sigmoid函数,Tanh函数等等。然后,对于样本i,执行多级向量迭代。对于所述多级向量迭代中的每级向量迭代,基于样本i的邻居样本的上一级迭代的图节点向量,确定样本i的本次迭代的图节点向量。将所述多级向量迭代中的最后一级向量迭代得到的图节点向量作为最终的图节点向量,并用于后续的分析。
需要说明的是,如果样本的属性特征很多(例如,一万多个属性特征),则可以使用主成分分析法(Principal Component Analysis,PCA)等,提取主要属性特征。然后,基于主要属性特征构成的特征向量,确定初次迭代的图节点向量。
对于样本i,其可以具有多个邻居样本。可以设定N i为样本i的邻居样本构成的集合,样本j为N i中的任一个元素,即样本j为样本i的一个邻居样本。
在该实施例的一个示例中,样本i的t级迭代的图节点向量
Figure PCTCN2020073872-appb-000001
通过下式计算:
Figure PCTCN2020073872-appb-000002
即,对样本i各个邻居样本的上一级迭代(t-1级迭代)的图节点向量
Figure PCTCN2020073872-appb-000003
进行求和,得到样本i本次迭代(t级迭代)的图节点向量
Figure PCTCN2020073872-appb-000004
在该实施例的一个示例中,样本i的t级迭代的图节点向量
Figure PCTCN2020073872-appb-000005
通过下式计算:
Figure PCTCN2020073872-appb-000006
式(2)在式(1)的基础上,在样本i各个邻居样本的上一级迭代的图节点向量
Figure PCTCN2020073872-appb-000007
进行求和时,引入权重因子a ij。a ij可以为样本i和样本j之间的样本间相似度,或者,样本i和样本j之间连接边的权值。
在该实施例的另一个示例中,在执行多级向量迭代中的每级向量迭代时,基于样本i的上一级迭代的图节点向量和样本i的邻居样本的上一级迭代的图节点向量,确定样本i的本次迭代的图节点向量。将所述多级向量迭代中的最后一级向量迭代得到的图节点向量作为最终的图节点向量,并用于后续的分析。
在该实施例的又一个示例中,样本i的t级迭代的图节点向量
Figure PCTCN2020073872-appb-000008
通过下式计算:
Figure PCTCN2020073872-appb-000009
即,对样本i上一级迭代的图节点向量
Figure PCTCN2020073872-appb-000010
以及样本i各个邻居样本的上一级迭代的图节点向量
Figure PCTCN2020073872-appb-000011
进行求和,得到样本i本次迭代(t级迭代)的图节点向量
Figure PCTCN2020073872-appb-000012
在该实施例的一个示例中,样本i的t级迭代的图节点向量
Figure PCTCN2020073872-appb-000013
通过下式计算:
Figure PCTCN2020073872-appb-000014
式(4)在式(3)的基础上,在本i各个邻居样本的上一级迭代的图节点向量
Figure PCTCN2020073872-appb-000015
进行求和时,引入权重因子a ij。a ij介于0和1之间,具体可以为样本i和样本j之间的样本间相似度。
在该实施例中,继续参考图2,C样本为A样本的邻居样本,因此,A样本的图节点向量反映了C样本的特征向量。C样本为B样本的邻居样本,因此,B样本的图节点向量也反映了C样本的特征向量。因此,通过样本C可以建立了A样本和B样本间的间接相似度,而这种间接相似度通过A样本的图节点向量和B样本的图节点向量来反映。
在一个实施例中,可以采用deepwalk图嵌入算法或GraRep图嵌入算法,对网络结构上的各个节点进行嵌入处理,得到所述多个样本各自的图节点向量。
通过上述实施例得到的样本的图节点向量,刻画了样本在整个网络中的拓扑性质,这种拓扑性质反应了样本之间的间接相似度,例如,样本与邻居的邻居之间的相似度。
之后,在步骤108中,基于所述多个样本的图节点向量,对所述多个样本进行聚类。
可以把各个样本的图节点向量,看作各个样本的新的特征向量。利用各个样本的新的特征向量,利用聚类算法(例如,k-means)对各个样本进行聚类。
综上,本说明书实施例的方案,可以基于多个样本的图节点向量,对多个样本进行聚类;样本的图节点向量刻画了样本在整个网络中的拓扑性质,反映了样本之间的间接相似度,因此,提高了聚类结果的准确性。
仍以上述A、B、C三个样本为例,通过本说明实施例的方案,可以得到A、B、C三个样本各自的图节点向量。其中,A样本的图节点向量反映了A样本和B样本之间的间接相似度,B样本的图节点向量反映了B样本和A样本之间的间接相似度。在采用包括了A、B、C三个样本的多个样本的图节点向量进行聚类时,考虑了A样本和B样本之间的间接相似度,从而可以提高聚类结果的准确性。
根据第二方面,提供了一种样本聚类装置300。参考图3,所述装置300包括:
获取单元310,配置为获取多个样本的属性特征构成的特征向量;
第一确定单元320,配置为基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;
第二确定单元330,配置为基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;
处理单元340,配置为基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;
聚类单元350,配置为基于所述多个样本的图节点向量,对所述多个样本进行聚类。
在一个实施例中,所述样本包括用户样本,所述属性特征包括用户样本的注册信息和/或行为信息。
在一个实施例中,所述第一确定单元320包括归一化子单元321和计算子单元322;
所述归一化子单元321配置为对所述多个样本的特征向量进行归一化处理;
所述计算子单元322配置为基于归一化处理后的所述多个样本的特征向量,计算所述多个样本的两两样本间余弦相似度或欧式距离,获得所述多个样本的两两样本间相似度。
在一个实施例中,所述第二确定单元330包括排序子单元331和构建子单元332;
所述排序子单元331配置为按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;
所述构建子单元332配置为在排序结果中前M个或前百分之M’的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前M个或前百分之M’的两两样本间相似度作为各自对应的连接边的权值。
在一个实施例中,所述第二确定单元330包括第三确定子单元333和构建子单元332;
所述第三确定子单元333配置为从所述多个样本的两两样本间相似度中确定出第一两两样本间相似度,所述第一两两样本间相似度大于预设阈值;
所述构建子单元332配置为在所述第一两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述第一两两样本间相似度作为对应的连接边的权值。
在一个示例中,所述处理单元340包括第四确定子单元341和执行子单元342;
所述第四确定子单元341配置为对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
所述执行子单元342配置为对于第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的上一级迭代的图节点向量和第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
在一个示例中,所述处理单元340包括第四确定子单元341和执行子单元342;
所述第四确定子单元341配置为对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图 节点向量;
所述执行子单元342配置为对于所述第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
在一个实施例中,所述处理单元340还配置为采用deepwalk图嵌入算法或GraRep图嵌入算法,进行嵌入处理,得到所述多个样本各自的图节点向量。
装置300的各功能单元可以参考图1所示的方法实施例实现,在此不再赘述。
另一方面,本说明书的实施例提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行图1所示的方法。
另一方面,本说明书的实施例提供了一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现图1所示的方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (18)

  1. 一种样本聚类方法,所述方法包括:
    获取多个样本的属性特征构成的特征向量;
    基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;
    基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;
    基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;
    基于所述多个样本的图节点向量,对所述多个样本进行聚类。
  2. 根据权利要求1所述的方法,所述样本包括用户样本,所述属性特征包括用户样本的注册信息和/或行为信息。
  3. 根据权利要求1所述的方法,所述基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度,包括:
    对所述多个样本的特征向量进行归一化处理;
    基于归一化处理后的所述多个样本的特征向量,计算所述多个样本的两两样本间余弦相似度或欧式距离,获得所述多个样本的两两样本间相似度。
  4. 根据权利要求1所述的方法,所述基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构,包括:
    按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;
    在排序结果中前M个或前百分之M’的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前M个或前百分之M’的两两样本间相似度作为各自对应的连接边的权值。
  5. 根据权利要求1所述的方法,所述基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构,包括:
    从所述多个样本的两两样本间相似度中确定出第一两两样本间相似度,所述第一两两样本间相似度大于预设阈值;
    在所述第一两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述第一两两样本间相似度作为对应的连接边的权值。
  6. 根据权利要求4或5所述的方法,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
    对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分 别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
    对于第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的上一级迭代的图节点向量,第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
  7. 根据权利要求4或5所述的方法,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
    对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
    对于所述第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
  8. 根据权利要求1所述的方法,所述基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量,包括:
    采用deepwalk图嵌入算法或GraRep图嵌入算法,进行嵌入处理,得到所述多个样本各自的图节点向量。
  9. 一种样本聚类装置,所述装置包括:
    获取单元,配置为获取多个样本的属性特征构成的特征向量;
    第一确定单元,配置为基于所述多个样本的特征向量,确定所述多个样本的两两样本间相似度;
    第二确定单元,配置为基于所述多个样本的两两样本间相似度,确定所述多个样本的网络结构;其中,所述多个样本作为所述网络结构中的节点,两两节点之间的连接边信息基于该两两节点所对应的两两样本间相似度而确定;
    处理单元,配置为基于所述网络结构,采用无监督嵌入处理,得到所述多个样本各自的图节点向量;
    聚类单元,配置为基于所述多个样本的图节点向量,对所述多个样本进行聚类。
  10. 根据权利要求9所述的装置,所述样本包括用户样本,所述属性特征包括用户样本的注册信息和/或行为信息。
  11. 根据权利要求9所述的装置,所述第一确定单元包括归一化子单元和计算子单元;
    所述归一化子单元配置为对所述多个样本的特征向量进行归一化处理;
    所述计算子单元配置为基于归一化处理后的所述多个样本的特征向量,计算所述多 个样本的两两样本间余弦相似度或欧式距离,获得所述多个样本的两两样本间相似度。
  12. 根据权利要求9所述的装置,所述第二确定单元包括排序子单元和构建子单元;
    所述排序子单元配置为按照从大到小的顺序,对所述多个样本的两两样本间相似度进行排序;
    所述构建子单元配置为在排序结果中前M个或前百分之M’的两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述前M个或前百分之M’的两两样本间相似度作为各自对应的连接边的权值。
  13. 根据权利要求9所述的装置,所述第二确定单元包括第三确定子单元和构建子单元;
    所述第三确定子单元配置为从所述多个样本的两两样本间相似度中确定出第一两两样本间相似度,所述第一两两样本间相似度大于预设阈值;
    所述构建子单元配置为在所述第一两两样本间相似度对应的样本之间构建连接边,以得到所述多个样本的网络结构;其中,所述第一两两样本间相似度作为对应的连接边的权值。
  14. 根据权利要求12或13所述的装置,所述处理单元包括第四确定子单元和执行子单元;
    所述第四确定子单元配置为对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
    所述执行子单元配置为对于第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的上一级迭代的图节点向量和第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
  15. 根据权利要求12或13所述的装置,所述处理单元包括第四确定子单元和执行子单元;
    所述第四确定子单元配置为对于所述多个样本中的第一样本,基于第一样本和其邻居样本各自的特征向量,分别确定第一样本和其邻居样本各自的初次迭代的图节点向量;
    所述执行子单元配置为对于所述第一样本,执行多级向量迭代,将多级向量迭代的结果作为该第一样本的图节点向量;其中所述多级向量迭代中的每级向量迭代包括,基于第一样本的邻居样本的上一级迭代的图节点向量,确定第一样本的本次迭代的图节点向量。
  16. 根据权利要求9所述的装置,所述处理单元还配置为采用deepwalk图嵌入算法 或GraRep图嵌入算法,进行嵌入处理,得到所述多个样本各自的图节点向量。
  17. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行权利要求1-8中任一项的所述的方法。
  18. 一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-8中任一项所述的方法。
PCT/CN2020/073872 2019-03-29 2020-01-22 一种样本聚类方法及装置 Ceased WO2020199745A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910250748.XA CN110032606B (zh) 2019-03-29 2019-03-29 一种样本聚类方法及装置
CN201910250748.X 2019-03-29

Publications (1)

Publication Number Publication Date
WO2020199745A1 true WO2020199745A1 (zh) 2020-10-08

Family

ID=67236968

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073872 Ceased WO2020199745A1 (zh) 2019-03-29 2020-01-22 一种样本聚类方法及装置

Country Status (2)

Country Link
CN (1) CN110032606B (zh)
WO (1) WO2020199745A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032606B (zh) * 2019-03-29 2021-05-14 创新先进技术有限公司 一种样本聚类方法及装置
CN113127669B (zh) * 2020-01-15 2023-10-10 百度在线网络技术(北京)有限公司 广告配图方法、装置、设备和存储介质
CN111340566B (zh) * 2020-03-23 2023-12-08 京东科技控股股份有限公司 一种商品分类方法、装置、电子设备及存储介质
CN111461225B (zh) * 2020-04-01 2022-04-01 支付宝(杭州)信息技术有限公司 客户聚类系统及其方法
CN113674009B (zh) * 2020-05-15 2025-02-25 北京沃东天骏信息技术有限公司 确定目标用户的方法和装置
CN112163848B (zh) * 2020-09-21 2023-05-12 哈尔滨工业大学(威海) 一种面向流网络的角色划分系统及其工作方法、介质
CN112380344B (zh) * 2020-11-19 2023-08-22 平安科技(深圳)有限公司 文本分类的方法、话题生成的方法、装置、设备及介质
CN112364181B (zh) * 2020-11-27 2024-05-28 深圳市慧择时代科技有限公司 一种保险产品匹配度确定方法及装置
CN113378899B (zh) * 2021-05-28 2024-05-28 百果园技术(新加坡)有限公司 非正常账号识别方法、装置、设备和存储介质
CN113645107B (zh) * 2021-07-27 2022-12-02 广州市威士丹利智能科技有限公司 一种基于智能家居的网关端冲突解决方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120263376A1 (en) * 2011-04-12 2012-10-18 Sharp Laboratories Of America, Inc. Supervised and semi-supervised online boosting algorithm in machine learning framework
CN102982342A (zh) * 2012-11-08 2013-03-20 厦门大学 基于拉格朗日对偶的半正定谱聚类方法
CN107103329A (zh) * 2016-02-22 2017-08-29 阿里巴巴集团控股有限公司 一种数据聚类方法及装置
CN109447261A (zh) * 2018-10-09 2019-03-08 北京邮电大学 一种基于多阶邻近相似度的网络表示学习的方法
CN110032606A (zh) * 2019-03-29 2019-07-19 阿里巴巴集团控股有限公司 一种样本聚类方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100495405C (zh) * 2007-01-10 2009-06-03 复旦大学 大规模文本逐次二分的层次聚类方法
WO2018237051A1 (en) * 2017-06-20 2018-12-27 Catalina Marketing Corporation AUTOMATIC LEARNING FOR THE MARKETING OF BRANDED CONSUMPTION PRODUCTS
CN107633263A (zh) * 2017-08-30 2018-01-26 清华大学 基于边的网络图嵌入方法
CN108920678A (zh) * 2018-07-10 2018-11-30 福州大学 一种基于谱聚类与模糊集的重叠社区发现方法
CN109194707B (zh) * 2018-07-24 2020-11-20 创新先进技术有限公司 分布式图嵌入的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120263376A1 (en) * 2011-04-12 2012-10-18 Sharp Laboratories Of America, Inc. Supervised and semi-supervised online boosting algorithm in machine learning framework
CN102982342A (zh) * 2012-11-08 2013-03-20 厦门大学 基于拉格朗日对偶的半正定谱聚类方法
CN107103329A (zh) * 2016-02-22 2017-08-29 阿里巴巴集团控股有限公司 一种数据聚类方法及装置
CN109447261A (zh) * 2018-10-09 2019-03-08 北京邮电大学 一种基于多阶邻近相似度的网络表示学习的方法
CN110032606A (zh) * 2019-03-29 2019-07-19 阿里巴巴集团控股有限公司 一种样本聚类方法及装置

Also Published As

Publication number Publication date
CN110032606B (zh) 2021-05-14
CN110032606A (zh) 2019-07-19

Similar Documents

Publication Publication Date Title
WO2020199745A1 (zh) 一种样本聚类方法及装置
US11995702B2 (en) Item recommendations using convolutions on weighted graphs
CN112085172B (zh) 图神经网络的训练方法及装置
WO2023000574A1 (zh) 一种模型训练方法、装置、设备及可读存储介质
CN111222976B (zh) 一种基于双方网络图数据的风险预测方法、装置和电子设备
CN111199474B (zh) 一种基于双方网络图数据的风险预测方法、装置和电子设备
WO2015135321A1 (zh) 基于金融数据的社会关系挖掘的方法及装置
US20140108190A1 (en) Recommending product information
CN112541575B (zh) 图神经网络的训练方法及装置
Xiao et al. A truth discovery approach with theoretical guarantee
CN111581450B (zh) 确定用户的业务属性的方法及装置
WO2020114108A1 (zh) 聚类结果的解释方法和装置
CN110462607A (zh) 从梯度增强机识别原因代码
CN112085615A (zh) 图神经网络的训练方法及装置
CN112560105B (zh) 保护多方数据隐私的联合建模方法及装置
CN111966886A (zh) 对象推荐方法、对象推荐装置、电子设备及存储介质
WO2013103747A1 (en) Detecting overlapping clusters
US9697275B2 (en) System and method for identifying groups of entities
CN112148880A (zh) 一种客服对话语料聚类方法、系统、设备及存储介质
Chu et al. Variational cross-network embedding for anonymized user identity linkage
CN112465593A (zh) 通过图神经网络实现时尚套装推荐的方法
US10521436B2 (en) Systems and methods for data and information source reliability estimation
CN120031632A (zh) 一种互补产品的推荐方法和装置
CN111695917B (zh) 商品推荐方法、系统、电子设备和存储介质
CN115965071A (zh) 交易平台中节点属性信息检测模型的训练方法和训练装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20784167

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20784167

Country of ref document: EP

Kind code of ref document: A1