How to use toEntity method in stryker-parent

Best JavaScript code snippet using stryker-parent

pretty.ts

Source:pretty.ts Github

copy

Full Screen

1import {printConfig} from "../utils/display.utils";2import {readJson} from "../utils/fs.utils";3const configsMain = [4 [`Movielens-0`, `{"config":{"type":"nearestNeighbour(inverted)","N":17},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}`, `MRR@10=0.5745`],5 [`Movielens-1`, `{"config":{"type":"nearestNeighbour(inverted)","N":17},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}`, `MRR@10=0.5732`],6 [`Movielens-2`, `{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":34},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"interaction(genre)"},"output":{"dtoType":"matrix","fromEntity":"genre","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"nearestNeighbour","N":19},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}`, `MRR@10=0.5931`],7 [`Movielens-3`, `{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"nearestNeighbour(inverted)","N":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"nearestNeighbour(inverted)","N":18},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"compareArray"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]},{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]}]},{"config":{"type":"nearestNeighbour(inverted)","N":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"compareArray"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]},{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":6},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"compareArray"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]},{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}`, `MRR@10=0.6138`],8 [`Sobazaar-0`, `{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":6},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.0137`],9 [`Sobazaar-1`, `{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":21},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":1},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0121`],10 [`Sobazaar-2`, `{"config":{"type":"nearestNeighbour(inverted)","N":12},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"scaleMatrix","scale":7},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0124`],11 [`Sobazaar-3`, `{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":1},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.0158`],12 [`Filmtrust-0`, `{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}]}`, `MRR@10=0.9961`],13 [`Filmtrust-1`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]},{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"nearestNeighbour","N":1},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}]}`, `MRR@10=0.996`],14 [`Filmtrust-2`, `{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}`, `MRR@10=0.9955`],15 [`Filmtrust-3`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour","N":19},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]},{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":20},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"nearestNeighbour","N":18},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(trust)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}]}`, `MRR@10=0.9963`],16]17const configsDenseSparse = [18 // [`Dense-0`, `{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":14},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":12},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0241`],19 // [`Dense-1`, `{"config":{"type":"nearestNeighbour","N":29},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":18},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":10},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0248`],20 // [`Sparse-0`, `{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0165`],21 // [`Sparse-1`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"nearestNeighbour","N":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.0168`],22 [`dense-0`, `{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":14},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":12},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0241`],23 [`dense-1`, `{"config":{"type":"nearestNeighbour(inverted)","N":13},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":24},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.025`],24 [`sparse-0`, `{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0165`],25 [`sparse-1`, `{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.0202`],26]27const configsInteraction = [28 [`interaction-product_detail_viewed`, `{"config":{"type":"nearestNeighbour","N":29},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":8},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":7},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0601`],29 [`interaction-product_detail_clicked`, `{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.1316`],30 [`interaction-product_wanted`, `{"config":{"type":"nearestNeighbour","N":30},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":11},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":20},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.1717`],31 [`interaction-buy_clicked`, `{"config":{"type":"nearestNeighbour","N":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":10},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":11},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour(inverted)","N":20},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.019`],32]33const configsEvaluation = [34 [`MRR@10`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":7},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"compareArray"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]},{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]}]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"interaction(acts)"},"output":{"dtoType":"matrix","fromEntity":"actor","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":22},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}`, `MRR@10=0.6293`],35 [`Precision@1`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":10},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"compareArray"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]},{"config":{"type":"property(movie.actors)"},"output":{"dtoType":"vector","entity":"movie","valueType":"array"},"input":[]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]},{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"movie","valueType":"number"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}`, `MRR@10=0.5966`],36 [`Recall@10`, `{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":11},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"movie"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"actor"},"input":[{"config":{"type":"interaction(acts)"},"output":{"dtoType":"matrix","fromEntity":"actor","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"scaleMatrix","scale":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]},{"config":{"type":"nearestNeighbour(inverted)","N":3},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"movie","toEntity":"user"},"input":[{"config":{"type":"interaction(rating)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"movie"},"input":[]}]}]}]}]}]}`, `MRR@10=0.5843`],37]38const main = async () => {39 const configs = [40 // ["Pretty", await readJson("../src/scripts/pretty.json")],41 // ...configsMain.map(it => [it[0], JSON.parse(it[1]), it[2]]),42 // ...configsDenseSparse.map(it => [it[0], JSON.parse(it[1]), it[2]]),43 // ...configsInteraction.map(it => [it[0], JSON.parse(it[1]), it[2]]),44 ...configsEvaluation.map(it => [it[0], JSON.parse(it[1]), it[2]]),45 ]46 configs.forEach(it => {47 console.log("\\begin{Verbatim}[samepage=true]")48 console.log(`### ${it[0]} ###`)49 printConfig(it[1])50 console.log(it[2])51 console.log("\\end{Verbatim}")52 })53}...

Full Screen

Full Screen

density.ts

Source:density.ts Github

copy

Full Screen

1import {readSobazaar} from "../problems/sobazaar.problem";2import {fitnessScore, Score} from "../fitness";3import {calcRecursive} from "../evaluate";4import {hash} from "../utils/cache.utils";5import {readFSCache, writeFSCache} from "../utils/fs.utils";6import {ProblemInstance} from "../interface/problem.interface";7import {ConfigTree} from "../tree";8export const configsDensity = [9 // [`dense-0`, `{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":14},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":12},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0241`],10 // [`dense-1`, `{"config":{"type":"nearestNeighbour","N":29},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":18},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":10},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0248`],11 // [`dense-2`, `{"config":{"type":"nearestNeighbour(inverted)","N":13},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":24},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.025`],12 // [`dense-3`, `{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":1},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}`, `MRR@10=0.0192`],13 // [`sparse-0`, `{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0165`],14 // [`sparse-1`, `{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"nearestNeighbour","N":8},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.0168`],15 // [`sparse-2`, `{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.0163`],16 // [`sparse-3`, `{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.0202`],17 [`dense-0`, `{"config":{"type":"nearestNeighbour","N":21},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"nearestNeighbour","N":9},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":14},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour","N":12},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0241`],18 [`dense-1`, `{"config":{"type":"nearestNeighbour(inverted)","N":13},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":24},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.025`],19 [`sparse-0`, `{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"user","valueType":"number"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}`, `MRR@10=0.0165`],20 [`sparse-1`, `{"config":{"type":"nearestNeighbour(inverted)","N":16},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(pixel-init)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"product"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"scaleMatrix","scale":3},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.0202`],21]22export const configsInteraction = [23 [`content:interact:product_detail_viewed`, `{"config":{"type":"nearestNeighbour","N":29},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":8},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":4},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":7},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.0601`],24 [`product_detail_clicked`, `{"config":{"type":"nearestNeighbour","N":26},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":5},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":0},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"scaleMatrix","scale":2},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}`, `MRR@10=0.1316`],25 [`product_wanted`, `{"config":{"type":"nearestNeighbour","N":30},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"addVector"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour","N":11},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"popularity"},"output":{"dtoType":"vector","entity":"product","valueType":"number"},"input":[{"config":{"type":"interaction(content:interact:product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"nearestNeighbour","N":20},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(product_detail_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]},{"config":{"type":"interaction(product_wanted)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}`, `MRR@10=0.1717`],26 [`purchase:buy_clicked`, `{"config":{"type":"nearestNeighbour","N":6},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(content:interact:product_detail_viewed)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"scaleMatrix","scale":10},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]},{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"sumMatrix"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]},{"config":{"type":"interaction(content:interact:product_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[{"config":{"type":"nearestNeighbour(inverted)","N":11},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"nearestNeighbour(inverted)","N":20},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"pearsonSimilarity"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]},{"config":{"type":"transpose"},"output":{"dtoType":"matrix","fromEntity":"product","toEntity":"user"},"input":[{"config":{"type":"interaction(purchase:buy_clicked)"},"output":{"dtoType":"matrix","fromEntity":"user","toEntity":"product"},"input":[]}]}]}]}]}]}`, `MRR@10=0.019`],27]28const memoize = (problem: ProblemInstance, config: ConfigTree, fn: () => Score) => {29 const key = `results/${hash(problem, config)}`30 const cached = readFSCache(key)31 if (cached) {32 console.log(`Full program cache hit: ${key}`)33 return cached34 }35 const res = fn()36 // writeFSCache(key, res)37 return res38}39const mainDensity = async () => {40 const denseProblem = await readSobazaar(undefined, undefined, undefined, "dense")41 const sparseProblem = await readSobazaar(undefined, undefined, undefined, "sparse")42 const configs = configsDensity.map(([key, config, ...rest]) => [key, JSON.parse(config)])43 configs.forEach(([key, config]) => {44 const denseScore = memoize(denseProblem, config, () => fitnessScore(45 calcRecursive(config, denseProblem),46 denseProblem47 )).raw48 console.log(`{'dataset': 'sobazaar-dense', 'training': '${key}', 'mrr': ${denseScore.mrr}},`,)49 const sparseScore = memoize(sparseProblem, config, () => fitnessScore(50 calcRecursive(config, sparseProblem),51 sparseProblem52 )).raw53 console.log(`{'dataset': 'sobazaar-sparse', 'training': '${key}', 'mrr': ${sparseScore.mrr}},`,)54 }55 )56}57const mainInteraction = async () => {58 configsInteraction.forEach(async ([keyData, ...rest]) => {59 const denseProblem = await readSobazaar(undefined, undefined, keyData, "dense")60 configsInteraction.forEach(([keyConfig, configString, ...rest]) => {61 const config = JSON.parse(configString)62 const score = memoize(denseProblem, config, () => fitnessScore(63 calcRecursive(config, denseProblem),64 denseProblem65 ))66 console.log(`{'dataset': '${keyData}', 'training': '${keyConfig}', 'mrr': '${score.raw.mrr}'}`,)67 })68 })69}70mainDensity()...

Full Screen

Full Screen

dataMapper.test.js

Source:dataMapper.test.js Github

copy

Full Screen

...23 const Entity = givenAnEntity()24 const entityIDs = ['idField']25 const dataMapper = new DataMapper(Entity, entityIDs)26 //when27 const toEntity = dataMapper.toEntity({ id_field: 1, field1: true, field_name: false })28 //then29 assert.deepStrictEqual(toEntity.idField, 1)30 assert.deepStrictEqual(toEntity.field1, true)31 assert.deepStrictEqual(toEntity.fieldName, false)32 })33 it('should convert an entity field to the collection string convetion', () => {34 //given35 const Entity = givenAnEntity()36 const entityIDs = ['idField']37 const dataMapper = new DataMapper(Entity, entityIDs)38 //when39 const toEntity = dataMapper.toCollectionFieldName('fieldName')40 //then41 assert.deepStrictEqual(toEntity, 'field_name')42 })43 it('should retrieve collection ID from entity', () => {44 //given45 const Entity = givenAnEntity()46 const entityIDs = ['idField']47 const dataMapper = new DataMapper(Entity, entityIDs)48 //when49 const toEntity = dataMapper.collectionIDs()50 //then51 assert.deepStrictEqual(toEntity, ['id_field'])52 })53 it('should retrieve collection fields', () => {54 //given55 const Entity = givenAnEntity()56 const entityIDs = ['idField']57 const dataMapper = new DataMapper(Entity, entityIDs)58 //when59 const toEntity = dataMapper.collectionFields()60 //then61 assert.deepStrictEqual(toEntity, ['id_field', 'field1', 'field_name'])62 })63 it('should retrieve collection fields with values', () => {64 //given65 const Entity = givenAnEntity()66 const entityInstance = new Entity()67 entityInstance.idField = 168 entityInstance.field1 = true69 entityInstance.fieldName = false70 const entityIDs = ['idField']71 const dataMapper = new DataMapper(Entity, entityIDs)72 //when73 const toEntity = dataMapper.collectionFieldsWithValue(entityInstance)74 //then75 assert.deepStrictEqual(toEntity, { id_field: 1, field1: true, field_name: false })76 })77 })78 describe('Complex Entity - Multiple Types', () => {79 const givenAnComplexEntity = () => {80 const ParentEntity = entity('A parent entity', {})81 return entity('A entity', {82 id: field(Number),83 name: field(String, {84 validation: { presence: true, length: { minimum: 3 } }85 }),86 numberTest: field(Number),87 stringTest: field(String),88 booleanTest: field(Boolean),89 dateTest: field(Date),90 objectTest: field(Object),91 entityTest: field(ParentEntity),92 // TODO93 // arrayTest: field(Array),94 numbersTest: field([Number]),95 stringsTest: field([String]),96 booleansTest: field([Boolean]),97 datesTest: field([Date]),98 objectsTest: field([Object]),99 // arraysTest:field([Array]),100 entitiesTest: field([ParentEntity]),101 functionTest() { return 1 }102 })103 }104 it('should convert data from collection to entity', () => {105 //given106 const Entity = givenAnComplexEntity()107 const samples = [108 ['id', 'id', 1],109 ['name', 'name', "clare"],110 ['number_test', 'numberTest', 1],111 ['string_test', 'stringTest', "s1"],112 ['boolean_test', 'booleanTest', true],113 ['date_test', 'dateTest', new Date()],114 ['object_test', 'objectTest', { x: 1 }],115 // TODO116 // ['array_test', 'arrayTest', [1]]117 ['numbers_test', 'numbersTest', [1, 2]],118 ['strings_test', 'stringsTest', ["s1", "s2"]],119 ['booleans_test', 'booleansTest', [true, false]],120 ['dates_test', 'datesTest', [new Date(), new Date()]],121 ['objects_test', 'objectsTest', [{ x: 1 }, { y: 2 }]],122 // ['arrays_test', 'arraysTest', [[1]]]123 ]124 //when125 const dataMapper = new DataMapper(Entity)126 const data = samples.map(i => { return { [i[0]]: i[2] } }).reduce((obj, i) => Object.assign(obj, i))127 const toEntity = dataMapper.toEntity(data)128 //then129 samples.map(i => {130 assert.deepStrictEqual(toEntity[i[1]], i[2])131 })132 })133 it('should return null from collection to entity', () => {134 //given135 const Entity = givenAnComplexEntity()136 const samples = [137 ['id', 'id', null],138 ['name', 'name', null],139 ['number_test', 'numberTest', null],140 ['string_test', 'stringTest', null],141 ['boolean_test', 'booleanTest', null],142 ['date_test', 'dateTest', null],143 ['object_test', 'objectTest', null],144 // TODO145 // ['array_test', 'arrayTest', [null]]146 ['numbers_test', 'numbersTest', null],147 ['strings_test', 'stringsTest', [null, null]],148 ['booleans_test', 'booleansTest', [null, null]],149 ['dates_test', 'datesTest', [null, null]],150 ['objects_test', 'objectsTest', [null, null]],151 // ['arrays_test', 'arraysTest', [[null]]]152 ]153 //when154 const dataMapper = new DataMapper(Entity)155 const data = samples.map(i => { return { [i[0]]: i[2] } }).reduce((obj, i) => Object.assign(obj, i))156 const toEntity = dataMapper.toEntity(data)157 //then158 samples.map(i => {159 assert.deepStrictEqual(toEntity[i[1]], i[2])160 })161 })162 })...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { toEntity } = require('stryker-parent');2const { toEntity } = require('stryker');3const { toEntity } = require('stryker-api');4const { toEntity } = require('stryker-util');5const { toEntity } = require('stryker-html-reporter');6const { toEntity } = require('stryker-mocha-runner');7const { toEntity } = require('stryker-mocha-framework');8const { toEntity } = require('stryker-mocha-runner');9const { toEntity } = require('stryker-mocha-framework');10const { toEntity } = require('stryker-typescript');11const { toEntity } = require('stryker-javascript-mutator');12const { toEntity } = require('stryker-javascript-mutator');13const { toEntity } = require('stryker-javascript-mutator');14const { toEntity } = require('stryker-html-reporter');15const { toEntity } = require('stryker-mocha-runner');16const { toEntity } = require('stryker-mocha-framework');17const { toEntity } = require('stryker-mocha-runner');18const { toEntity } = require('stryker-mocha

Full Screen

Using AI Code Generation

copy

Full Screen

1import { toEntity } from 'stryker-parent';2toEntity('test');3import { toEntity } from 'stryker-parent';4toEntity('test');5import { toEntity } from 'stryker-parent';6toEntity('test');7import { toEntity } from 'stryker-parent';8toEntity('test');9import { toEntity } from 'stryker-parent';10toEntity('test');11import { toEntity } from 'stryker-parent';12toEntity('test');13import { toEntity } from 'stryker-parent';14toEntity('test');15import { toEntity } from 'stryker-parent';16toEntity('test');17import { toEntity } from 'stryker-parent';18toEntity('test');19import { toEntity } from 'stryker-parent';20toEntity('test');21import { toEntity } from 'stryker-parent';22toEntity('test');23import { toEntity } from 'stryker-parent';24toEntity('test');25import { toEntity } from 'stryker-parent';26toEntity('test');27import { toEntity } from 'stryker-parent';28toEntity('test');29import { toEntity } from 'stryker

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var entity = strykerParent.toEntity('test');3console.log(entity);4var strykerParent = require('stryker-parent');5var entity = strykerParent.toEntity('test');6console.log(entity);7var strykerParent = require('stryker-parent');8var entity = strykerParent.toEntity('test');9console.log(entity);10var strykerParent = require('stryker-parent');11var entity = strykerParent.toEntity('test');12console.log(entity);13var strykerParent = require('stryker-parent');14var entity = strykerParent.toEntity('test');15console.log(entity);16var strykerParent = require('stryker-parent');17var entity = strykerParent.toEntity('test');18console.log(entity);19var strykerParent = require('stryker-parent');20var entity = strykerParent.toEntity('test');21console.log(entity);22var strykerParent = require('stryker-parent');23var entity = strykerParent.toEntity('test');24console.log(entity);25var strykerParent = require('stryker-parent');26var entity = strykerParent.toEntity('test');27console.log(entity);28var strykerParent = require('stryker-parent');29var entity = strykerParent.toEntity('test');30console.log(entity);31var strykerParent = require('stryker-parent');32var entity = strykerParent.toEntity('test');33console.log(entity);

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var entity = strykerParent.toEntity('test');3console.log(entity);4var strykerParent = require('stryker-parent');5var entity = strykerParent.toEntity('test');6console.log(entity);7var strykerParent = require('stryker-parent');8var entity = strykerParent.toEntity('test');9console.log(entity);10var strykerParent = require('stryker-parent');11var entity = strykerParent.toEntity('test');12console.log(entity);13var strykerParent = require('stryker-parent');14var entity = strykerParent.toEntity('test');15console.log(entity);16var strykerParent = require('stryker-parent');17var entity = strykerParent.toEntity('test');18console.log(entity);19var strykerParent = require('stryker-parent');20var entity = strykerParent.toEntity('test');21console.log(entity);22var strykerParent = require('stryker-parent');23var entity = strykerParent.toEntity('test');24console.log(entity);25var strykerParent = require('stryker-parent');26var entity = strykerParent.toEntity('test');27console.log(entity);28var strykerParent = require('stryker-parent');29var entity = strykerParent.toEntity('test');30console.log(entity);31var strykerParent = require('stryker-parent');32var entity = strykerParent.toEntity('test');33console.log(entity);34var strykerParent = require('stryker-parent');35var entity = strykerParent.toEntity('test');36console.log(entity);

Full Screen

Using AI Code Generation

copy

Full Screen

1var strykerParent = require('stryker-parent');2var entity = strykerParent.toEntity('A');3var strykerParent = require('stryker-parent');4var entity = strykerParent.toEntity('A');5var strykerParent = require('stryker-parent');6var entity = strykerParent.toEntity('A');7var strykerParent = require('stryker-parent');8var entity = strykerParent.toEntity('A');9var strykerParent = require('stryker-parent');10var entity = strykerParent.toEntity('A');11var strykerParent = require('stryker-parent');12var entity = strykerParent.toEntity('A');13var strykerParent = require('stryker-parent');14var entity = strykerParent.toEntity('A');15var strykerParent = require('stryker-parent');16var entity = strykerParent.toEntity('A');17var strykerParent = require('stryker-parent');18var entity = strykerParent.toEntity('A');19var strykerParent = require('stryker-parent');20var entity = strykerParent.toEntity('A');21var strykerParent = require('stryker-parent');22var entity = strykerParent.toEntity('A');23var strykerParent = require('stryker-parent');24var entity = strykerParent.toEntity('A');

Full Screen

Using AI Code Generation

copy

Full Screen

1const parent = require('stryker-parent');2const child = require('stryker-child');3const entity = parent.toEntity(child);4console.log(entity);5const child = require('stryker-child');6const entity = child.toEntity(child);7console.log(entity);8const parent = require('stryker-parent');9const child = require('stryker-child');10const entity = parent.toEntity(child);11console.log(entity);12module.exports = function(config) {13 config.set({14 commandRunner: {15 }16 });17};

Full Screen

Using AI Code Generation

copy

Full Screen

1var stryker = require('stryker');2var parent = new stryker.Parent();3var child = new stryker.Child();4var entity = child.toEntity();5parent.fromEntity(entity);6console.log(parent);7console.log(child);

Full Screen

Using AI Code Generation

copy

Full Screen

1var Parent = require('stryker-parent');2var parent = new Parent();3var child = parent.toEntity({ name: 'Child', age: 12 });4console.log(child.name);5function Parent() { }6Parent.prototype.toEntity = function (entity) {7 return entity;8};9module.exports = Parent;10{ name: 'Child', age: 12 }1113:42:43 (8735) INFO Stryker 0 Mutant(s) generated

Full Screen

Using AI Code Generation

copy

Full Screen

1var toEntity = require('stryker-parent').toEntity;2var entity = toEntity('foo');3console.log(entity);4module.exports = {5 toEntity: function (name) {6 return {7 };8 }9};10{11}12module.exports = function(config) {13 config.set({14 });15}16 at load (C:\Users\myuser\Documents\stryker\stryker-parent\node_modules\resolve\lib\async.js:69:43)17 at onex (C:\Users\myuser\Documents\stryker\stryker-parent\node_modules\resolve\lib\async.js:92:31)18 at FSReqWrap.oncomplete (fs.js:123:15)

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful