在sparkR中将逻辑矩阵转换为“项”

时间:2018-10-22 16:49:39

标签: r sparkr apriori

sparkR中是否有var radius = 8; var trees_cologne = new ol.layer.Vector({ title: 'Some trees of Cologne', source: new ol.source.Vector({ format: new ol.format.GeoJSON({ defaultDataProjection: 'EPSG:4326', featureProjection: 'EPSG:3857' }), url: 'trees.geojson' }}, style: new ol.style.Style({ image: new ol.style.Circle({ radius: radius, fill: new ol.style.Fill({ color: 'red' }), stroke: new ol.style.Stroke({ color: 'white', width: radius / 4 }) }) }) }); 的等效项?我一直在阅读有关在挖掘关联之前如何为as(df, "transactions")创建“事务”类的文章。 https://blog.aptitive.com/building-the-transactions-class-for-association-rule-mining-in-r-using-arules-and-apriori-c6be64268bc4。我有一个apriori的格式;

sparkdataframe

我想把它变成“项目”;

CARD    CHEQ    CPF CTSAV   LOAN    MLOAN   NFDEP   PBLN    REWARDS SAVE    TDEP
TRUE    FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   TRUE    FALSE   FALSE
FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   TRUE    TRUE    FALSE
FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   TRUE    TRUE    FALSE
TRUE    TRUE    FALSE   FALSE   TRUE    FALSE   FALSE   FALSE   TRUE    FALSE   FALSE
TRUE    FALSE   FALSE   TRUE    FALSE   FALSE   FALSE   FALSE   TRUE    TRUE    FALSE
TRUE    TRUE    FALSE   FALSE   FALSE   FALSE   FALSE   FALSE   TRUE    FALSE   FALSE

0 个答案:

没有答案