Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurveFit trainer (train model with simple curve fit) #214

Closed
sunya-ch opened this issue Jan 16, 2024 · 3 comments
Closed

CurveFit trainer (train model with simple curve fit) #214

sunya-ch opened this issue Jan 16, 2024 · 3 comments
Assignees
Labels
kind/feature New feature or request

Comments

@sunya-ch
Copy link
Contributor

What would you like to be added?

I would like to add a new trainer class in addition to scikit and xgboost called curvefit (based on scipy curve_fit function).
This will be simple trainer that based on only single main feature of the group, for example, bpf_cpu_time_us of BPFOnly group.

On Trainer instance creation, fit_func such as logarithm func, logistic func is needed to be set.
In addition, p0 and main feature can be alternatively set via p0_func and feature_index, index of the target feature in the FeatureGroup, correspondingly.

class CurveFitModel():
    def __init__(self, fit_func, p0_func=None):
        self.fit_func = fit_func
        self.popt = None
        self.pcov = None
        self.feature_index = None
        self.p0_func = p0_func

Signed-off-by: Sunyanan Choochotkaew sunyanan.choochotkaew1@ibm.com

Why is this needed?

The main objective is to expand the range of power model training to existing data set such as SPECPower where only CPU usage metric is available.

@marceloamaral
Copy link
Contributor

@sunya-ch Interesting
Btw, why scikit or xgboost are not enough?

@sunya-ch
Copy link
Contributor Author

The curvefit allows more flexibility for adding a new simple model function that based on a single independent variable not limited to what provided from the scikit.
I put my PR here: #215.

@sunya-ch sunya-ch added this to the kepler-release-0.7 milestone Jan 17, 2024
@rootfs
Copy link
Contributor

rootfs commented Jan 17, 2024

The curve fitting algorithms can be implemented in golang for kepler without introducing additional pkg or libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants