Sort by

recency

|

86 Discussions

|

  • + 0 comments

    Best hair dryer ionic https://www.laifentech.com/pages/best-ionic-hair-dryer

  • + 0 comments
    import numpy as np 
    from sklearn.preprocessing import PolynomialFeatures 
    from sklearn.linear_model import LinearRegression
    
    f, n = map(int, input().strip().split())
        
    x_observations = [];
    y_amount = []
    for _ in range(n):
        l = list(map(float, input().strip().split()))
        x_observations.append(l[0:-1])
        y_amount.append(l[-1])
    
    poly_features = PolynomialFeatures(degree=3)
    X_poly = poly_features.fit_transform(np.array(x_observations))
    
    model = LinearRegression()
    model.fit(X_poly, np.array(y_amount))
    
    #result
    t = int(input().strip())
    for _ in range(t):
        l = poly_features.fit_transform(np.array(list(map(float, input().strip().split()))).reshape(1, -1))
        print( round(( model.predict(l) )[0],2))
    
  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    import numpy as np 
    from sklearn.preprocessing import PolynomialFeatures
    from sklearn.linear_model import LinearRegression
    
    
    
    F,N=map(int,input().split())
    train_data= []
    for i in range(N):
        rows=list(map(float,input().split()))
        train_data.append(rows)
    T = int(input())
    test_data=[list(map(float,input().split())) for _ in range(T)]
    
    X_train=[]
    y_train=[]
    for row in train_data:
        X_train.append(row[:F]) 
        y_train.append(row[F]) 
    
    X_train = np.array(X_train)  # Convert to numpy array for model input
    y_train = np.array(y_train)
    X_test=np.array(test_data)
    #print(X_test)
    
    poly=PolynomialFeatures(degree=3)
    X_train_poly=poly.fit_transform(X_train)
    X_test_poly=poly.transform(X_test)
    
    model=LinearRegression()
    model.fit(X_train_poly,y_train)
    y_pred=model.predict(X_test_poly)
    
    for pred in y_pred:
        print(pred)
    
  • + 2 comments

    AI focuses on creating systems that mimic human intelligence, while Statistics provides the mathematical foundation for data analysis ipl win online login

  • + 0 comments

    Polynomial regression is a powerful tool for analyzing the relationship between office prices and various factors. By fitting a polynomial equation to the data, you can capture complex trends that may not be apparent with simpler models. This approach is especially useful in real estate, where prices are often influenced by a variety of variables such as location, square footage, and market demand.

    Get more info by clicking here to explore how polynomial regression can enhance your office price analysis.