Please Answer my doubt regarding this

Q1. Can we use heterogenous models also in bagging and boosting because it is generally used with homogenous models?

Q2. What algos we can use apart from decision trees in bagging,boosting as they generally used with decision tree only.?

Actually, bagging is used to make the models heterogeneous even if the algorithm is same. So, for we can models on different algorithms on separate samples of data but it would not be much advantageous. If we train heterogeneous models on the whole data rather than a smaller subset (bagging) and then ensemble those it would give better results.

Regarding boosting, it is very specific to the decision trees. Though we have scenarios where we add heterogeneous models in a pipeline for boosting the performance (such as ANN -> SVM etc.) but it is not really boosting in the classical sense.

Bagging and boosting is mostly done in decision trees because the decision trees are good learners but they quickly overfit. Therefore, it was discovered that if we have shorter decision trees the results will be better but the bias will be very high. So, ensembling the biased models such that each model is a bit different (trained on a different subset of data).

One more Question:-

Like we used to do Linear Regression with the help of sklearn in machine learning can we do the similar Linear regression using tflearn or any package in tensorflow.

Please Answer.

The various functions of sklearn are not available in tensorflow. I am not sure if they plan to build it.

But if you need to build linear regression using tensorflow, you can simply build a neural network with one layer without any activation function.