RainBoltz / pySmore

A newly interpreted code of C++ project `SMORe`, which developed in Python to enhance the usage-flexibility and migration-potential.
MIT License
0 stars 0 forks source link

Add a simple testing method #4

Open RainBoltz opened 3 years ago

RainBoltz commented 3 years ago

since we can train then get the embeddings efficiently, why not also do testing in the pipeline?

for example:

import pysmore.utils.eval as Evaluator
import pysmore.models.mf as MF

embeddings, index_mapper = MF.create_graph('/training/data')
MF.train()

Evaluator.create_graph('/testing/data')
result_dict = Evaluator.top_k_result(embeddings, index_mapper, k=10)

with result_dict as:

{
    'eval': 'top_k',
    'settings':{
        'k': int,
        'task': 'i-i'
    },
    'results': {
        'map': float,
        'hit': float,
        'rec': float
    }
}
neenerrh commented 3 years ago

I can't find the testing method in the pipeline. Can you help me with it

RainBoltz commented 3 years ago

sorry @neenerrh it's still in progress. COVID19 messed everything up so this feature will not bring up recently 😞